Using the Apideck MCP server with AI agents

Edited

The Apideck MCP server lets AI agents and assistants, such as Claude, Cursor or your own agent, use the Unified API as tools: list invoices, create a contact, read employees and so on, through your customers' existing Vault connections. It covers the Unified API categories included in your plan.

Full setup instructions for each client are in the MCP guide and the GitHub repository.

Two ways to run it

Hosted

Local

How

Point your client at https://mcp.apideck.dev/mcp

Run npx -y @apideck/mcp start

Credentials

Request headers

Environment variables APIDECK_API_KEY, APIDECK_APP_ID, APIDECK_CONSUMER_ID

Best for

Most clients (Cursor, Claude Code, Windsurf, agent frameworks)

Clients that run local servers, such as Claude Desktop

For the hosted server, send these headers:

x-apideck-api-key: {API_KEY}
x-apideck-app-id: {APP_ID}
x-apideck-consumer-id: {CONSUMER_ID}

Which customer's data it uses

The MCP server uses the Vault connections of the consumer you set in x-apideck-consumer-id. Your customers connect their accounts in Vault as usual. The MCP server doesn't have its own connect flow.

  • If a consumer has more than one connector for an API, pass service_id in the tool input, for example "service_id": "xero".

  • An agent can also pass consumer_id in a tool call to switch customer. To stop an agent from doing that, add ?lock_identity=true to the hosted URL. Then only the consumer in the header is used.

Tools

By default the server shows four tools that let the agent find and call the right API operation (list_tools, describe_tool_input, execute_tool, list_scopes). This keeps the agent's context small. If your client shows only these four, that's expected.

Operations are named {api}-{resource}-{operation}, for example accounting-invoices-all or crm-contacts-add.

To offer only read operations, add ?scopes=read to the hosted URL. Combine scopes with commas, for example ?scopes=read,write.

Things to know

  • Connecting isn't proof the credentials work. Your client can connect to the server with a wrong API key. The error only appears when a tool runs, inside a successful (200) response marked isError. Test with one small read, for example listing a few records, and check it in Logs.

  • Writes aren't retried. The server retries reads on temporary errors, but not creates or updates. If a create times out, check whether the record exists before trying again. See A create request timed out.

  • Usage counts as normal API usage. Each tool call is an API call for that consumer. See What Counts as API Usage.

  • Searching our docs from an AI tool is a different server: https://developers.apideck.com/mcp. It needs no API key and doesn't touch your customers' data.

Related

Contact Apideck support through the Customer Portal (the Requests link at the top of this help center), your Slack channel with us, or support@apideck.com if a tool doesn't behave as expected.

Was this article helpful?

Sorry about that! Care to tell us more?

Thanks for the feedback!

There was an issue submitting your feedback
Please check your connection and try again.