Skip to main content
Glama

capy-fleet

An MCP server for Capy. Lets Claude Code, Cursor, Codex, or any other MCP client delegate work to Capy's cloud agents and wait for the results without you leaving the editor.

Your local agent is smart, but there's only one of it. This gives it a workforce.

you:  here are 8 bugs, farm them out
      -> capy_delegate x8
      -> capy_wait (all 8)
      -> capy_diff on each
      8 diffs come back, you review them in one place

Not affiliated with Capy. I built it because I wanted it.

Install

Not on npm yet. For now, clone and build:

git clone https://github.com/Takumixbt/capy-fleet.git
cd capy-fleet
npm install
npm run build

You'll need an API token from capy.ai/settings/tokens. It starts with capy_.

Claude Code

claude mcp add capy-fleet --env CAPY_API_KEY=capy_xxx -- node /absolute/path/to/capy-fleet/dist/index.js

Cursor

~/.cursor/mcp.json:

{
  "mcpServers": {
    "capy-fleet": {
      "command": "node",
      "args": ["/absolute/path/to/capy-fleet/dist/index.js"],
      "env": {
        "CAPY_API_KEY": "capy_xxx",
        "CAPY_PROJECT_ID": "proj_xxx"
      }
    }
  }
}

Windsurf uses the same shape in ~/.codeium/windsurf/mcp_config.json.

Codex

~/.codex/config.toml:

[mcp_servers.capy-fleet]
command = "node"
args = ["/absolute/path/to/capy-fleet/dist/index.js"]
env = { CAPY_API_KEY = "capy_xxx", CAPY_PROJECT_ID = "proj_xxx" }

Setting CAPY_PROJECT_ID is optional but saves you passing a project id on every call. Run capy_projects once to find yours.

Related MCP server: agent-comm

Tools

Tool

What it does

capy_delegate

Start an agent on a piece of work. Call it N times for N parallel agents.

capy_wait

Block until threads finish. Takes a list, so you can wait on the whole batch.

capy_status

One-shot check on a thread.

capy_list

See the whole fleet. Filter by status, tag, PR state, or free text.

capy_diff

Read the code an agent wrote.

capy_messages

Read the conversation, including the agent's own summary of what it did.

capy_message

Steer a running agent, or answer a question it asked.

capy_open_pr

Ask an agent to commit and open a PR.

capy_stop

Kill a thread that's going the wrong way.

capy_projects

List projects and their repos.

capy_models

List available models and which can act as Captain.

capy_usage

What your agents cost, split by LLM and VM, broken down by user and thread.

Things that will confuse you if nobody tells you

Threads spawn tasks, and diffs belong to tasks. You delegate to a thread and get back a thread id, but capy_diff wants a task id. Task ids show up in the thread's task list, which capy_status and capy_wait both print. This mirrors how Capy's API actually works rather than papering over it.

There is no PR endpoint. Capy's API can't open a pull request directly. capy_open_pr sends the agent a message asking it to do it, which means the PR shows up a bit after the call returns, not during it. Run capy_wait after and read the URL off the result.

No streaming, no webhooks. The API is poll-only, so capy_wait polls with backoff (3s, growing to 15s). It returns early if a thread gets blocked on an auth or permission gate, because sitting there waiting on something that needs a human is useless. If it times out, nothing is lost. The agents keep running on Capy's side and you just call capy_wait again with the same ids.

Tasks are read-only over the API. Older unofficial Capy wrappers used POST /tasks endpoints that no longer work. Everything here goes through threads, which is the supported path.

Not burning your credits by accident

Delegating spends real money, and an LLM in a loop can delegate a lot.

  • CAPY_FLEET_MAX_DELEGATIONS caps how many threads one server process will start. Defaults to 25. Set it to 0 if you really want it uncapped.

  • CAPY_FLEET_READONLY=1 registers only the read tools. Handy if you want an agent that can watch the fleet but not spend anything.

  • capy_diff truncates to a byte budget instead of dumping a 40k-line patch into your context. Use stats_only first, then pull specific paths.

Config reference

Variable

Required

Default

CAPY_API_KEY

yes

Token from capy.ai/settings/tokens

CAPY_PROJECT_ID

no

Default project, so you can skip project_id

CAPY_BASE_URL

no

https://capy.ai/api

Override the API host

CAPY_FLEET_MAX_DELEGATIONS

no

25

Per-process delegation cap, 0 for unlimited

CAPY_FLEET_READONLY

no

0

Set to 1 to hide the write tools

Development

npm run build     # compile
npm run watch     # compile on change
npm run smoke     # start the server over stdio, check every tool registers

The smoke test uses a deliberately invalid token, so the only network call it makes is one that's supposed to come back 401. It's checking that the tools register and that errors come back readable, not that your account works.

Types in src/types.ts are transcribed from Capy's published OpenAPI document. If Capy ships changes, that's the file to update first.

License

MIT

Available Tools

12 tools
capy_delegateDelegate work to a Capy agentA

Start a new Capy agent thread in the cloud to do a piece of engineering work. The agent runs in its own isolated VM with the project's repos checked out, and works independently of this conversation. Call this once per independent piece of work: calling it several times gives you several agents running genuinely in parallel.

Write the prompt the way you would brief a competent engineer who cannot ask you follow-up questions: state the goal, the acceptance criteria, and any constraint that is not obvious from the code.

