You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(local-coord-mcp): wire into BoJ MCP bridge — end-to-end working
Integration of local-coord-mcp cartridge with the MCP bridge:
- mcp-bridge/lib/tools.js: add 6 coord_* tool definitions (register,
list_peers, send, receive, claim_task, status) with JSON schemas
- mcp-bridge/main.js: dispatch coord_* directly to 127.0.0.1:7745
with graceful unavailable fallback + hint
- mcp-bridge/lib/offline-menu.js: add local-coord-mcp to tier_ayo,
total 23→24
- TOPOLOGY.md: port 7745 + cartridge listing, 96→97 total
Also fixes two pre-existing bugs blocking the integration:
1. mcp-bridge/main.js: restore import statements stripped by f1fd38e.
The modularization commit split main.js into lib/ modules but a
follow-up removed the imports without inlining the functions,
leaving buildToolList/fetchHealth/etc. as undefined references.
The bridge has been broken since then; this commit restores the
imports matching the pre-f1fd38e state.
2. cartridges/local-coord-mcp/adapter/build.zig: update to Zig 0.15
ExecutableOptions API (use root_module, not root_source_file).
3. cartridges/local-coord-mcp/adapter/local_coord_adapter.zig:
discard the c_int return from boj_cartridge_init() — Zig 0.15
rejects ignored return values.
End-to-end verified:
- Adapter binds to 127.0.0.1:7745, direct curl returns success
- MCP bridge tools/list includes all 6 coord_* tools
- MCP bridge tools/call for coord_register dispatches to adapter
and returns success through the full JSON-RPC stack
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: mcp-bridge/lib/tools.js
+77Lines changed: 77 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -264,6 +264,83 @@ function buildToolList() {
264
264
},
265
265
});
266
266
267
+
// Local coordination (localhost multi-instance AI coordination — local-coord-mcp cartridge)
268
+
tools.push({
269
+
name: "coord_register",
270
+
description: "Register this AI instance as a coordination peer on localhost. Returns a hybrid peer ID (e.g. claude-7f3a) and a session token for all subsequent calls. Loopback-only, never exposed beyond 127.0.0.1.",
271
+
inputSchema: {
272
+
type: "object",
273
+
properties: {
274
+
client_kind: {type: "string",enum: ["claude","gemini","copilot","custom"],description: "Client type prefix for the peer ID"},
275
+
},
276
+
required: ["client_kind"],
277
+
},
278
+
});
279
+
280
+
tools.push({
281
+
name: "coord_list_peers",
282
+
description: "List all active AI instances registered on this machine — their peer IDs, client kinds, states, and current status.",
283
+
inputSchema: {
284
+
type: "object",
285
+
properties: {
286
+
token: {type: "string",description: "Session token from coord_register"},
287
+
},
288
+
required: ["token"],
289
+
},
290
+
});
291
+
292
+
tools.push({
293
+
name: "coord_send",
294
+
description: "Send a message to a specific peer (by peer ID) or broadcast to all peers (target '*'). Messages are queued in recipient inboxes.",
295
+
inputSchema: {
296
+
type: "object",
297
+
properties: {
298
+
token: {type: "string",description: "Session token from coord_register"},
299
+
target: {type: "string",description: "Peer ID to send to, or '*' for broadcast"},
description: "Receive the next message from this peer's inbox. Returns the message content and sender, or indicates empty inbox.",
309
+
inputSchema: {
310
+
type: "object",
311
+
properties: {
312
+
token: {type: "string",description: "Session token from coord_register"},
313
+
},
314
+
required: ["token"],
315
+
},
316
+
});
317
+
318
+
tools.push({
319
+
name: "coord_claim_task",
320
+
description: "Attempt to claim a task (mutex-style). If the task is unclaimed, this peer becomes the holder. If another peer holds it, returns the holder's peer ID. Idempotent if already held by caller. Use this to prevent two AI instances from duplicating work.",
321
+
inputSchema: {
322
+
type: "object",
323
+
properties: {
324
+
token: {type: "string",description: "Session token from coord_register"},
325
+
task: {type: "string",description: "Task identifier to claim (e.g. 'audit-boj-server')"},
326
+
},
327
+
required: ["token","task"],
328
+
},
329
+
});
330
+
331
+
tools.push({
332
+
name: "coord_status",
333
+
description: "Set this peer's current work status, visible to other peers via coord_list_peers.",
334
+
inputSchema: {
335
+
type: "object",
336
+
properties: {
337
+
token: {type: "string",description: "Session token from coord_register"},
338
+
status: {type: "string",description: "Current work status description"},
0 commit comments