Browse documentation

Guides

Connect an MCP client

Cuekoo speaks the Model Context Protocol. Register one server, paste an API key, and the client discovers the same Tools the REST API exposes.

Streamable HTTPStateless26 tools

The server

  • URL: https://api.cuekoo.com/mcp
  • Name to register: cuekoo
  • Transport: Streamable HTTP, JSON responses, no session state between requests.
  • Auth: Authorization: Bearer ck_..., the same organization key as REST.

Tool names are prefixed with cuekoo_, so list_my_accounts is cuekoo_list_my_accounts in the client. Arguments, schemas and prices are otherwise identical to the REST reference.

Register the server

Pick a client. The command or file contents below use YOUR_API_KEY as the placeholder; replace it with a key from Settings → Developer.

claude mcp add --transport http cuekoo https://api.cuekoo.com/mcp --header "Authorization: Bearer YOUR_API_KEY"
ClientWhere it goes
Claude Codecommand line
Codex~/.codex/config.toml
Cursor~/.cursor/mcp.json
VS Code.vscode/mcp.json
Gemini CLI~/.gemini/settings.json
OpenClawcommand line

Codex, Cursor, VS Code and Gemini read the server list when they start, so restart the client after editing the file. The Claude Code command registers the server for the current project; add --scope user to make it available everywhere.

What the client sees

The client calls initialize, then tools/list, then tools/call. Every advertised Tool carries the same JSON Schema as GET /openapi/v1/tools, so a model can fill the arguments without extra prompt text.

tools/call
curl -X POST https://api.cuekoo.com/mcp \
  -H "Authorization: Bearer YOUR_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":"cuekoo_list_my_accounts","arguments":{}}}'

The response is an MCP CallToolResult with structuredContent holding the Tool's object and a text copy of the same JSON. A Tool failure sets isError: true instead of failing the request; see Errors over MCP.

REST or MCP?

Use MCP when a model or an MCP-aware client should choose Tools itself: the client discovers the catalog and handles the JSON-RPC envelope. Use REST when the call is part of an application's fixed logic, when you need HTTP status codes directly, or when the environment has no MCP support.

Both entrances share the key, the scopes, the credit balance and the job queue. A queued Tool called over MCP behaves exactly like its REST version: it returns a job id, and you poll get_job through the same client.

Troubleshooting

  • 401: the header is missing or the key is not an API key. MCP requests must carry Authorization; a key in a query string is not accepted.
  • 404 on /mcp: the host is wrong. The path is exactly /mcp, with no /v1.
  • Client shows no Tools: the client reached the server but the key's scopes exclude the catalog, or the client did not restart after the config change.
  • 405 or a render error: the endpoint accepts POST only. Some clients need Accept: application/json, text/event-stream.