Returns a thread id. Use capy_wait to block until the work is done, or capy_status to poll. Note that starting a thread consumes Capy credits.

Inputs: prompt (required), tags, model, repos, +7 more.

capy_diffRead the code a Capy agent wroteA
Read-only

Get the diff a Capy task produced, so you can review the work without leaving this conversation. Task ids come from capy_status, capy_wait, or capy_list, which list the tasks belonging to each thread.

Large diffs are truncated to stay within a token budget. Use stats_only to see just the file list and line counts first, then request specific paths.

Inputs: task_id (required), mode, paths, max_bytes, +1 more.

capy_listList Capy threadsA
Read-only

List agent threads in a project, newest first. Use this to see the whole fleet at once: what is still running, what is finished and waiting for review, and what has opened pull requests. Filter by status, tag, PR state, or a free-text query.

Inputs: tag, limit, query, cursor, +4 more.

capy_messageSend a message to a running Capy threadA

Send a follow-up instruction into an existing Capy thread: steer it, answer a question it asked, correct its approach, or ask it to do more work. This is also how you get the agent to open a pull request, since the Capy API has no PR endpoint of its own.

Use mode "interrupt" to cut into work in progress, or "queue" to have the message picked up when the current turn finishes.

Inputs: message (required), thread_id (required), mode, model, +2 more.

capy_messagesRead a Capy thread's conversationA
Read-only

Read the message history of a Capy thread: what you asked, and what the agent said back. Use this to get the agent's own summary of what it did, its reasoning, or the question it is waiting on you to answer.

Inputs: thread_id (required), limit, cursor.

capy_modelsList available Capy modelsA
Read-only

List the models available for delegation, with their provider and whether each can act as the Captain (planner) agent. Useful when you want to deliberately spread a batch of parallel work across different models, or pick a cheaper one for simple tasks.

Inputs: no named parameters.

capy_open_prAsk a Capy thread to open a pull requestA

Ask the agent in a thread to commit its work and open a pull request, then report any PRs on the thread.

This is a convenience wrapper around capy_message: the Capy API has no endpoint that creates a PR directly, so the agent is instructed to do it. The PR will not exist the instant this returns. Call capy_wait or capy_status afterwards to pick up the PR URL.

Inputs: thread_id (required), instructions.

capy_projectsList Capy projectsA
Read-only

List the Capy projects this API token can reach, with their ids and connected repos. Call this first if you do not know which project to delegate into.

Inputs: limit, cursor.

capy_statusCheck a Capy threadA
Read-only

Get the current state of one Capy agent thread: whether it is running, what it is waiting on, whether it is blocked on a human, its tasks, and any pull requests it has opened. This is a one-shot check that returns immediately. To block until the work is finished, use capy_wait instead.

Inputs: thread_id (required), verbose.

capy_stopStop a running Capy threadA
DestructiveIdempotent

Stop a Capy agent thread that is currently running. Use this to cancel work that is going the wrong way, or to stop a thread that is burning credits on the wrong problem. Work already committed by the agent is not undone.

Inputs: thread_id (required).

capy_usageCheck Capy spendA
Read-only

Report what your Capy agents have cost over a date range, split into LLM and VM dollars, broken down by user and by thread. Use this to answer 'what did that fleet cost me'.

Requires your organization id, which the Capy API does not expose a listing endpoint for: take it from the Capy web dashboard.

Inputs: org_id (required), to, from, page, +4 more.

capy_waitWait for Capy agents to finishA
Read-onlyIdempotent

Block until one or more Capy threads finish, then report what happened. This is what turns a fleet of background agents into something you can use inside a single conversation: delegate several pieces of work, then wait for all of them here.

The Capy API has no streaming or push notifications, so this polls with backoff. It returns early, without an error, if a thread becomes blocked on a human (an auth or permission gate), so you never sit waiting on something that cannot progress.

If the timeout is reached the result says so and the threads keep running on Capy's side: just call this tool again with the same ids to keep waiting.

Inputs: thread_ids (required), wait_for, timeout_seconds.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 12 tools

    Disambiguation5/5

    Each tool has a distinct purpose with clear boundaries. For example, capy_status checks state one-shot while capy_wait blocks until completion, and capy_messages reads history while capy_message sends a message. No overlapping functionalities.

    Naming Consistency5/5

    All tools follow the consistent pattern 'capy_<noun_or_verb>', all lowercase with underscores. The naming is predictable and well-structured.

    Tool Count5/5

    12 tools cover the full range of operations for managing Capy fleet agents: delegation, monitoring, messaging, PR handling, cost tracking, and listing. The count feels well-scoped without being excessive or too thin.

    Completeness5/5

    The tool set covers the complete lifecycle: delegate (create), status/list/diff/messages (read), message (update), stop (delete), plus blocking wait and PR creation. No obvious gaps for the domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      An MCP server that enables developers to summon AI development team agents directly from their IDE to help with tasks like PR reviews, security evaluation, and CI/CD deployment setup.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server that enables AI coding agents to communicate, share state, and coordinate work in real time via MCP tools or REST API.
      84 npm
      10
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      MCP server that gives AI coding assistants persistent memory, structural code graph analysis, and safe multi-agent coordination, enabling them to answer architectural questions, track decisions across sessions, and coordinate safely in multi-agent workflows.
      39
      4
      MIT