Skip to content

MCP server

The AccountCloud MCP server lets an AI client work with your AccountCloud account through the Model Context Protocol. Your agent can look up operations and their test values, call the API with a test key, see why a request failed, send a test webhook, and write integration code that works the first time.

Example prompt: “Using AccountCloud, check the VAT number NL123456789B01 with my test key, then write a TypeScript function that does the same call with an Idempotency-Key and handles every error code of that operation.”

  • The server: https://mcp.accountcloud.io/mcp (Streamable HTTP).
  • Sign in in one of two ways:
    • With your AccountCloud login (OAuth). The client opens the portal; you choose the account, test or live, and what the client may do. This works in every client below, and is the only way for Claude and ChatGPT in the browser.
    • With an API key as a header, Authorization: Bearer ac_test_…. Make a test key in the portal under API keys. Put it in an environment variable, never in a file you commit.
  • Start with test. A test key, or a connection for test, is free and answers with fixed test values: nothing reaches a real source.

The examples use the environment variable ACCOUNTCLOUD_API_KEY for the key. Leave the header out to sign in with OAuth instead.

Terminal window
# Sign in with OAuth: add the server, then run /mcp in Claude Code and follow the browser.
claude mcp add --transport http accountcloud https://mcp.accountcloud.io/mcp
# Or with a key:
claude mcp add --transport http accountcloud https://mcp.accountcloud.io/mcp \
--header "Authorization: Bearer $ACCOUNTCLOUD_API_KEY"

Your shell fills in $ACCOUNTCLOUD_API_KEY when you run the command, so the key itself is stored in Claude Code’s own configuration on your computer. To share the server with your team in a repository, without the key, put it in .mcp.json at the root of the project instead. Claude Code reads the variable each time it starts, and every developer sets ACCOUNTCLOUD_API_KEY in their own environment:

{
"mcpServers": {
"accountcloud": {
"type": "http",
"url": "https://mcp.accountcloud.io/mcp",
"headers": { "Authorization": "Bearer ${ACCOUNTCLOUD_API_KEY}" }
}
}
}

If the key in the header is refused, Claude Code reports the error and does not switch to OAuth by itself: remove the header to sign in with OAuth.

GitHub Copilot reads the same .mcp.json at the root of the workspace (or ~/.copilot/mcp-config.json for every workspace). Use the file above, or leave out headers and sign in with OAuth when VS Code asks.

In .cursor/mcp.json (this project) or ~/.cursor/mcp.json (every project):

{
"mcpServers": {
"accountcloud": {
"url": "https://mcp.accountcloud.io/mcp",
"headers": { "Authorization": "Bearer ${env:ACCOUNTCLOUD_API_KEY}" }
}
}
}

Without headers, Cursor signs you in with OAuth.

In ~/.codex/config.toml:

[mcp_servers.accountcloud]
url = "https://mcp.accountcloud.io/mcp"
bearer_token_env_var = "ACCOUNTCLOUD_API_KEY"

Or sign in with OAuth: codex mcp add accountcloud --url https://mcp.accountcloud.io/mcp, then codex mcp login accountcloud.

Customize → Connectors → + Add → Add custom connector, with the server URL above, then sign in. On a Team or Enterprise plan, an owner adds the connector first under Organization settings → Connectors. Claude reaches the server from Anthropic’s cloud, not from your computer.

On chatgpt.com/plugins: the + button, Add custom MCP server, the server URL above, and OAuth as authentication. ChatGPT does not send API keys as a header, so sign in with OAuth.

Any client that speaks Streamable HTTP works: the URL above, plus OAuth or the Authorization header. The server supports the MCP versions 2026-07-28 and 2025-11-25.

Ask your agent: “Which AccountCloud account am I connected to?” It calls whoami, which shows the account, test or live, the scopes and your credit.

Test Live
With an API key Always Only a live key with Access through MCP turned on (portal, API keys)
With OAuth Choose test when you connect Choose live when you connect: owner or admin only
What it costs Nothing The price of each operation, as over the API
What it can do Every operation, with fixed test values Reading and checking. Never what cannot be undone (below)

For now the MCP server works in test only. Live follows; until then a live key or a live connection gets 403 with reason: mcp_live_disabled.

