/v1/threads/:id/messages dispatch path; the model never sees a
difference.
How it works
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
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
auth_headers
is never returned — only a has_auth_headers: boolean indicator.
DELETE /v1/mcp-servers/:id — Disconnect
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
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_issueand knows it’s a Linear tool. - Two MCP servers can expose tools with the same bare name without
colliding (e.g.
linear/create_issuevsgithub/create_issue). - The
<server_name>half is a path in your namespace — tool names starting withqlaud-builtin/are reserved for the built-in catalog.
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.