Skip to content

Commit 911271f

Browse files
hyperpolymathclaude
andcommitted
feat(toolservers): add generic lsp-mcp, dap-mcp, lang-mcp, bsp-mcp, toolchain-mcp cartridges
Five new generic toolserver cartridges forming the foundation of the language toolchain ecosystem: - lsp-mcp: LSP 3.17 gateway — persistent subprocess, Content-Length framing, all textDocument ops (hover, complete, goto-def, references, formatting, diagnostics), session registry (up to 64 concurrent sessions) - dap-mcp: DAP gateway — same JsonRpcSession pattern, full debug lifecycle (launch/attach, breakpoints, step over/in/out, stack trace, variables) - bsp-mcp: BSP 2.x gateway — build server protocol (initialize, targets, compile, test, run, clean, diagnostics); 60s timeout for slow builds - lang-mcp: multi-language CLI session manager for all 12 nextgen-languages family members (eclexia, affinescript, betlang, ephapax, mylang, wokelang, anvomidav, phronesis, error_lang, julia_the_viper, me_dialect, oblibeny); no persistent subprocess — delegates to per-language binary - toolchain-mcp: orchestrator — mint/provision/configure lifecycle, wires lsp+dap+bsp+lang sessions under one ID, Groove binding for PanLL panel discovery, Burble collaborative session support Each cartridge ships with cartridge.json (schema + tool definitions) and mod.js (Deno handler, PMPL-1.0-or-later). Zig adapters and Idris2 ABI definitions are tracked separately. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a8fd7d7 commit 911271f

10 files changed

Lines changed: 2310 additions & 0 deletions

File tree

cartridges/bsp-mcp/cartridge.json

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
{
2+
"$schema": "https://boj.dev/schemas/cartridge/v1.json",
3+
"spdx": "PMPL-1.0-or-later",
4+
"copyright": "Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath)",
5+
"name": "bsp-mcp",
6+
"version": "0.1.0",
7+
"description": "Generic Build Server Protocol (BSP 2.x) gateway. Spawns any BSP server as a persistent subprocess and exposes build lifecycle operations (initialize, targets, compile, test, run, clean, diagnostics) as MCP tools.",
8+
"domain": "Language Tools",
9+
"tier": "Ayo",
10+
"protocols": ["MCP", "REST"],
11+
"auth": { "method": "none", "env_var": null, "credential_source": null },
12+
"api": { "base_url": "local://bsp-mcp", "content_type": "application/json" },
13+
"tools": [
14+
{
15+
"name": "bsp_start",
16+
"description": "Start a BSP server subprocess and return a session ID. The server stays alive until bsp_stop is called.",
17+
"inputSchema": {
18+
"type": "object",
19+
"properties": {
20+
"command": { "type": "string", "description": "BSP server executable (e.g. 'sbt bspConfig', 'mill mill.bsp.BSP/install', 'cargo-bsp')" },
21+
"args": { "type": "array", "items": { "type": "string" }, "description": "Additional command arguments" },
22+
"workspace_root": { "type": "string", "description": "Workspace root directory path" }
23+
},
24+
"required": ["command"]
25+
}
26+
},
27+
{
28+
"name": "bsp_initialize",
29+
"description": "Send the BSP build/initialize handshake and return the server's capabilities. Must be called once after bsp_start.",
30+
"inputSchema": {
31+
"type": "object",
32+
"properties": {
33+
"session_id": { "type": "string", "description": "Session ID from bsp_start" },
34+
"display_name": { "type": "string", "description": "Client display name (default: boj-bsp-mcp)" },
35+
"version": { "type": "string", "description": "Client version (default: 0.1.0)" },
36+
"bsp_version": { "type": "string", "description": "BSP protocol version (default: 2.2.0)" }
37+
},
38+
"required": ["session_id"]
39+
}
40+
},
41+
{
42+
"name": "bsp_targets",
43+
"description": "List all build targets in the workspace (workspace/buildTargets). Returns targets with their IDs, language IDs, and capabilities.",
44+
"inputSchema": {
45+
"type": "object",
46+
"properties": {
47+
"session_id": { "type": "string", "description": "Session ID" }
48+
},
49+
"required": ["session_id"]
50+
}
51+
},
52+
{
53+
"name": "bsp_compile",
54+
"description": "Compile one or more build targets (buildTarget/compile). Returns a compile result with diagnostics.",
55+
"inputSchema": {
56+
"type": "object",
57+
"properties": {
58+
"session_id": { "type": "string", "description": "Session ID" },
59+
"targets": { "type": "array", "items": { "type": "string" }, "description": "Build target URIs to compile (omit to compile all)" },
60+
"origin_id": { "type": "string", "description": "Optional request origin ID for tracking" }
61+
},
62+
"required": ["session_id"]
63+
}
64+
},
65+
{
66+
"name": "bsp_test",
67+
"description": "Run tests for one or more build targets (buildTarget/test). Returns test results.",
68+
"inputSchema": {
69+
"type": "object",
70+
"properties": {
71+
"session_id": { "type": "string", "description": "Session ID" },
72+
"targets": { "type": "array", "items": { "type": "string" }, "description": "Build target URIs to test" },
73+
"arguments": { "type": "array", "items": { "type": "string" }, "description": "Arguments passed to the test runner" },
74+
"origin_id": { "type": "string", "description": "Optional request origin ID for tracking" }
75+
},
76+
"required": ["session_id"]
77+
}
78+
},
79+
{
80+
"name": "bsp_run",
81+
"description": "Run a build target (buildTarget/run). Returns the run result and captured output.",
82+
"inputSchema": {
83+
"type": "object",
84+
"properties": {
85+
"session_id": { "type": "string", "description": "Session ID" },
86+
"target": { "type": "string", "description": "Build target URI to run" },
87+
"arguments": { "type": "array", "items": { "type": "string" }, "description": "Arguments for the program" },
88+
"environment_variables": { "type": "object", "description": "Environment variables (key-value)" }
89+
},
90+
"required": ["session_id", "target"]
91+
}
92+
},
93+
{
94+
"name": "bsp_clean",
95+
"description": "Clean the build cache for targets or the entire workspace (workspace/cleanCache). Returns cleanup statistics.",
96+
"inputSchema": {
97+
"type": "object",
98+
"properties": {
99+
"session_id": { "type": "string", "description": "Session ID" },
100+
"targets": { "type": "array", "items": { "type": "string" }, "description": "Build target URIs to clean (omit for full workspace clean)" }
101+
},
102+
"required": ["session_id"]
103+
}
104+
},
105+
{
106+
"name": "bsp_diagnostics",
107+
"description": "Return the latest build diagnostics published by the server (from build/publishDiagnostics notifications). Aggregated across all targets.",
108+
"inputSchema": {
109+
"type": "object",
110+
"properties": {
111+
"session_id": { "type": "string", "description": "Session ID" },
112+
"target": { "type": "string", "description": "Filter by build target URI (optional)" }
113+
},
114+
"required": ["session_id"]
115+
}
116+
},
117+
{
118+
"name": "bsp_stop",
119+
"description": "Send the BSP build/shutdown + build/exit sequence and terminate the server subprocess. The session ID is invalidated.",
120+
"inputSchema": {
121+
"type": "object",
122+
"properties": {
123+
"session_id": { "type": "string", "description": "Session ID to stop" }
124+
},
125+
"required": ["session_id"]
126+
}
127+
}
128+
]
129+
}

0 commit comments

Comments
 (0)