Closedloop.ai

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 agent — Claude Code, Claude Desktop, Cursor, or your own toolchain — can connect to the server and interact with projects, documents, loops, and more using natural language.

The server is hosted at https://mcp.closedloop.ai/mcp and authenticates via OAuth using your Closedloop API key.

Connecting an AI Agent

The steps below apply to Claude Code CLI. Other MCP clients follow the same pattern: provide the server URL and complete the OAuth flow.

  1. Run /mcp in the Claude Code CLI.
  2. Add a new server:
    • Name: closedloop
    • URL: https://mcp.closedloop.ai/mcp
  3. Choose Authenticate (or Re-authenticate if reconnecting).
  4. Complete the browser OAuth flow and enter your Closedloop API key (sk_live_...).
  5. Confirm the /mcp panel shows Status: connected and Auth: authenticated.
  6. Test with a prompt such as: list my projects.

Entity Hierarchy

All work in Closedloop is organized as projects containing documents:

Project (PRO-*)
  └── Document (PRD-* | PLN-* | FEA-*)
EntitySlug PatternDescription
ProjectPRO-*Top-level container — typically a week or theme (e.g. PRO-25)
PRDPRD-*Product Requirements Document
Implementation PlanPLN-*Technical implementation plan
FeatureFEA-*A discrete deliverable or feature spec
LoopUUID onlyAn automation run tracking work execution

Tools that accept an entity reference accept both the UUID and the human-readable slug. Pass the slug verbatim — the API resolves it server-side.

Available Tools

The MCP server provides tools organized into the following categories. It also registers a ping connectivity check used when verifying a new connection.

Document Management

ToolDescription
list-documentsList PRDs, implementation plans, and features with optional filters
get-documentFetch a single document by UUID or slug (e.g. FEA-42)
get-document-contentRetrieve an exact latest or historical document-version body through UTF-8 chunks of at most 64 KiB
create-documentCreate a new PRD, implementation plan, or feature
update-documentUpdate title, status, project, or assignee
create-document-versionAppend a new content version, optionally creating inline image attachments in the same call
list-document-versionsList saved content versions for a document
list-templatesList internal document blueprints (referenced by UUID)
upload-attachmentRequest a presigned upload URL for a document attachment
create-inline-image-attachmentCreate an inline image attachment from bounded base64 image bytes
list-attachmentsList file attachments on a document
download-attachmentGet a presigned download URL for a file attachment
delete-attachmentDelete an attachment you created from a document
ToolDescription
list-artifact-linksList typed relationships for an artifact, with optional tree traversal
create-artifact-linkCreate a typed relationship between two artifacts
delete-artifact-linkRemove one typed relationship by its link id (delete scope required)
create_branch_artifactCreate or update a branch artifact for a project repository (write scope required)

Loops

ToolDescription
list-loopsList automation runs with optional filters by document, status, project, or command
get-loopFetch a single loop by UUID
create-loopCreate a manual loop to track locally-driven work
add-loop-eventPost a progress update to a running manual loop
complete-loopMark a manual loop as COMPLETED with PR URL, branch, and summary
cancel-loopCancel a running manual loop (work abandoned, no failure)
fail-loopMark a manual loop as FAILED with an error message

Projects

ToolDescription
list-projectsList projects available to the authenticated user
get-projectFetch a single project by UUID or slug
list-teamsList the organization's teams — the source of the teamId a project requires
create-projectCreate a new project
update-projectUpdate a project's metadata or status
move-artifactReorder a root artifact within a project's stack rank (write scope required)

Tags

ToolDescription
list-tagsList the organization's tags
tag-artifactApply a named tag to a document, creating the tag if it does not exist (write scope required)
untag-artifactRemove a named tag from a document (delete scope required)
ToolDescription
searchFree-text search across projects and documents — matches documents by title, slug, type, and tag, and projects by name, slug, and description

Comment Threads

ToolDescription
create-document-threadCreate an anchored or artifact-level comment thread on a document
get-document-commentsRetrieve comment threads and their replies for a document

User and Status

ToolDescription
get-meGet the authenticated user's profile
list-usersList organization users available for assignment or lookup
get-github-statusCheck the GitHub integration connection status
get-google-statusCheck the Google integration connection status
get-linear-statusCheck the Linear integration connection status

Audit Ledger

ToolDescription
verify-audit-ledgerRecompute your organization's tamper-evident audit chain and return its head

verify-audit-ledger takes no input — the organization is resolved from the API key you authenticated with, so a caller can only ever verify its own ledger. It returns JSON:

{
  "ok": true,
  "head": {
    "seq": "42",
    "hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
  }
}

head is the highest entry in the chain: seq is a decimal string (the sequence number is a 64-bit integer that does not survive JSON) and hash is its 64-character hex chain hash. An organization with no entries yet returns the empty sentinel — seq "0" and a hash of 64 zeros.

When verification fails the tool returns ok: false alongside brokenAtSeq — the seq of the first row that fails a check, which is not necessarily a row whose own hash fails to recompute — and a machine-readable reason, one of:

reasonThe row's failing check
sequence_gapIts seq is not the next one expected — the chain is not gap-free and strictly increasing from 1
broken_linkIts prevHash does not equal the previous row's hash
hash_mismatchIts stored hash does not match a recompute of its fields

The three run in that order per row, so a sequence_gap or broken_link is reported against a row whose own contents may recompute perfectly — the break is in the chain, not in that row. head is still included, read separately so you can see how far the chain has advanced past the break.

Agent Sessions

The underlying API requires agent-session monitoring access for your account; otherwise calls return 403.

ToolDescription
list-agent-sessionsList agent sessions — one AI agent run each — with harness, model, repository, token usage, cost, and status
get-agent-session-transcriptGet short-lived signed URLs to an agent session's archived transcript files (the raw JSONL trajectory)
get-agent-session-usageAggregated agent-session usage: total sessions, token counts, estimated cost, and breakdowns by user, model, harness, and repository
get-agent-session-analyticsAgent-session analytics: breakdowns by tool, agent type, repository, and project

Agent Components

ToolDescription
list-agent-componentsList the org's registry of harness components (subagents, skills, commands, MCP servers, hooks, plugins, and more) with usage metrics, ownership, and provenance
get-agent-componentFetch one agent component by slug — definition metadata, content-hash version history, per-device provenance, and the sessions that invoked it

Status Lifecycles

Documents and Features have separate status vocabularies — use the one that matches the artifact type. The server rejects a status that doesn't belong to the target artifact's vocabulary.

Documents (PRD, Plan) — an authoring / approval lifecycle:

DRAFT → IN_REVIEW → APPROVED

APPROVED is sign-off (terminal). Use CHANGES_REQUESTED when a review asks for rework (return to IN_REVIEW after), EXECUTED for Implementation Plans that have been executed, and OBSOLETE for deprecated documents.

Features (FEA) — a delivery lifecycle:

TRIAGE → BACKLOG → TODO → IN_PROGRESS → IN_REVIEW → DONE

Update status as work progresses. For Features, agents should set IN_PROGRESS when starting work, IN_REVIEW when a PR is created, and DONE when merged; use BLOCKED when stuck and CANCELED for won't-do.

Next Steps

On this page