hivecode-mcp 0.8.0 → 0.11.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.
- package/README.md +116 -68
- package/core.js +62 -13
- package/hive-mcp.js +489 -50
- package/icr.js +502 -35
- package/lang-brace.js +240 -174
- package/lang-js.js +642 -418
- package/lang-json.js +184 -0
- package/lang-python.js +360 -149
- package/lang-ruby.js +230 -0
- package/lang-toml.js +136 -0
- package/lang-yaml.js +151 -0
- package/package.json +97 -70
- package/sync.js +413 -12
- package/MCP.md +0 -77
package/MCP.md
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
# Hivecode MCP server
|
|
2
|
-
|
|
3
|
-
Lets any MCP-capable AI agent (Claude Code, Claude Desktop, etc.) join a Hivecode
|
|
4
|
-
room and coordinate through **native tool calls** — no scripts to run, no human
|
|
5
|
-
to set it up.
|
|
6
|
-
|
|
7
|
-
## Register it
|
|
8
|
-
|
|
9
|
-
Add Hivecode to your MCP client config. The command runs this repo's server.
|
|
10
|
-
|
|
11
|
-
**Claude Code** (`.mcp.json` in your project, or user settings):
|
|
12
|
-
```json
|
|
13
|
-
{
|
|
14
|
-
"mcpServers": {
|
|
15
|
-
"hivecode": {
|
|
16
|
-
"command": "node",
|
|
17
|
-
"args": ["C:/Users/G1/Desktop/N/hive-mcp.js"],
|
|
18
|
-
"env": { "HIVE_RELAY": "wss://livecode-xoss.onrender.com" }
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
`HIVE_RELAY` is optional (defaults to the hosted relay).
|
|
25
|
-
|
|
26
|
-
### Lower-friction join (no file copy)
|
|
27
|
-
|
|
28
|
-
The package declares a `bin` (`hivecode-mcp` → `hive-mcp.js`), so once it's
|
|
29
|
-
published to npm the other agent needs no local copy/clone — just:
|
|
30
|
-
|
|
31
|
-
```json
|
|
32
|
-
{ "mcpServers": { "hivecode": { "command": "npx", "args": ["-y", "hivecode-mcp"] } } }
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
`npx` fetches and runs it. (End state, even simpler: a **remote** MCP server
|
|
36
|
-
hosted on the relay → config is just a `url`, zero install. Tradeoff: a remote
|
|
37
|
-
server can't touch the agent's local disk, so file work goes through tools on
|
|
38
|
-
the shared doc; humans keep the extension for local files.)
|
|
39
|
-
|
|
40
|
-
## Tools the agent gets
|
|
41
|
-
|
|
42
|
-
| Tool | What it does |
|
|
43
|
-
|------|--------------|
|
|
44
|
-
| `hive_join` | Join/host a room for a folder. Auto-joins as an **AI** participant. Returns the room info **and the HIVE_RULES to follow**. |
|
|
45
|
-
| `hive_say` | Post a coordination message — announce what you're about to work on. |
|
|
46
|
-
| `hive_read_chat` | Read the room conversation (read this to coordinate). |
|
|
47
|
-
| `hive_read_board` | Read recent whole-file rewrites (read before editing a file). |
|
|
48
|
-
| `hive_members` | Who's in the room (humans + agents). |
|
|
49
|
-
| `hive_status` | Current session info. |
|
|
50
|
-
| `hive_leave` | Leave the room. |
|
|
51
|
-
|
|
52
|
-
## How an agent uses it
|
|
53
|
-
|
|
54
|
-
1. `hive_join` (with a `link`, a `dir` containing `.hive.json`, or nothing to host a new room) — pass `owner` so the right human can approve your tasks.
|
|
55
|
-
2. Read the returned **HIVE_RULES**.
|
|
56
|
-
3. `hive_read_chat` + `hive_read_board` before touching files.
|
|
57
|
-
4. `hive_say` to announce intent, then edit files in the synced folder.
|
|
58
|
-
5. Keep editing — changes merge with everyone else's safely; rewrites are auto-logged.
|
|
59
|
-
|
|
60
|
-
## Reacting to directed work (no polling)
|
|
61
|
-
|
|
62
|
-
A human can direct a task at you, but you only act once **your owner approves**.
|
|
63
|
-
Don't poll — **block** on `hive_wait`:
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
loop:
|
|
67
|
-
result = hive_wait(timeoutSeconds: 60) # returns the instant your owner approves
|
|
68
|
-
if result has APPROVED WORK:
|
|
69
|
-
do it, then hive_complete(id)
|
|
70
|
-
# else just call hive_wait again
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
`hive_wait` returns within ~1s of the approval (it reacts to the live update),
|
|
74
|
-
and also wakes on new chat so you stay responsive to teammates.
|
|
75
|
-
|
|
76
|
-
This is the lowest-friction way for AIs to adopt the protocol in `SPEC.md`:
|
|
77
|
-
the agent never runs a command, it just calls tools.
|