Didit MCP Server
Privacy policy · Didit support
The official Model Context Protocol server for Didit — bring KYC, KYB, AML screening, transaction monitoring, biometrics, and full workspace operations to Claude, Cursor, VS Code, Windsurf, Zed, and any MCP client.
- 160+ tools across sessions, workflows, vendor users/businesses, transactions, the standalone verification APIs, lists, cases, reports, webhooks, and billing.
- Load only what you need. Add
?toolsets=core for a short catalog of about 30 tools, about a tenth of the tokens the full list costs; the rest stays one step away through didit_tool_search. See Toolsets.
- Read-only mode for connections that must never change anything: add
?read_only=true.
- Two ways to connect.
"Log in with Didit" (OAuth 2.1 + PKCE): the MCP acts as the signed-in user with their role's permissions.
Or an application API key, for agents that run with no person present (CI, scheduled jobs, backend agents): the connection is that one application.
See Authentication.
- Tools call Didit REST endpoints. Session PDF generation returns a temporary download URL for the original PDF.
Full documentation: https://docs.didit.me/integration/mcp/overview
Session PDF downloads
didit_session_generate_pdf returns download_url, expires_at (UTC), and
expires_in (300 seconds). Fetch the URL without an Authorization header to save
the original Didit PDF. The server checks PDF access before issuing the link and
fetches the original report again at download time using the same user and organization.
It does not reconstruct the report from session data. If the session changes between
issuance and download, the download reflects the current report. Revoked or expired
user access can invalidate a link before its five-minute expiry.
Deployments must set MCP_PDF_DOWNLOAD_KEY to 32 cryptographically random bytes
encoded as 64 hexadecimal characters, shared across all replicas, and set
MCP_RESOURCE_URI to the public HTTPS MCP endpoint. Route
/downloads/session-report.pdf to this HTTP server. The authenticated-encryption
key protects the credentials embedded in the session-scoped link; rotating it
invalidates outstanding links. Treat links as secrets and redact the token query
parameter in proxy/access logs. Responses use Cache-Control: no-store.
E-signature files
didit_session_get_signature_evidence, didit_session_get_signed_document and
didit_session_get_signature_field_image return the same kind of link (plus content_type)
for a signer's evidence PDF, the signed PDF of one document and the PNG of a signature field.
They use the same MCP_PDF_DOWNLOAD_KEY and MCP_RESOURCE_URI; route
/downloads/session-signature to this HTTP server as well. The file is checked against its
recorded SHA-256 at issuance and again at download. didit_session_validate_signatures
re-validates the signed documents and returns the result as JSON.
Stdio deployments need a reachable HTTP deployment with the same key, API base URL,
and MCP_RESOURCE_URI; stdio alone cannot serve download links. Missing key
configuration produces an actionable tool error instead of inline PDF data.
Quick start
Hosted (recommended)
No install: point your client at the hosted URL and sign in via the browser. An agent with no person present can connect with an API key instead.
https://mcp.didit.me/mcp
Opening mcp.didit.me in a browser shows the same links as one-step buttons for each client.
A client that was given the address without the path, https://mcp.didit.me, reaches the same server: the bare address answers MCP requests exactly as /mcp does.
Claude plugin: /plugin install didit --marketplace didit-protocol/skills installs the Didit plugin (this server + 8 skills). Source: https://github.com/didit-protocol/skills/tree/main/plugins/didit
Cursor (~/.cursor/mcp.json), by hand
{ "mcpServers": { "didit": { "url": "https://mcp.didit.me/mcp" } } }
Windsurf / Zed (via the mcp-remote bridge)
{ "mcpServers": { "didit": { "command": "npx", "args": ["-y", "mcp-remote@latest", "https://mcp.didit.me/mcp"] } } }
See per-client setup for every client, with screenshots and troubleshooting.
Once connected, ask for "my Didit context" (the model calls didit_context_get), or start from one of the server's prompts: integrate_didit, review_queue, explain_session, build_workflow, verification_report.
Sign in without a browser (device code)
For the local (stdio) server on a remote machine, in a container or in CI, where no browser can open, sign in with an OAuth device code.
It also works for accounts that use a passkey or SSO and have no password.
npx -y @didit-protocol/mcp-server login
The terminal prints a short code and a link:
To connect this machine to your Didit account, open https://business.didit.me/device and enter the code WDJB-MJHT
Or open: https://business.didit.me/device?user_code=WDJB-MJHT
Approve only if the code on the page matches this one.
Open the link on any device with a browser, sign in to Didit, check that the code matches and approve.
The command then saves your credentials and prints the scopes that were granted (never the token).
Approve only a code you started yourself.
- Credentials live in
~/.config/didit/mcp-credentials.json (override with DIDIT_MCP_CREDENTIALS_FILE), readable by you only, one entry per Didit environment.
- The local server uses them automatically when
DIDIT_ACCESS_TOKEN is not set, and refreshes them before they expire.
npx -y @didit-protocol/mcp-server logout revokes the grant and deletes the stored credentials.
- Set
DIDIT_DEVICE_NAME to change the name shown on the approval page (default: the machine's hostname).
- In CI, run
login once on a trusted machine and mount the credentials file as a secret, or set DIDIT_ACCESS_TOKEN as before.
Do not share one credentials file between jobs that run at the same time, because refresh tokens rotate.
- No shell? Ask the agent to call
didit_account_device_login_start, show you the link and code, then didit_account_device_login_poll once you approve.
Both tools exist only on the local server.
Sign in with the account tools
On the local server an agent can also sign in by itself, with an email address and a password: didit_account_login for an existing account (then didit_account_verify_2fa when the account has an authenticator app), or didit_account_register and didit_account_verify_email for a new one.
The local server keeps that sign-in, so the tools that follow are authenticated with nothing passed between them.
- It is kept in the same credentials file as a device-code sign-in (
~/.config/didit/mcp-credentials.json, readable by you only) and refreshed before it expires.
A server started later picks it up.
- The answer of these tools carries no refresh token: the server holds it, because a refresh token works once.
- When the file cannot be written (a read-only home directory in a container), the sign-in is kept in memory until the server stops.
- If you signed in both ways, the server uses the more recent sign-in.
DIDIT_ACCESS_TOKEN, when set, still takes precedence over both.
npx -y @didit-protocol/mcp-server logout removes it from the machine.
- An account that signs in with a passkey or SSO has no password: use the device code above.
These tools exist only on the local server.
The hosted server never takes a password.
Connect with an API key (headless agents and CI)
An agent that runs with no person present has no browser to sign in with.
It connects to the hosted server with the application API key it already sends to the Didit API, in the x-api-key header:
Claude Code
claude mcp add --transport http didit https://mcp.didit.me/mcp --header "x-api-key: $DIDIT_API_KEY"
Cursor (~/.cursor/mcp.json)
{ "mcpServers": { "didit": { "url": "https://mcp.didit.me/mcp", "headers": { "x-api-key": "${env:DIDIT_API_KEY}" } } } }
Any other client or your own agent: send x-api-key: <key> on every request to https://mcp.didit.me/mcp.
Authorization: Bearer <key> works too, for clients that only let you set a bearer token.
What an API key connection is:
- One application.
The connection acts on the application the key belongs to, so there are no ids to pass.
didit_context_get names it, says whether it is live or sandbox, and reports connection.type: "api_key".
A call that names another organization or application is refused.
- The key's own access.
The key is forwarded to the Didit API exactly as on a direct API call, and the API decides what it may do.
A full-access key reaches everything of its application; a restricted key only the resources it was given.
Give an agent a restricted key with an expiry, created in the Didit console under the application's API keys.
- Sandbox first.
Connect with the sandbox application's key to build and test: every check is simulated and nothing is billed.
- Combines with toolsets and read-only:
https://mcp.didit.me/mcp?toolsets=core&read_only=true (see Toolsets).
- Revoked like any key.
Revoke or rotate the key in the console and the connection stops within a minute.
Every tool call is logged with the key's id, never the key.
What needs a person, and is therefore neither listed nor run on an API key connection:
- members, roles and API key management;
- the organization's plan, cards, receipts and billing details;
- the audit log, and
didit_workflow_build_graph (use didit_workflow_create, or the graph tools didit_workflow_create_draft, didit_workflow_validate_graph and didit_workflow_set_graph);
- download links for session PDFs and e-signature files (request the file from the Didit API with the same key).
A person does those in the Didit console, or through a connection that signs in with OAuth.
Two limits to know:
- A key limited to specific IP addresses is refused, because the Didit API would see this server's address and not yours.
/mcp and /mcp/payments take a key.
From nothing to a first verification, with no browser.
The account tools of the local server create the account: didit_account_register, then didit_account_verify_email with the code sent to the email address.
The answer carries the new organization with its live and its sandbox application, each with its API key.
The local server is signed in from that moment (see Sign in with the account tools), so the same conversation goes on to create a workflow (didit_workflow_create) and a session (didit_session_create) in the sandbox application.
For an agent that runs elsewhere, store the keys in your secret store and connect it to the hosted server with the sandbox key; switch to the live key to go live.
didit_org_get_balance reads the credit balance; when credit is needed, see Agent payments.
GET /healthz lists api_key under features on a server that accepts keys.
Authentication
The MCP is an OAuth 2.1 resource server; the Didit console (business.didit.me) is the authorization server. On first connect your client opens a browser, you Log in with Didit and approve the scopes, and the MCP then acts as you — across every organization you belong to, with your role's permissions. Tokens are short-lived and refreshed automatically.
Scopes: didit:management (workspace operations), didit:verification (running checks) and didit:staff (Didit staff accounts only; the authorization server never issues it to anyone else). Your console role is enforced server-side on every call.
A role change, an application-access change or a membership change applies on the next call, on a connection that is already open. The server asks Didit for your current role, permissions and applications on every call and refuses before sending anything, and a call that names no organization or application checks every one it would read before reading it. No reconnect is needed. didit_context_get is the one exception: it lists the organizations and applications you have from a copy that can be up to a minute old.
A removal and an application-access change apply at once. A demotion applies at once to the calls the server judges itself, which is nearly all of them. Three things can still take up to ten minutes (600 seconds), because the verification service keeps its own copy of your role:
- a permission your role has just gained may be refused until that copy expires, and the refusal says so;
- a demotion may not be seen on the few calls the server cannot judge on its own — reports and their exports, the Investigator reads and decisions, importing a shared session — so the old role can still be accepted there until that copy expires;
didit_session_get_decision, didit_session_update_status and didit_session_delete take only a session id and name no organization, so when no single organization resolves for you (you belong to several, or several applications) the server cannot tell which membership the session belongs to: the verification service alone decides those three calls, and a demotion can be accepted there until its copy expires.
If Didit's sign-in service cannot be reached, the call is refused rather than sent — after two attempts of eight seconds each, and reads included — because nothing has confirmed what you may do. Retrying in a moment is the fix.
A server that verifies tokens locally instead of asking Didit for your role on every call (the jwks mode) has no live check to make: there a role change reaches a connection when its token is refreshed, and the verification service's own 600-second copy still applies to the calls it decides.
The hosted server also takes an application API key in place of a sign-in, for agents that run with no person present.
Such a connection is one application with the key's own access, not a user with a role: see Connect with an API key.