capy-mcp-server 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yaz Caleb
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,116 @@
1
- # Temporary Holding Version
1
+ <img src="https://raw.githubusercontent.com/yazcaleb/capy-acp/main/assets/icon.svg" width="64" height="64" alt="">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ # capy-mcp-server
4
+
5
+ An MCP server that lets your coding agent hand work to [Capy](https://capy.ai). Claude Code, Codex, Cursor, Grok Build,
6
+ Grok Bot and Conductor's agents can start a Capy thread, wait for it with live progress, answer its questions, and come
7
+ back for the reply and the pull request.
8
+
9
+ Your agent keeps working in your folder while Capy works in its own git worktree. Use it for the work that is
10
+ independent, long, parallel, or that should end in a pull request.
11
+
12
+ capy-mcp-server is an independent project. Capy did not make it.
13
+
14
+ ## Add it to your agent
15
+
16
+ You need a Capy API key from [capy.ai/settings/api](https://capy.ai/settings/api). Save it once on this computer:
17
+
18
+ ```bash
19
+ npx -y capy-mcp-server --setup
20
+ ```
21
+
22
+ Then add the server. The command that the agent runs is `npx -y capy-mcp-server`.
23
+
24
+ | Agent | How to add it |
25
+ |---|---|
26
+ | Claude Code | `claude mcp add capy -s user -- npx -y capy-mcp-server` |
27
+ | Codex | `codex mcp add capy -- npx -y capy-mcp-server` |
28
+ | Cursor | Add the JSON below to `~/.cursor/mcp.json`, or to `.cursor/mcp.json` in a repository |
29
+ | Grok Build | `grok mcp add capy -- npx -y capy-mcp-server` (Grok Build also reads Claude Code's MCP settings) |
30
+ | Conductor | Add it for Claude Code or Codex as above. Conductor's agents load those settings |
31
+ | Grok Bot | See [Agents in the cloud](#agents-in-the-cloud) |
32
+
33
+ ```json
34
+ {
35
+ "mcpServers": {
36
+ "capy": { "command": "npx", "args": ["-y", "capy-mcp-server"] }
37
+ }
38
+ }
39
+ ```
40
+
41
+ Then ask your agent, for example: "Have Capy add retry with backoff to the webhook sender and open a pull request.
42
+ Keep working on the parser meanwhile."
43
+
44
+ ## Tools
45
+
46
+ | Tool | What it does |
47
+ |---|---|
48
+ | `start_thread` | Starts a Capy thread for a task. Returns at once with the thread id. |
49
+ | `wait_for_thread` | Follows the thread until the run ends, Capy needs a person, or the timeout (up to 10 minutes) passes. Sends progress while it waits. A timeout never stops the thread. |
50
+ | `get_thread` | The thread now: status, last reply, pull requests, questions, credits. |
51
+ | `send_message` | An answer to Capy's question, or more work. It waits for the current run unless `interrupt` is true. |
52
+ | `stop_thread` | Stops the current run. The thread stays, and a new message continues it. |
53
+ | `list_threads` | Recent threads, newest first. |
54
+ | `list_models` | The models of your Capy account, with how each one is billed. |
55
+
56
+ Each result has text for the model and the same data as `structuredContent`. Each error also has a `nextAction`, so the
57
+ agent knows what to do next without guessing:
58
+
59
+ | `nextAction.kind` | The agent should |
60
+ |---|---|
61
+ | `run_command` | Run the exact `command` |
62
+ | `ask_human` | Ask the person the exact question in `say` |
63
+ | `retry` | Wait `afterMs` milliseconds, then call again |
64
+ | `use_option` | Call again with another value for `option` |
65
+
66
+ ## Where Capy works
67
+
68
+ | `where` | Where | Your files | Cost |
69
+ |---|---|---|---|
70
+ | `auto` (default), `worktree` | A new git worktree on a Capy device: this computer's, or the one in `device` / `CAPY_DEVICE_ID` | Not changed | No machine time |
71
+ | `here` | Your folder, edited in place. Only when the person asks | Changed | No machine time |
72
+ | `cloud` | A Capy cloud machine, with `machineSize` from small to bigguy | Not changed | Machine time costs Capy credits |
73
+
74
+ A Capy device is a computer that runs the [Capy desktop app](https://docs.capy.ai/desktop) or the headless
75
+ [`capy dock`](https://docs.capy.ai/dock). On a computer without one, `npx -y capy-mcp-server --setup` can install and
76
+ pair `capy dock` for you. You approve the pairing on capy.ai once, then choose Yes in the terminal, as Capy designed it.
77
+
78
+ The server never starts a cloud machine unless the call asks for `where: "cloud"`. Models run on your connected
79
+ subscription or your Capy credits, as your Capy settings say. Without a `model`, Capy uses your account's default model.
80
+
81
+ ## Agents in the cloud
82
+
83
+ Grok Bot and other hosted agents run the server on their own computer, which has no Capy device and no clone of your
84
+ repository. Point the server at a device that you already have, such as a server that runs `capy dock`:
85
+
86
+ 1. On the computer with the device, run `npx -y capy-mcp-server --setup`. It prints the device id:
87
+ `Capy device on this computer: device_…`. (`npx -y capy-cli doctor` prints it too.)
88
+ 2. Add the server to the hosted agent with these environment variables:
89
+ - `CAPY_API_KEY`: a key for a Capy [service user](https://docs.capy.ai/admin/members), not your personal key
90
+ - `CAPY_DEVICE_ID`: the device id from step 1
91
+ 3. Pass `project` (and `repo`, if the project has more than one) to `start_thread`.
92
+
93
+ Capy then makes a worktree from GitHub on that device, and the thread costs no machine time. In Grok Bot, ask in chat:
94
+ "Add a custom MCP server called capy that runs `npx -y capy-mcp-server`", then give it the two variables.
95
+
96
+ ## Settings
97
+
98
+ | Variable | Default | What it does |
99
+ |---|---|---|
100
+ | `CAPY_API_KEY` | the key saved by `--setup` | The Capy API key. capy-acp, capy-mcp-server and capy-cli share the saved key |
101
+ | `CAPY_DEVICE_ID` | this computer's device | The Capy device to run on |
102
+ | `CAPY_API_URL` | `https://api.capy.ai/api/v1` | The Capy API |
103
+
104
+ ## Limits
105
+
106
+ - Capy's stream does not give commands or file paths, so progress says `ran bash (1.2 s)`, not the command.
107
+ - The server cannot link a folder to Capy or pair a device by itself. Capy's API has no endpoint for either. The
108
+ error then tells the agent what to ask the person.
109
+ - There is no hosted (HTTP) version, so Grok on grok.com cannot use it.
110
+
111
+ ## Related
112
+
113
+ - [capy-acp](../acp#readme): Capy in editors that speak the Agent Client Protocol (T3 Code, Zed, JetBrains).
114
+ - [capy-cli](../cli#readme): Capy threads from a terminal or a CI job.
115
+
116
+ MIT license.