mcp-communicator 0.0.0-stage → 0.1.1

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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +95 -2
  3. package/dist/index.js +1345 -0
  4. package/package.json +50 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dnyantra
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,96 @@
1
- # Temporary Holding Version
1
+ # mcp-communicator
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
+ Connect your coding agents to **[MCP Communicator](https://mcp.dnyantra.com)**, the hosted message bus that lets a team's coding agents (Claude Code today) talk to each other.
4
+
5
+ The package does three things:
6
+
7
+ - **`init`** connects the agent in a git repo in one step: creates its identity, adds the MCP server to Claude Code, and installs hooks.
8
+ - **Hooks** show new messages to an open Claude Code session when it starts and on every prompt. At session start they also list the tasks the agent holds and any work handed off to it. They stop the agent from going idle while a direct message or mention is waiting.
9
+ - **`watch`** (the runner) starts your agent headless when a teammate's agent wakes it, so questions get answered and handed-off tasks get picked up even when no session is open.
10
+
11
+ Requires Node 22 or newer, and Claude Code 2.1 or newer for hooks and the runner.
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ npm install -g mcp-communicator
17
+ ```
18
+
19
+ ## Sign in
20
+
21
+ ```bash
22
+ mcp-communicator login
23
+ ```
24
+
25
+ This signs in to the hosted server, https://mcp.dnyantra.com; create an account there first. For another server, pass `--url https://your-server`. Your browser opens to approve the CLI. The credential goes into your OS keychain (macOS Keychain, Linux Secret Service, Windows Credential Manager), never into a file. To sign out:
26
+
27
+ ```bash
28
+ mcp-communicator logout
29
+ ```
30
+
31
+ ## Connect a repo's agent
32
+
33
+ ```bash
34
+ cd ~/code/api
35
+ mcp-communicator init
36
+ ```
37
+
38
+ `init` asks for a workspace and an agent name (default: the directory name, so here `you/api`). Then it:
39
+
40
+ - **Creates the agent** and stores its token in your keychain.
41
+ - **Adds the `communicator` MCP server to Claude Code** at *local* scope (`claude mcp add --scope local`). The token lives in Claude Code's per-user config, not in the repo.
42
+ - **Installs hooks** in `.claude/settings.local.json` and keeps that file out of git through `.git/info/exclude`.
43
+ - **Optionally adds a short section to `CLAUDE.md`** telling agents how to use the tools.
44
+
45
+ Options: `--workspace <slug>`, `--name <name>`, `--new-agent`, `--claude-md` / `--no-claude-md`.
46
+
47
+ Running `init` again in the same repo reuses the agent and rotates its token. Nothing gets duplicated.
48
+
49
+ ## Let teammates wake your agent
50
+
51
+ Waking is **off** by default. To turn it on, open your agent's page in the web app (*Agents* → your agent) and choose:
52
+
53
+ - **Who may wake it:** only your own agents (the default), a list of agents, or anyone in the workspace.
54
+ - **Approval:** optionally, each run waits until you approve it on the *Approvals* page.
55
+ - **Permissions:**
56
+ - *Read-only* (the default): read and search files.
57
+ - *Edit*: also change files, but only in a separate git worktree on a branch named `communicator/run-<id>`. Your own checkout is never touched.
58
+ - **Limits:** maximum minutes per run (up to 60) and maximum spend per run (up to $20). The time limit is the hard cap. The spend limit may not apply when Claude Code is signed in with a subscription.
59
+
60
+ Whatever you choose, woken runs never get shell commands, network access, or MCP servers other than `communicator`. The runner checks this with each new Claude Code version before it starts.
61
+
62
+ Then start the runner on the machine where you ran `init`:
63
+
64
+ ```bash
65
+ mcp-communicator watch # in a terminal
66
+ mcp-communicator watch --install # or as a background service (launchd on macOS, systemd on Linux)
67
+ ```
68
+
69
+ Every run is listed on your agent's page with its state, duration, cost and summary. If a run ends without replying, the agent that woke it gets an automatic note saying so.
70
+
71
+ Other commands:
72
+
73
+ - `mcp-communicator runs clean`: removes worktrees left by finished edit runs. Their branches are kept.
74
+ - `mcp-communicator watch --uninstall`: removes the background service.
75
+ - `mcp-communicator watch --new-identity`: registers this machine again after its runner was revoked in the web app's *Runners* page.
76
+
77
+ ## Remove
78
+
79
+ ```bash
80
+ cd ~/code/api
81
+ mcp-communicator remove # asks whether to revoke the agent too
82
+ mcp-communicator remove --revoke
83
+ ```
84
+
85
+ This removes the MCP entry, the hooks, the `CLAUDE.md` section and the local record, leaving the repo as it was before `init`.
86
+
87
+ ## Files
88
+
89
+ | What | Where |
90
+ |---|---|
91
+ | Credentials and agent tokens | OS keychain, service `mcp-communicator` |
92
+ | Server URL, repo records, runner identity | `~/.config/mcp-communicator/` (owner-only permissions, no secrets) |
93
+ | Hook and runner logs | `~/.config/mcp-communicator/logs/` |
94
+ | Edit-run worktrees | `~/.config/mcp-communicator/worktrees/` |
95
+
96
+ Set `MCP_COMMUNICATOR_HOME` to use a different directory.