MCP Server
Last updated on November 19, 2026
The TofuPilot MCP server lets AI agents (Claude, Cursor, and any Model Context Protocol client) work with your test data directly. Clients authorize through your browser with OAuth, so there is no API key to copy or rotate. Each connection reaches only the organizations you pick when you authorize it and, by default, has read-only access; you can grant write access per organization at authorization time. With write access, agents can create and update runs, units, parts, batches, procedures, and stations—including revisions and versions—and manage deployments, logs, and phases.
Endpoint
https://www.tofupilot.app/mcpThe server uses the Streamable HTTP transport. Point your client at this URL; it discovers the OAuth flow automatically.
On a self-hosted instance the endpoint is https://<your-domain>/mcp and the MCP server is a license feature (mcp). When the license does not include it, the endpoint answers 403 and Settings > MCP shows the feature as not included. An instance without outbound internet access sets DISABLE_MCP_CLIENT_METADATA_DOCUMENTS=true in .env, so clients register dynamically instead of being identified by a metadata document the instance cannot fetch.
Connect
Find these snippets under Settings → MCP in your dashboard, then add the server to your client.
Claude
claude mcp add --transport http tofupilot https://www.tofupilot.app/mcpRun /mcp in Claude to start the browser authorization.
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"tofupilot": {
"url": "https://www.tofupilot.app/mcp"
}
}
}Any other client
Use the endpoint URL with Streamable HTTP transport. The client discovers the OAuth authorization server from the URL.
The server follows the MCP authorization specification: OAuth 2.1 with PKCE (S256), protected resource metadata (RFC 9728) at /.well-known/oauth-protected-resource/mcp, authorization server metadata (RFC 8414 and OpenID Connect discovery), resource indicators (RFC 8707) and the iss authorization response parameter (RFC 9207). Clients identify themselves with a Client ID Metadata Document or register dynamically (RFC 7591); desktop and command-line clients can use a loopback or app callback (RFC 8252). Access tokens can be sender-constrained with DPoP (RFC 9449).
How authorization works
On first connect, your client opens a browser window:
- Sign in to TofuPilot.
- Pick the organizations the client should access and, where your role allows it, turn on write access for each.
- Approve.
The consent screen shows the client's name, the address it returns to and, for a client identified by a metadata document, the website that publishes it. Client names are chosen by the apps themselves: approve only a connection you started.
A token is issued to the client and stored by it. The token expires, is refreshed by the client, and is checked on every request. Each authorization is its own connection: the same client on two devices holds two connections, each with its own organizations and active organization. Reconnecting a client that registered itself replaces its connection. A client identified by a metadata document, such as Claude Code, starts a new connection each time; the previous one ends once its tokens expire unused, or when you revoke it. Revoking a connection (below) or being removed from an organization cuts its access.
Switch between organizations
Tools act on the connection's active organization. When you authorized several, the agent lists them with list_orgs and switches with set_org. To change which organizations a client can reach, connect it again from that device and pick them: the client uses the new choice from then on.
Manage and revoke access
Settings → MCP lists the connections authorized for the organization, with the access each has and when it was connected; a client connected from two devices appears twice. Revoking a connection revokes it in every organization and deletes its tokens; that client stops working immediately and must reconnect to regain access, while the client's other connections keep theirs.
Access levels
Each organization of a connection gets one of two access levels, chosen on the consent screen:
- Read (default): list and fetch data only.
- Write: read, plus create, update, and permanently delete data. Deletes can cascade (deleting a part removes its revisions, units, and run history) and are not reversible. Leave write off unless the agent needs it.
You can see each client's access level under Settings → MCP and revoke it at any time.
Connection tools
Available to every client.
| Tool | Description |
|---|---|
get_profile, whoami | Identify the connected user and, for whoami, the active organization. |
list_orgs, set_org | List the organizations this connection was authorized for, or switch the active one. |
Read tools
Available to every client. Scoped to the active organization and, for a Viewer restricted to access groups, to their access groups: the agent reads only their stations, the runs those stations produced, and the members of their groups.
| Tool | Description |
|---|---|
runs_list, runs_get | List test runs (filter by outcome, part, serial, date) or fetch one by id. |
units_list, units_get | List units (filter by serial, part, batch, outcome) or fetch one by id. |
parts_list, parts_get, parts_revision_get | List parts (search by name or number), fetch one, or fetch a revision. |
batches_list, batches_get | List batches (filter by part or date) or fetch one by id. |
procedures_list, procedures_get, procedures_version_get | List procedures, fetch one, or fetch a version by tag. |
stations_list, stations_get | List test stations or fetch one by id. |
users_list | List organization members (id, name, role, access groups). |
teams_list, teams_get, teams_list_members | List the access groups in your organization, fetch one by id, or list its members. |
logs_list, logs_get | List test logs (filter by level, run, procedure, unit, source) or fetch one by id. |
phases_list, phases_get | List test phases (filter by outcome, unit, run details) or fetch one by id. |
measurements_list, measurements_get | List measurements (filter by phase, value, outcome, unit, run details) or fetch one by id. |
deployments_list, deployments_get | List deployments (filter by procedure, environment, build status, branch, author) or fetch one by id. |
Write tools
Available only to clients granted write access. Destructive tools (delete, remove) require an explicit confirmation argument.
| Tool | Description |
|---|---|
runs_create, runs_update_metadata | Create a test run, or upsert run metadata. |
runs_delete | Delete one or more test runs by id. Irreversible. |
units_create, units_update | Create or update a unit. |
units_add_child, units_remove_child | Add or remove a sub-unit (assembly) by serial number. |
units_delete | Delete one or more units by serial number. Cascades to their run history and attachments. Irreversible. |
parts_create, parts_update, parts_delete | Create, update, or delete a part. Delete cascades. |
parts_revision_create, parts_revision_update, parts_revision_delete | Create, update, or delete a part revision. |
batches_create, batches_update, batches_delete | Create, update, or delete a batch. |
batches_add_units, batches_remove_units | Add units to a batch by serial number, or unlink them (the units are not deleted). |
procedures_create, procedures_update, procedures_delete | Create, update, or delete a procedure. |
procedures_version_create, procedures_version_delete | Create or delete a procedure version. |
stations_create, stations_update, stations_remove | Create, update, or remove a station. |
users_invite | Invite a user to your organization by email, with a role (owner, admin, developer, viewer, operator). Sends the invitation when email delivery is configured and returns the invite link. |
teams_create, teams_update, teams_delete | Create an access group, rename it, or delete it. Deleting also removes all its memberships. |
teams_add_member, teams_remove_member | Add an organization member to an access group, or remove one. |
What the agent can see
The agent only accesses data in the organizations you authorize, enforced server-side on every request. Member email addresses and account status are not exposed over MCP, including when listing the members of an access group. Every write is recorded in the Audit Log, and you can revoke a client at any time. An Admin or Owner can also revoke a member's MCP connection for their organization, or make a Viewer dashboard only, which refuses their MCP clients.
How is this guide?
TofuPilot AIPreview
Ask questions about your test data, run autonomous root cause analysis, and get notified the moment yield, volume, or sample behavior drifts.
ChatPreview
Query runs, units, parts, yield, throughput, and measurement distributions with TofuPilot Chat, an AI assistant grounded in your organization's test data.