withHuman MCP server
Let an AI agent set up approval pipelines, escalation paths, teams, agents and webhook endpoints for you.
The withHuman MCP server lets a coding agent or assistant configure withHuman on your behalf. Connect Claude, Claude Code, Cursor, Codex or any other MCP client with one of your API keys, and ask it in plain language: "send every refund over $500 to the payments team and approve the rest." The agent reads your agents, members and teams, creates the escalation path, writes the pipeline, and can test a sample request before it goes live.
This is a different thing from the MCP Gateway. The gateway sits between an agent and the external tools it calls, and asks for approval. The MCP server is how an agent manages withHuman's own settings. On hosted withHuman the CLI adds the gateway to your agents as withhuman-gateway, so it never takes the withhuman name you give this server.
Loading diagram…
Diagram source
flowchart LR
you["You, in your agent's chat"] -->|"Set up refund approvals"| agent["Coding agent or assistant"]
agent -->|"Sign in and choose permissions, once"| consent["withHuman in your browser"]
consent --> agent
agent -->|MCP tools| server["withHuman MCP server"]
server --> pipelines["Approval pipelines"]
server --> paths["Escalation paths"]
server --> teams["Teams"]
server --> agents["Agents"]
server --> webhooks["Webhook endpoints"]Connecting
The server's address is your deployment's origin followed by /api/mcp/v1. On hosted withHuman it is https://app.withhuman.ai/api/mcp/v1. Both API keys pages in Settings show the address and a ready-made command for Claude Code. Add the server to your client as a streamable HTTP server:
In Claude, open Customize > Connectors and click Add custom connector. Enter the address above, then click Add.
Click Connect on the new connector to sign in. To use it in a chat, click +, choose Connectors and turn withHuman on.
On Team and Enterprise plans, an Owner adds the connector under Organization settings > Connectors. Members then connect from Customize > Connectors.
claude mcp add --transport http --scope user withhuman https://app.withhuman.ai/api/mcp/v1--scope user makes the server available in every project. Leave it out to add the server to the current project only.
Claude Code opens the sign-in the first time it uses a withHuman tool. To connect right away, or after the access has expired, run this inside Claude Code and choose withhuman, then Authenticate:
/mcp
codex mcp add withhuman --url https://app.withhuman.ai/api/mcp/v1Codex opens the sign-in as part of adding the server. If it does not, or the access has expired, run:
codex mcp login withhumanThe server is stored in ~/.codex/config.toml, so it is available in every project.
Add the server to ~/.cursor/mcp.json for every project, or to .cursor/mcp.json inside one project:
{
"mcpServers": {
"withhuman": {
"url": "https://app.withhuman.ai/api/mcp/v1"
}
}
}Cursor lists the server under MCP in its settings. Turn it on there, and Cursor opens the sign-in in your browser.
Any MCP client that supports the streamable HTTP transport and OAuth sign-in can connect. Add a server named withhuman with the address above and no command, in whatever form the client's settings use. Most clients accept the same JSON shape as Cursor. When the client first reaches withHuman it opens the sign-in in your browser.
There is no key to copy. The first time the agent talks to withHuman, it opens your browser at the consent page. You sign in if you are not already, see which agent is asking and which organization you are connecting it to, choose what it may do, and choose whether the access lasts 90 days or until you revoke it. Approving sends you back to the agent, which is connected from then on.
Approving creates a personal API key named after the agent, marked Connected agent in your key list. Revoking that key disconnects the agent; it will ask you to connect again the next time it needs withHuman. When the access expires, the agent asks you to connect again in the same way.
Without a browser
A headless integration that cannot open a browser can send an existing personal or organization API key as a bearer token instead. Put the key in the WITHHUMAN_API_KEY environment variable and add the server with the header:
claude mcp add --transport http --scope user withhuman https://app.withhuman.ai/api/mcp/v1 \
--header "Authorization: Bearer $WITHHUMAN_API_KEY"codex mcp add withhuman --url https://app.withhuman.ai/api/mcp/v1 \
--bearer-token-env-var WITHHUMAN_API_KEYCodex reads the variable each time it starts the server, so the key never lands in config.toml.
{
"mcpServers": {
"withhuman": {
"url": "https://app.withhuman.ai/api/mcp/v1",
"headers": {
"Authorization": "Bearer ${env:WITHHUMAN_API_KEY}"
}
}
}
}A browser session never opens the server, so a link in a page cannot act as you.
What the agent can do
The agent gets tools for the same things the pages in Settings do:
| Area | Tools |
|---|---|
| Agents | List and read agents with their instances and provisioner tokens, create, rename, disable, archive and restore an agent, rename or disable an instance, register an instance or create a provisioner token for a service you run, revoke a credential or token, and read the tool catalogue. |
| People | List members, suspend, reactivate or remove a member, list the predefined roles, the permissions and a member's permission policies. |
| Teams | List and read teams, create, rename and archive a team, set its members, read its permission policies, and manage its escalation policy: read it and its history, save, activate or archive a revision. |
| Approval pipelines | List and read pipelines and their history, create a pipeline, save a new revision, activate a revision, see what a revision names and which pipelines delegate to one, test a sample request, archive a pipeline. |
| Escalation paths | List and read paths and their history, see which pipelines use a path, create a path, save a revision, activate a revision, archive a path. |
| Webhook endpoints | List and read endpoints and their history, see which pipelines use one, create one or save a revision, activate a revision, send a test delivery, archive an endpoint, rotate its signing secret. |
| MCP Gateway (hosted) | List and read servers and their history, list a server's tools, register a server or save a revision, activate, deactivate or archive one, store an organization-held scope's headers or a member-held scope's OAuth client, disconnect a scope, list tunnels, and read or set which tools and scopes each agent may use. |
| Audit log (hosted) | Search the audit log, read an event, list the event types, and read a request's timeline. |
| Reference | Read the exact format of pipeline blocks, conditions, escalation paths and team escalation policies. |
Saving a pipeline, escalation path, team escalation policy, webhook endpoint or gateway server creates a new revision and activates it in the same step, so the change applies right away. The agent can save a draft instead and leave activation to you. Earlier revisions stay available for rollback, exactly as in the app; see Immutability.
A credential, provisioner token or webhook signing secret the agent creates appears once, in the agent's chat. Pass it to whoever configures the service and don't leave it in shared transcripts.
Deciding requests, inviting people, giving someone a role or permission policy, and connecting a gateway scope through OAuth always need a signed-in person in the app, as do creating and revoking API keys. To connect a coding agent to withHuman, use the withhuman CLI; see Instance connections.
Permissions
The agent can do exactly what you allow it on the consent page: everything you can do, or only the actions you tick. Either way it follows your permissions as they change, and it can never do more than you. For example, an agent allowed to edit pipelines but not activate them leaves drafts for you to activate in the app. Granting an action that can decide requests or is marked dangerous asks for a recent sign-in, like creating such a key by hand. Choosing specific actions is available in the hosted edition; elsewhere the agent gets everything you can do.
An organization key used as a bearer token can build pipelines, escalation paths, webhook endpoints and gateway servers, manage agents and read the audit log, but cannot manage teams or members, read roles, permissions or permission policies, or list a gateway server's tools. Use a personal key for those.
Every change the agent makes is recorded in the Audit log under the key, so you can see what it did and roll it back.
Example: Refund approvals
We'll ask our coding agent to set up refund approvals for the support assistant. It lists our agents and finds support, lists our teams and finds Payments, and creates an escalation path that pages Payments and then our finance lead after 15 minutes. It then creates a Support pipeline that approves refunds up to $20 and sends the rest to Payments review, and saves the entry pipeline with a block that denies refunds over $500 and a Delegate block that hands the support assistant's requests to the Support pipeline. Before we trust it, we ask it to test a $75 refund: the preview reports that the request would go to a person through the Payments review path.
Checking it works
Ask the agent to list your pipelines and escalation paths, or open Approval pipelines and Escalation paths in the app: the revisions it saved appear with the key's name as the author. If a tool call is refused, the agent sees the same reason the app would show, such as a path that is still in use or a permission the key does not hold.