Skip to content

API reference

API: MCP servers

Markdown version

MethodPathWhat it doesScope
GET/v1/mcp-serversRemote MCP servers your agents may use, with their tools and how each is classifiedagents:read
POST/v1/mcp-serversConnect a remote MCP server (Streamable HTTP, https), optionally sending an organization secret in a header; its tools are discovered (web app only)security:write
DELETE/v1/mcp-servers/:idDisconnect an MCP serversecurity:write
POST/v1/mcp-servers/:id/discoverRead the server's tools again (new tools start as writes that need a person)security:write
PATCH/v1/mcp-servers/:id/tools/:toolClassify a tool (read: agents may call it through mcp.read without review) or turn it off (web app only)security:write

Examples

GET /v1/mcp-servers

Remote MCP servers your agents may use, with their tools and how each is classified

curl -s "https://api.closefinch.com/v1/mcp-servers" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/mcp-servers`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

DELETE /v1/mcp-servers/$ID

Disconnect an MCP server

curl -s -X DELETE "https://api.closefinch.com/v1/mcp-servers/$ID" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/mcp-servers/${id}`, {
  method: "DELETE",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

POST /v1/mcp-servers/$ID/discover

Read the server's tools again (new tools start as writes that need a person)

curl -s -X POST "https://api.closefinch.com/v1/mcp-servers/$ID/discover" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/mcp-servers/${id}/discover`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

Request and response schemas: https://www.closefinch.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.

Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.