Model Context Protocol
Use Deeplinq as a read-only MCP server and attach external MCP tools to agents.
Deeplinq supports MCP in two directions:
- it exposes a read-only MCP server at
/mcp; - organizations can register external Streamable HTTP MCP servers and attach their tools to durable agents.
Deeplinq's MCP server
Connect an MCP client to:
https://api.example.com/mcpAuthenticate with the same bearer credential as the HTTP API. The server exposes:
| Tool | Result |
|---|---|
list_models | Models entitled to the authenticated organization |
get_usage | Organization credit and usage information |
The shipped Deeplinq MCP surface is intentionally read-only.
Register an external MCP server
An org-admin registers a Streamable HTTP endpoint:
curl -H "Authorization: Bearer $ORG_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-X POST "$BASE_URL/v1/mcp-servers" -d '{
"slug":"crm",
"name":"CRM tools",
"url":"https://mcp.example.com/mcp",
"bearer":"<external-server-token>"
}'Registration calls tools/list, stores a deterministic tool snapshot, and
seals the bearer. Responses never return the credential.
Tools are namespaced:
mcp/crm/search_customer
mcp/crm/create_noteThe organization-unique slug prevents collisions with email or another MCP server.
Refresh the tool snapshot
POST /v1/mcp-servers/{server_id}/sync-toolsTool lists do not change automatically. Explicit synchronization keeps agent grants deterministic and makes tool removal an auditable operator action.
Attach for a user
Any organization member can attach the registered server:
curl -H "Authorization: Bearer $DEEPLINQ_API_KEY" \
-H "X-End-User-Id: user-42" \
-X POST "$BASE_URL/v1/mcp-servers/$SERVER_ID/attach"This creates a user-owned mcp connection. Revoke it through the ordinary
connection API:
DELETE /v1/connections/{connection_id}Grant an agent tool
{
"tools": [
{
"tool_name": "mcp/crm/search_customer",
"policy": "auto"
},
{
"tool_name": "mcp/crm/create_note",
"policy": "requires_approval"
}
]
}Send this as a complete replacement to:
PUT /v1/agents/{agent_id}/toolsThe engine applies the same ownership, approval, durability, guardrail, audit, and result-size controls as built-in connection tools.
Idempotency behavior
External tools are retry-safe only when the server's tool metadata declares
idempotentHint. Deeplinq propagates a stable run-derived idempotency key as
the JSON-RPC request ID and _meta.
A missing declaration fails closed for ambiguous retries. Text content blocks are supported; other MCP result content types are not currently part of the shipped contract.
Administration
GET /v1/mcp-servers
GET /v1/mcp-servers/{id}
DELETE /v1/mcp-servers/{id}
POST /v1/mcp-servers/{id}/sync-tools
POST /v1/mcp-servers/{id}/attachDeleting or disabling a server makes its tools unavailable to runs. A dropped tool cannot execute merely because an older agent grant still names it.