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/mcp

The 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/mcp

Run /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:

  1. Sign in to TofuPilot.
  2. Pick the organizations the client should access and, where your role allows it, turn on write access for each.
  3. 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.

ToolDescription
get_profile, whoamiIdentify the connected user and, for whoami, the active organization.
list_orgs, set_orgList 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.

ToolDescription
runs_list, runs_getList test runs (filter by outcome, part, serial, date) or fetch one by id.
units_list, units_getList units (filter by serial, part, batch, outcome) or fetch one by id.
parts_list, parts_get, parts_revision_getList parts (search by name or number), fetch one, or fetch a revision.
batches_list, batches_getList batches (filter by part or date) or fetch one by id.
procedures_list, procedures_get, procedures_version_getList procedures, fetch one, or fetch a version by tag.
stations_list, stations_getList test stations or fetch one by id.
users_listList organization members (id, name, role, access groups).
teams_list, teams_get, teams_list_membersList the access groups in your organization, fetch one by id, or list its members.
logs_list, logs_getList test logs (filter by level, run, procedure, unit, source) or fetch one by id.
phases_list, phases_getList test phases (filter by outcome, unit, run details) or fetch one by id.
measurements_list, measurements_getList measurements (filter by phase, value, outcome, unit, run details) or fetch one by id.
deployments_list, deployments_getList 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.

ToolDescription
runs_create, runs_update_metadataCreate a test run, or upsert run metadata.
runs_deleteDelete one or more test runs by id. Irreversible.
units_create, units_updateCreate or update a unit.
units_add_child, units_remove_childAdd or remove a sub-unit (assembly) by serial number.
units_deleteDelete one or more units by serial number. Cascades to their run history and attachments. Irreversible.
parts_create, parts_update, parts_deleteCreate, update, or delete a part. Delete cascades.
parts_revision_create, parts_revision_update, parts_revision_deleteCreate, update, or delete a part revision.
batches_create, batches_update, batches_deleteCreate, update, or delete a batch.
batches_add_units, batches_remove_unitsAdd units to a batch by serial number, or unlink them (the units are not deleted).
procedures_create, procedures_update, procedures_deleteCreate, update, or delete a procedure.
procedures_version_create, procedures_version_deleteCreate or delete a procedure version.
stations_create, stations_update, stations_removeCreate, update, or remove a station.
users_inviteInvite 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_deleteCreate an access group, rename it, or delete it. Deleting also removes all its memberships.
teams_add_member, teams_remove_memberAdd 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?

On this page