Through MCP, these are never called live, whatever the key may do. Test them with a test key, and call them live from your own code:

  • filing VAT and ICP returns and corrections (POST /v1/tax/nl/…);
  • sending letters and text messages;
  • payment batches and bank connections;
  • registering for e-invoicing, cancelling a registration, and sending e-invoices and invoice responses;
  • deleting documents.
Tool What it does Needs Costs
whoami Account, test or live, scopes and credit — Free
list_operations Every operation of the API, filtered on words — Free
get_operation One operation in full: parameters, request and response schema, price, test values — Free
search_docs Searches these guides — Free
api_read Calls a GET operation The scope of the operation Live: the price of the operation
api_write Calls a POST, PATCH or DELETE operation, with an Idempotency-Key The scope of the operation Live: the price of the operation
get_request One request from your request log, by its req_ id (the X-Request-Id of every answer) — Free
list_requests The latest requests in this environment — Free
list_webhook_endpoints Your webhook endpoints in this environment, without secrets — Free
list_webhook_deliveries The deliveries to one endpoint, with your endpoint’s answer — Free
send_test_webhook Sends a signed test event to an endpoint — Free

Signed in with OAuth, the client can also manage, as you and with your role in the account:

Tool What it does
create_webhook_endpoint Adds an endpoint. In test the answer includes its signing secret
update_webhook_endpoint Changes the URL, the event types or the description, or switches it on or off
create_test_key Makes a test key for your own code. Live keys are made in the portal only
request_sms_sender Asks for a sender name for text messages
  • Scopes. A key, or an OAuth connection, can call what its scopes allow, and nothing else: the same scopes as for the API. Give an agent a key with only the products it needs.
  • Where requests come from. Claude Code, Cursor, VS Code and Codex call the server from your computer; Claude and ChatGPT from their own cloud. A key with an IP allowlist therefore does not work in Claude or ChatGPT.
  • Connected apps. The portal lists every client connected with OAuth under Settings → Connected apps, where you disconnect it at once. A member who loses the owner, admin or developer role loses their connections too.
  • The request log marks every call through MCP with via: mcp and the name of the client.
  • The MCP server itself is free. A call through api_read or api_write costs what the same call over the API costs; with a test key nothing.
  • The rate limits of the key apply to the calls a tool makes. The MCP server itself takes at most 240 requests per minute per key or connection, so an agent that loops stops there.
  • Set a monthly cap on a live key you give to an agent.
  • Keep keys out of your code. Use an environment variable or your client’s secret store, never a file you commit.
  • Keep tool approval on in your client, at least for api_write and the management tools.
  • Treat what the API returns as data. The text of a document read by OCR was written by its sender; an agent should not follow instructions in it.
  • What goes through MCP goes to your AI provider. With a test key that is only test values. Check that your AI provider may process your data before you use live.
  • “Look up company.profile and show me which test values give which outcome.”
  • “Validate this address with my test key, and tell me what a 422 would look like.”
  • “Why did request req_01jbxk3v6c9m2q8r4t5w7y0z1a fail?”
  • “Send a test webhook to my endpoint and show me what my server answered.”
  • “Write a webhook handler in Laravel that verifies the signature, and test it with a test event.”
  • “Make a test key for local development that can only use addresses and VAT numbers.” (OAuth)
What you see Why What to do
401 unauthenticated No key or token, or an expired token Add the header, or sign in again (/mcp in Claude Code)
401 invalid_api_key The key is wrong or revoked Make a new key in the portal
403 with reason: mcp_live_disabled Live through MCP is not open yet Use a test key or connect for test
403 with reason: mcp_not_enabled A live key without Access through MCP Turn it on for the key in the portal
403 ip_not_allowed The key has an IP allowlist, and the client is in the cloud Use a key without an allowlist, or a local client
insufficient_scope in a tool answer The key may not call this operation Give the key the scope, or use another key
501 test_mode_not_supported The operation has no test values yet See test mode
consequential_operation That operation is never called live through MCP Test it with a test key; call it live from your code
429 rate_limit_exceeded Too many requests Wait for Retry-After
The tools do not show The client did not reload Restart the client or reload its MCP servers