Closedloop.ai
MCP Server

MCP Server Overview

Connect AI agents to Closedloop using the Model Context Protocol

What is the Closedloop MCP Server?

The Closedloop MCP server exposes the Closedloop platform to AI agents through the Model Context Protocol. Any MCP-compatible client, such as Claude Code, Claude Desktop, Cursor, or your own toolchain, can connect and work with projects, documents, tags, artifact links, agent sessions, and more.

The server calls the Closedloop REST API on your behalf, as the user who owns the API key you connect with. Everything a tool returns is scoped to that user's organization.

Endpoint and transport

URLhttps://mcp.closedloop.ai/mcp
TransportStreamable HTTP. Send JSON-RPC as POST with Content-Type: application/json.
SessionsThe server assigns an Mcp-Session-Id on initialize; send it on later requests, and DELETE /mcp with it to end the session.
Server-sent eventsNot offered. GET /mcp answers 405.
Request sizeBodies over 1 MiB are refused with 413 by default.

Standard MCP clients handle sessions for you. The server also publishes a server card at https://mcp.closedloop.ai/.well-known/mcp.json listing its transport, the protocol versions it negotiates, and its tool names.

Authentication

Every request to /mcp needs a Bearer token. The server accepts two kinds:

  • A Closedloop API key (sk_live_...), sent directly as Authorization: Bearer sk_live_....
  • An OAuth access token (mcp_at_...) that the server issues in exchange for your API key.

Either way, the credential underneath is an API key. To create one, open Settings in the web app or the Desktop app, choose API Keys under Labs, then Create key. The secret is shown once, when you create it. See Authentication for how keys and scopes work.

The server is its own OAuth 2.1 authorization server. A request without a token gets 401 with a WWW-Authenticate header pointing to /.well-known/oauth-protected-resource, from which an OAuth-capable client discovers the rest:

EndpointPurpose
/.well-known/oauth-authorization-serverAuthorization server metadata
/oauth/registerDynamic client registration
/oauth/authorizeAuthorization page, where you enter your API key
/oauth/tokenToken endpoint
  • The authorization code flow requires PKCE with S256.
  • Loopback redirect URIs (localhost, 127.0.0.1, [::1], any port) are always accepted. Any other redirect URI must be on the server's allowlist.
  • The client_credentials grant is also supported: pass your API key as client_secret.
  • By default an access token lasts one hour and a refresh token 30 days.
  • The scope you request is intersected with your key's scopes. Omit it to receive all of the key's scopes; a request that overlaps none of them is refused with invalid_scope.

Connect Claude Code

With OAuth:

  1. Run /mcp in Claude Code and add a server named closedloop with the URL https://mcp.closedloop.ai/mcp.
  2. Choose Authenticate (or Re-authenticate when reconnecting).
  3. In the browser, on the Authorize MCP Access page, enter your API key and choose Authorize.
  4. Confirm the /mcp panel shows the server as connected and authenticated, then try a prompt such as list my projects.

With the API key in a header instead:

claude mcp add --transport http closedloop https://mcp.closedloop.ai/mcp \
  --header "Authorization: Bearer sk_live_your_api_key_here"

Other clients follow the same pattern: give them the URL, then either complete the OAuth flow or configure the Authorization header.

Which tools a session gets

Each tool requires one or more scopes, and the server registers a tool for a session only when the session's grant covers all of them. A session with fewer scopes sees fewer tools; it is not offered tools that would fail.

ScopeTools that need it
readEvery list, get, search, and status tool, plus tag-artifact and untag-artifact
writeTools that create or update, including tag-artifact
deletedelete-attachment, delete-artifact-link, untag-artifact

Each tool page states the exact scopes a tool requires. ping requires none.

On connect, the server also sends instructions that describe the entity hierarchy, status lifecycles, slug conventions, and how to use the webUrl field in responses.

Errors

A tool that fails returns an MCP tool result with isError: true. Its text holds a title, a description, remediation steps when there are any, and a short technical-details block limited to the error code, message, and timestamp.

Tool index

The server registers 42 tools.

GroupTools
Documentslist-documents, get-document, get-document-content, create-document, update-document
Document versionscreate-document-version, list-document-versions
Attachmentslist-attachments, upload-attachment, create-inline-image-attachment, download-attachment, delete-attachment
Comment threadscreate-document-thread, get-document-comments
Projectslist-projects, get-project, list-teams, create-project, update-project, move-artifact
Artifact linkslist-artifact-links, create-artifact-link, delete-artifact-link
Branch artifactscreate_branch_artifact
Tagslist-tags, tag-artifact, untag-artifact
Searchsearch
Usersget-me, list-users
Connection and integration statusping, get-github-status, get-linear-status, get-google-status
Audit ledgerverify-audit-ledger
Agent sessionslist-agent-sessions, get-agent-session-transcript, get-agent-session-usage, get-agent-session-analytics, list-session-comments
Agent componentslist-agent-components, get-agent-component

On this page