Agents and MCP

Agent identity

Agents sign in as the person using them: every call says whose it was, approvals and rules know the person, and Stop ends it at once.

A coding agent (Claude Code, Cursor, VS Code, Windsurf, Claude Desktop) acts for a person. On a server set to People sign in, the agent signs in as that person through Tracehold, and every call it makes is recorded as theirs: "Claude Code for Maya Chen wants to delete object". Nobody shares a token, and there is no secret in the agent's config.

Who can connect#

Each server says how its agents connect. Choose it in the server wizard, or later under the server's Settings, Who can connect.

People sign inA token
ForCoding agents with a person at a browserPipelines, scheduled jobs, programs
In the agent's configThe server's address onlyThe address and the server's token
Calls are recorded asThe person ("Claude Code for Maya Chen")The server
StopOne sign-in, or all of a person'sPause the server or rotate its token

A server takes one or the other. Switching ends the agents connected the other way; a pipeline and people's coding agents use two servers.

How signing in works#

Tracehold follows the MCP standard's authorization flow, which Claude Code, Claude Desktop, Cursor and VS Code support (Windsurf through the mcp-remote bridge):

  1. The agent connects to the server's address without a token and gets a 401 whose WWW-Authenticate header names where to sign in.
  2. It registers itself with Tracehold and opens Tracehold in the browser.
  3. The person signs in to Tracehold as they always do (a password, single sign-on, or the providers the sign-in page offers; see Your team and sign-in) and sees what is asking: the app, the server, and where the browser returns. They choose Allow or Deny.
  4. The app receives tokens for that one server: an access token that lasts an hour, and a refresh token that is replaced each time it is used. If a replaced refresh token is ever used again (it was copied), the sign-in ends.

Owners, admins and members can connect agents; viewers cannot. A person can only connect to their own organization's servers.

Allow an app only if you just added Tracehold to it yourself. The page says where your browser goes next: an app on this computer, a website, or another app's link.

What names the person#

  • The Overview, sessions and each call's page: "Claude Code for Maya Chen", with the server and her email.
  • Approvals: "Claude Code for Maya Chen wants to ...", in the app, in Slack and in approval emails.
  • The audit trail: each call's entry names the server, the app and the person, and carries the person's ID.
  • Webhooks: action.* events carry acting_for (user_id, email, name, app).
  • Your connector's own record in your bucket: acting_for with the email and the app.
  • AWS CloudTrail: the call's role session names the person, in its session name (tracehold-<call>-maya@acme.example) and as its sourceIdentity, which CloudTrail records on everything the session does. The source identity needs sts:SetSourceIdentity in the role's trust policy, which every current installer sets; a role set up earlier still works and names the person in the session name only. Google Cloud and Azure logs show the connector's identity; the person is in Tracehold's record and yours.

Approving your own agent's calls#

Owners and admins approve any held call. Whether people may approve their own agent's calls is the organization's choice: Approving your own agent's calls. A rule that needs two people never counts the person the agent acts for, and one person's agent can never wait on or spend another person's approval, even on the same server.

Rules about people#

An exception can match the person a signed-in agent acts for: Acting for a person, or their role (members, admins, the owner). For example, hold destructive calls from members' agents and let admins' agents follow the guardrails. A call made with a server's token names nobody, so these rules never match it.

Stopping an agent#

  • One sign-in: Stop on the server's page or under Servers, AI agents. Owners and admins stop anyone's; a person stops their own.
  • All of a person's agents: the stop button next to them under Settings, Team.
  • Automatically: when a person is deactivated, made a viewer or removed.

Stopping is immediate: the agent's token stops working, its open connection closes, and the stop is in the audit trail. The person can sign in again from the app. Removing someone keeps their history: past calls still name them.

Agents inside your network#

An agent can reach a server people sign in to at your connector's MCP port too, so results stay in your network. The connector passes Tracehold's 401 on, pointing at its own copy of the server's metadata, which names the connector's address; the person still signs in at Tracehold in the browser. Tracehold accepts the address only if it is one of your connectors': the address set under Agents use on the connector's card, or the connector's own host name and port. Set the address if agents reach the connector any other way (a load balancer, an IP address).

Limits today#

  • Programs without a person at a browser connect with a token. Identities for pipelines (GitHub Actions, Kubernetes, cloud roles) instead of a stored token are on the roadmap.

Endpoints#

For agent apps and for checking with your own tools:

EndpointWhat it is
GET /.well-known/oauth-protected-resource/mcp/<server-id>The server's protected resource metadata (RFC 9728); its resource is the server's address without the trailing slash
GET /.well-known/oauth-authorization-serverTracehold's authorization server metadata (RFC 8414)
POST /oauth/registerClient registration (RFC 7591); public clients only
GET /oauth/authorizeStarts sign-in: PKCE with S256 and a resource naming one server are required
POST /oauth/tokenauthorization_code and refresh_token grants
POST /oauth/revokeThe app signs out (RFC 7009)