Skip to main content
MCP (Model Context Protocol) is the open standard Anthropic introduced for AI tool servers. Linear, GitHub, Stripe, Atlassian, Sentry, and dozens of other vendors publish official MCP servers. qlaud lets you connect any of them with one POST — we open a connection, list every tool the server exposes, and add them to your account, prefixed with the server name you pick. This is the third tool kind alongside webhooks and built-ins. All three flow through the same /v1/threads/:id/messages dispatch path; the model never sees a difference.
All /v1/mcp-servers endpoints are master-key only. Same posture as /v1/tools — registering an arbitrary MCP server URL is control plane, and a leaked per-user key shouldn’t be able to point a discovery probe at attacker.com or shove tools into another tenant’s roster.

How it works

When the model later invokes linear/create_issue, qlaud opens a fresh MCP session, calls tools/call with the unprefixed name, and returns the result — same shape the model expects from any tool.

POST /v1/mcp-servers — Connect

We connect to the server BEFORE persisting. If the URL is bad, the auth is wrong, or the server doesn’t speak MCP, you get a clean 400 at registration time — not a mid-chat dispatch failure.

Body

Response (201)

tools_skipped lists any tools whose prefixed name conflicted with an existing tool (registered as a webhook or built-in earlier). Rename those first or pick a different MCP server prefix.

GET /v1/mcp-servers — List

Returns every non-revoked MCP server you’ve connected. auth_headers is never returned — only a has_auth_headers: boolean indicator.

DELETE /v1/mcp-servers/:id — Disconnect

Soft delete — the row stays for audit, hard-delete cron sweeps later. Cascades to tools: every tools row backed by this server is revoked at the same time. Existing thread audits referencing those tools resolve cleanly; new thread messages can no longer use them.

POST /v1/mcp-servers/:id/refresh — Re-discover

Vendors add and remove tools. This re-calls tools/list and reconciles: new tools get inserted, removed tools get revoked, matching tools stay intact. Returns the diff:

Tool naming convention

Every discovered tool is registered as <server_name>/<original_name>. This means:
  • The model sees linear/create_issue and knows it’s a Linear tool.
  • Two MCP servers can expose tools with the same bare name without colliding (e.g. linear/create_issue vs github/create_issue).
  • The <server_name> half is a path in your namespace — tool names starting with qlaud-builtin/ are reserved for the built-in catalog.
When dispatch happens, qlaud sends only the bare name (create_issue) to the MCP server since that’s what the server registered.

Auth header encryption

auth_headers is encrypted with AES-GCM using the gateway’s TOOL_CONFIG_ENC_KEY secret before being persisted to D1. The headers are only decrypted at dispatch time inside the worker. There is no read path that returns the plaintext — to rotate a token, revoke the server and re-register with the new one.

Errors

Where MCP fits vs. the other tool kinds

The general rule: try built-in first (curated UX, sensible defaults). If you want broader vendor coverage than the curated builtins offer, connect their MCP server. Use webhooks for the truly custom stuff that no public tool can express.