Skip to main content

MCP server · Headless

Run the Didit MCP server with no browser

A CI job or a backend agent has no one to sign in. Connect it with an application API key, or sign in once with a device code.

Read the docs
https://mcp.didit.me/mcp

Send the key in the x-api-key header. It stays in your environment.

Options

Four ways to connect a headless agent

Pick the one that matches where the agent runs.

API keyFor agents with no person present. Send your application API key in the x-api-key header. The agent acts as that one application.
Device codeFor a machine with no browser. The command prints a URL and an 8-character code. You approve it from any device. Then start the local stdio server. Never approve a code you did not start yourself.
Self-hostRun the local stdio server with a user access token in DIDIT_ACCESS_TOKEN. Supply the token securely through the environment.
DockerBuild the image from the repository. It serves /mcp and /healthz on port 3000. First copy .env.example to .env, set the public MCP_RESOURCE_URI and supply token-introspection credentials from your secret manager.

CI is the automated pipeline that builds and tests your code. Headless means the agent's machine has no browser. Device code still needs a person to approve the sign-in from another device. A stdio server is a local program your client starts.

{  "mcpServers": {    "didit": {      "type": "http",      "url": "https://mcp.didit.me/mcp",      "headers": { "x-api-key": "${DIDIT_API_KEY}" }    }  }}

The device-code and self-hosted stdio options run the local tool catalog, not every hosted capability. Travel Rule, marketplace, fraud networks and transaction SDK token tools are omitted; compliance tools are limited to building a workflow.

API key

What an API key connection is

It acts as one application, with the access of that key.

Signed-in connectionAPI key connection
Acts as
You, with your console role
One application
Reaches
Every organization and application you approved
The application the key belongs to
Access
Your role, within the scopes you approved
The access of the key, full or scoped
Needs a person
Once, to sign in
No interactive sign-in
Ends
When you disconnect the app
When you revoke or rotate the key
  • Sandbox first. Connect with the key of a sandbox application. Every check is simulated and nothing is billed.
  • Use a scoped key. Give the agent a scoped key with an expiry, not a full-access key.
  • Toolsets still work. Add ?toolsets=core&read_only=true to the URL for a short, read-only list.
  • No IP limit. A key limited to specific IP addresses is refused. The Didit API would see the address of the MCP server, not yours.
  • A person does four things. Members, roles and API keys, the plan and billing, the audit log and download links are neither listed nor run on an API key connection. Do them in the Business Console, or through a connection that signs in with Didit.
Check the connection
curl -s https://mcp.didit.me/mcp \  -H "x-api-key: $DIDIT_API_KEY" \  -H "Content-Type: application/json" \  -H "Accept: application/json, text/event-stream" \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",       "params":{"name":"didit_context_get","arguments":{}}}'

didit_context_get names the application, says if it is live or sandbox and reports connection.type: "api_key".

Questions

Questions about headless MCP

Can the Didit MCP server run in CI?
Yes. An agent with no person present connects to https://mcp.didit.me/mcp with an application API key in the x-api-key header. No browser sign-in is needed.
Which key should a CI agent use?
A scoped key with an expiry, from a sandbox application while you build. Every check there is simulated and nothing is billed.
What can an API key connection not do?
It cannot manage members, roles or API keys, see the plan and billing, read the audit log or get download links for session PDFs. A person does those.
How do I sign in on a machine with no browser?
Run the local server with the login command. It prints a URL and an 8-character code. Approve the code from any device, then start the server.
How do I configure Claude Code to connect with a Didit API key?
Add a .mcp.json to your project with a didit server of type http, the URL https://mcp.didit.me/mcp and a headers entry whose x-api-key value references the DIDIT_API_KEY environment variable. Claude Code reads DIDIT_API_KEY from the environment each time it connects, so the key itself is never written to the file.
How does my own agent send the API key?
Send x-api-key with your key on every request to https://mcp.didit.me/mcp. Authorization: Bearer with the key works too, for clients that only let you set a bearer token. It is the same application API key your backend already sends to the Didit API.
Which application does an API key connection act on?
An API key connection acts on the one application the key belongs to, so there are no ids to pass. didit_context_get names the application, says whether it is live or sandbox and reports connection.type api_key. A call that names another organization or application is refused.
Why is my IP-restricted API key refused by the MCP server?
A key limited to specific IP addresses is refused, because the Didit API would see the MCP server's address and not yours. Use a key without an IP limit for the MCP connection, and keep it scoped and with an expiry instead.
What do 401 and 403 errors mean on an API key connection?
A 401 means the key is invalid, revoked or expired, or limited to specific IP addresses, and the error_description says which. A 403 means the key's access does not cover the action, or the action needs a person. Widen the key in the Business Console, or do the task through a signed-in connection.
How do I revoke an agent's API key access?
Revoke or rotate the key in the Didit Business Console, and the MCP connection stops within a minute. Every tool call on an API key connection is logged with the key's id, never the key itself, so you can trace what the agent did.
Can a headless connection use toolsets and read-only mode?
Yes. An API key connection works with toolsets and read-only mode, for example https://mcp.didit.me/mcp?toolsets=core&read_only=true. A read-only connection lists only tools that read, and the server refuses every call that would create, change or delete something.
How do I reuse a device code sign-in in later CI jobs?
Run npx -y @didit-protocol/mcp-server login once on a machine you control and approve it. The credentials are stored in ~/.config/didit/mcp-credentials.json with mode 0600, and DIDIT_MCP_CREDENTIALS_FILE overrides the path. Keep that file as a secret for later jobs, or pass a user token in DIDIT_ACCESS_TOKEN.
How long is a Didit device code valid?
A device code expires after 10 minutes and can be approved once. Five wrong codes lock code entry for that account for 15 minutes, and device requests are rate-limited per network. Never approve a code you did not start yourself, because someone can send you a code to connect their agent to your account.
Can an agent create a Didit account with no browser?
Yes, on the local server. The agent calls 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 sandbox applications, each with an API key. Store the keys in your secret store and connect your CI job with the sandbox key first.

Compliance built in

Audited, certified and attested.

We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center

  • Regulation encoded into your flows

    Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.

  • Ready for AMLR

    Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.

  • Trusted by EU regulators

    After a year of supervised testing, EU financial regulators confirmed that verifying with Didit is safer than checking an ID in person.

  • Audited, not self-declared

    iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • SOC 2 Type 2
  • ISO 27001
  • iBeta Level 1 and Level 2
  • EU regulator attestation
  • FSM youth protection
  • GDPR
  • EBA remote onboarding
  • MiCA compatible
  • FIDO Alliance member
  • AMLREU AML Regulation ready

Integration · Didit MCP

Run Didit from your own AI agent

Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
  • Run investigationsAsk why a session was declined, review cases, search people and companies.
  • Change rulesCreate payment rules, test them on past data and switch them on.
  • Pull reportsAsk for numbers, exports or the audit log.

Start

Connect your CI agent

Create a scoped sandbox key, set DIDIT_API_KEY and add the entry.

Free sandbox. Credit applies to work-email sign-ups.