Tools
Connect Tool Server
Connect an MCP tool server that takes a token (or none). It is asked for its tools at once and every tool arrives off — switch each on with PATCH …/tools/{toolId}. A server that cannot be reached is still saved and answers 201 with status: "failed" and the reason in message, so you can fix it and sync. A server that signs in through a browser must be connected in the console. A build key may do this.
POST/agents/{id}/mcp-servers
Path parameters
- idstringrequired
- The agent's id (
ag_…).
Headers
- Katexs-Workspacestring
- Developers only: the customer workspace this request acts in — its
org_…id fromPOST /customers. Leave it out to act in your own workspace. Refused with404(Workspace not found.) when the id is unknown, is not one of your customers, or is not anorg_…id;410when that customer was deleted (restore it withPOST /customers/{id}/restoreuntil it is erased);403when the key belongs to one customer workspace (it cannot act as another);400when your workspace is not a developer workspace./customers/*andGET /customers/usageare your own workspace's and refuse the header with400: call them without it.
Request body
- namestringrequired
- Your name for it, 2 to 200 characters.
- urlstring (uri)required
- Its
https://address. It must be publicly reachable: private and internal addresses are refused. - transportstring
http(streamable HTTP) orsse. One of:http,sse. Default:http.- authHeaderNamestring
- The header to send the token in, e.g.
Authorization. Required whensecretis sent. - secretstring
- The header's value, e.g.
Bearer …. Write-only: sealed on arrival; responses say onlyhasSecret.
Example request
bash
curl -X POST "https://app.katexs.com/api/v1/agents/{id}/mcp-servers" \
-H "Authorization: Bearer $KATEXS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Inventory",
"url": "https://mcp.urbanloom.in/mcp",
"transport": "http",
"authHeaderName": "Authorization",
"secret": "Bearer ul_mcp_4Rt9…"
}'Responses
| Status | Description |
|---|---|
201 | Saved — check status to see whether discovery worked. |
400 | A field is wrong, or the server needs a browser sign-in. |
401 | The key is missing, wrong or revoked. The answer is always the same, whichever it is. |
403 | The key's access level (read-only or build) does not allow this request, the plan does not include it, or a customer's key named another workspace in Katexs-Workspace. code says which: key_scope_read, key_scope_build, workspace_header_forbidden, or forbidden. |
404 | The agent is not in this workspace. |
410 | The customer named in Katexs-Workspace was deleted. POST /customers/{id}/restore brings it back until its erase date. |
429 | Over a per-minute limit. Wait for Retry-After seconds. code and limit say which limit: rate_limit_resources (240 requests a minute for the workspace), rate_limit_family (2,400 across a developer's customers), rate_limit_calls, rate_limit_messages, rate_limit_codes, rate_limit_code_recipient, concurrent_calls or number_daily_limit. |
503 | A secret was sent and this deployment cannot store credentials. |
Response fields
- idstringrequired
- The server's id,
mcp_…. - namestringrequired
- Your name for it.
- urlstringrequired
- Its
https://address. - transportstringrequired
- How it is spoken to. One of:
http,sse. - signInstringrequired
tokenfor a server reached with a header you sent;browserfor one signed in through the console. One of:token,browser.- kindstringrequired
serverfor a tool server;storefor a store connection made in the console, whose tools are a fixed list. One of:server,store.- authHeaderNamestring | nullrequired
- The header the token is sent in.
- hasSecretbooleanrequired
- Whether a token is held. The token itself is never returned.
- statusstringrequired
connectedonce it answered with its tools;failedwhen it could not be reached (seelastError);pendingbefore the first answer.- lastErrorstring | nullrequired
- Why the last attempt failed.
- lastSyncedAtstring (date-time) | nullrequired
- When it last listed its tools.
- toolsobject[]required
- What it offers, by name.
- createdAtstring (date-time)required
- When it was connected.
- messagestring | nullrequired
- What happened — how many tools were found, or why it could not be reached.
201 response
{
"id": "mcp_5e1d2c7a-8b94-4f06-a3d1-2c9e7b5f0a18",
"name": "Inventory",
"url": "https://mcp.urbanloom.in/mcp",
"transport": "http",
"signIn": "token",
"kind": "server",
"authHeaderName": "Authorization",
"hasSecret": true,
"status": "connected",
"lastError": null,
"lastSyncedAt": "2026-10-06T10:22:31.402Z",
"tools": [
{
"id": "tool_a2c47e19-3b5d-4f60-8e91-7d0b2c6f4a35",
"name": "check_stock",
"description": "Stock on hand for a product SKU, by warehouse.",
"enabled": false
},
{
"id": "tool_c9e03b72-61f4-4a8d-b257-0e4d9a1c3f86",
"name": "find_order",
"description": "An order's status and courier tracking by order number.",
"enabled": false
},
{
"id": "tool_f1b8d6a4-2e7c-4935-a0d1-6c3e9b5f7a20",
"name": "list_collections",
"description": "The store's current collections.",
"enabled": false
}
],
"createdAt": "2026-10-06T10:22:29.918Z",
"message": "Found 3 tools. All start off."
}Last updated November 2026 · Found a problem? Email support@katexs.com
