crosspad-mcp-server 4.0.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.
Files changed (80) hide show
  1. package/README.md +187 -0
  2. package/dist/config.d.ts +10 -0
  3. package/dist/config.js +33 -0
  4. package/dist/config.js.map +1 -0
  5. package/dist/index.d.ts +2 -0
  6. package/dist/index.js +360 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/tools/architecture.d.ts +16 -0
  9. package/dist/tools/architecture.js +198 -0
  10. package/dist/tools/architecture.js.map +1 -0
  11. package/dist/tools/build-check.d.ts +23 -0
  12. package/dist/tools/build-check.js +162 -0
  13. package/dist/tools/build-check.js.map +1 -0
  14. package/dist/tools/build.d.ts +14 -0
  15. package/dist/tools/build.js +101 -0
  16. package/dist/tools/build.js.map +1 -0
  17. package/dist/tools/diff-core.d.ts +24 -0
  18. package/dist/tools/diff-core.js +88 -0
  19. package/dist/tools/diff-core.js.map +1 -0
  20. package/dist/tools/idf-build.d.ts +10 -0
  21. package/dist/tools/idf-build.js +155 -0
  22. package/dist/tools/idf-build.js.map +1 -0
  23. package/dist/tools/input.d.ts +36 -0
  24. package/dist/tools/input.js +61 -0
  25. package/dist/tools/input.js.map +1 -0
  26. package/dist/tools/log.d.ts +16 -0
  27. package/dist/tools/log.js +49 -0
  28. package/dist/tools/log.js.map +1 -0
  29. package/dist/tools/repos.d.ts +12 -0
  30. package/dist/tools/repos.js +63 -0
  31. package/dist/tools/repos.js.map +1 -0
  32. package/dist/tools/scaffold.d.ts +15 -0
  33. package/dist/tools/scaffold.js +192 -0
  34. package/dist/tools/scaffold.js.map +1 -0
  35. package/dist/tools/screenshot.d.ts +24 -0
  36. package/dist/tools/screenshot.js +80 -0
  37. package/dist/tools/screenshot.js.map +1 -0
  38. package/dist/tools/settings.d.ts +25 -0
  39. package/dist/tools/settings.js +48 -0
  40. package/dist/tools/settings.js.map +1 -0
  41. package/dist/tools/stats.d.ts +18 -0
  42. package/dist/tools/stats.js +31 -0
  43. package/dist/tools/stats.js.map +1 -0
  44. package/dist/tools/symbols.d.ts +20 -0
  45. package/dist/tools/symbols.js +157 -0
  46. package/dist/tools/symbols.js.map +1 -0
  47. package/dist/tools/test.d.ts +24 -0
  48. package/dist/tools/test.js +227 -0
  49. package/dist/tools/test.js.map +1 -0
  50. package/dist/utils/exec.d.ts +58 -0
  51. package/dist/utils/exec.js +292 -0
  52. package/dist/utils/exec.js.map +1 -0
  53. package/dist/utils/git.d.ts +10 -0
  54. package/dist/utils/git.js +29 -0
  55. package/dist/utils/git.js.map +1 -0
  56. package/dist/utils/remote-client.d.ts +17 -0
  57. package/dist/utils/remote-client.js +94 -0
  58. package/dist/utils/remote-client.js.map +1 -0
  59. package/package.json +21 -0
  60. package/server.json +23 -0
  61. package/src/config.ts +45 -0
  62. package/src/index.ts +484 -0
  63. package/src/tools/architecture.ts +260 -0
  64. package/src/tools/build-check.ts +178 -0
  65. package/src/tools/build.ts +130 -0
  66. package/src/tools/diff-core.ts +130 -0
  67. package/src/tools/idf-build.ts +182 -0
  68. package/src/tools/input.ts +80 -0
  69. package/src/tools/log.ts +75 -0
  70. package/src/tools/repos.ts +75 -0
  71. package/src/tools/scaffold.ts +229 -0
  72. package/src/tools/screenshot.ts +100 -0
  73. package/src/tools/settings.ts +68 -0
  74. package/src/tools/stats.ts +38 -0
  75. package/src/tools/symbols.ts +185 -0
  76. package/src/tools/test.ts +264 -0
  77. package/src/utils/exec.ts +376 -0
  78. package/src/utils/git.ts +45 -0
  79. package/src/utils/remote-client.ts +107 -0
  80. package/tsconfig.json +16 -0
package/README.md ADDED
@@ -0,0 +1,187 @@
1
+ # crosspad-mcp
2
+
3
+ MCP (Model Context Protocol) server that gives Claude Code full control over the CrossPad development workflow — build, test, run, screenshot, interact with the simulator, search code across all repos, and manage settings. All from natural language.
4
+
5
+ ## What it does
6
+
7
+ Instead of manually running cmake, launching the simulator, grepping through 5 repos, and checking submodule state — Claude does it through 17 specialized tools:
8
+
9
+ **Build & Run** — build the simulator (incremental/clean/reconfigure), launch it, check build health, capture startup logs.
10
+
11
+ **Testing** — run Catch2 tests with filtering, scaffold test infrastructure from scratch.
12
+
13
+ **Code navigation** — search symbols (classes, functions, macros, enums) across all CrossPad repos at once. Query interfaces and their platform implementations. List registered apps.
14
+
15
+ **Simulator interaction** — take screenshots (full window or LCD-only), press pads, rotate the encoder, click UI elements, read runtime stats (pad state, capabilities, heap), read/write settings — all while the simulator is running.
16
+
17
+ **Multi-repo awareness** — git status across all 5 CrossPad repos, detect dev-mode vs submodule-mode, diff crosspad-core/gui against pinned commits.
18
+
19
+ **Real-time streaming** — build output, test results, and log capture stream line-by-line to Claude instead of blocking until completion.
20
+
21
+ ## Prerequisites
22
+
23
+ - **Node.js** 18+
24
+ - **crosspad-pc** repo cloned and buildable (cmake, vcpkg, SDL2)
25
+ - **Windows**: Visual Studio 2022 (MSVC) — auto-detected
26
+ - **macOS/Linux**: clang or gcc, cmake, ninja (optional)
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ git clone https://github.com/CrossPad/crosspad-mcp.git
32
+ cd crosspad-mcp
33
+ npm install
34
+ npm run build
35
+ ```
36
+
37
+ ### Configure Claude Code
38
+
39
+ Add to your Claude Code MCP settings (`.claude/settings.local.json` in the crosspad-pc project, or global `~/.claude/settings.json`):
40
+
41
+ ```json
42
+ {
43
+ "mcpServers": {
44
+ "crosspad": {
45
+ "command": "node",
46
+ "args": ["C:/Users/YourName/GIT/crosspad-mcp/dist/index.js"],
47
+ "env": {}
48
+ }
49
+ }
50
+ }
51
+ ```
52
+
53
+ Restart Claude Code after adding the config.
54
+
55
+ ### Configure for VS Code (Copilot / Cline / etc.)
56
+
57
+ Add to `.vscode/mcp.json`:
58
+
59
+ ```json
60
+ {
61
+ "servers": {
62
+ "crosspad": {
63
+ "command": "node",
64
+ "args": ["C:/Users/YourName/GIT/crosspad-mcp/dist/index.js"]
65
+ }
66
+ }
67
+ }
68
+ ```
69
+
70
+ ## Configuration
71
+
72
+ All paths are configurable via environment variables. Defaults work out of the box on the main dev machine (Windows). On Mac/Linux, set these in your MCP server config `env` block:
73
+
74
+ | Variable | Default (Windows) | Default (Mac/Linux) | Description |
75
+ |---|---|---|---|
76
+ | `CROSSPAD_GIT_DIR` | `C:/Users/Mateusz/GIT` | `~/GIT` | Base directory containing all CrossPad repos |
77
+ | `CROSSPAD_PC_ROOT` | `$GIT_DIR/crosspad-pc` | `$GIT_DIR/crosspad-pc` | Path to crosspad-pc repo |
78
+ | `VCPKG_ROOT` | `C:/vcpkg` | `~/vcpkg` | vcpkg installation directory |
79
+ | `CMAKE_GENERATOR` | `Ninja` | system default | CMake generator (`Ninja`, `Unix Makefiles`, etc.) |
80
+ | `VCVARSALL` | VS2022 Community path | *(not used)* | MSVC vcvarsall.bat path (Windows only) |
81
+
82
+ Example for macOS:
83
+
84
+ ```json
85
+ {
86
+ "mcpServers": {
87
+ "crosspad": {
88
+ "command": "node",
89
+ "args": ["/Users/you/GIT/crosspad-mcp/dist/index.js"],
90
+ "env": {
91
+ "CROSSPAD_GIT_DIR": "/Users/you/GIT",
92
+ "VCPKG_ROOT": "/opt/vcpkg"
93
+ }
94
+ }
95
+ }
96
+ }
97
+ ```
98
+
99
+ ## Tools reference
100
+
101
+ ### Build & Run
102
+
103
+ | Tool | Description |
104
+ |---|---|
105
+ | `crosspad_build` | Build the simulator. Modes: `incremental` (default), `clean` (wipe + rebuild), `reconfigure` (cmake configure + build — use after adding new source files) |
106
+ | `crosspad_run` | Launch `bin/main.exe`. Returns PID immediately |
107
+ | `crosspad_build_check` | Health check: stale exe? new source files needing reconfigure? submodule drift? dirty working trees? |
108
+ | `crosspad_log` | Launch the exe, capture stdout/stderr for N seconds, then kill it. Great for checking init, crashes, runtime errors |
109
+
110
+ ### Testing
111
+
112
+ | Tool | Description |
113
+ |---|---|
114
+ | `crosspad_test` | Build and run the Catch2 test suite. Supports name filtering (`[core]`, `PadManager`) and `list_only` mode |
115
+ | `crosspad_test_scaffold` | Generate test infrastructure (CMakeLists.txt + sample test). Returns file contents — does NOT write to disk |
116
+
117
+ ### Multi-repo
118
+
119
+ | Tool | Description |
120
+ |---|---|
121
+ | `crosspad_repos_status` | Git status across all 5 CrossPad repos. Detects dev-mode (junction/symlink) vs submodule-mode |
122
+ | `crosspad_diff_core` | What changed in crosspad-core/gui vs the pinned submodule commit. Commits ahead/behind, changed files, uncommitted changes |
123
+
124
+ ### Code & Architecture
125
+
126
+ | Tool | Description |
127
+ |---|---|
128
+ | `crosspad_search_symbols` | Find classes, functions, macros, enums across all repos. Filters by kind and repo. Uses `git grep` |
129
+ | `crosspad_scaffold_app` | Generate boilerplate for a new CrossPad app (cpp, hpp, CMakeLists.txt, optional pad logic handler) |
130
+ | `crosspad_interfaces` | Query crosspad-core interfaces: `list` all, `implementations <Name>`, or `capabilities` flags |
131
+ | `crosspad_apps` | List registered apps per platform (`pc`, `esp32`, `2player`, `all`) |
132
+
133
+ ### Simulator interaction
134
+
135
+ These tools require the simulator to be running (`crosspad_run` first).
136
+
137
+ | Tool | Description |
138
+ |---|---|
139
+ | `crosspad_screenshot` | Capture PNG screenshot. `region`: `full` (490x680 window) or `lcd` (320x240 screen only). Save to file or return base64 |
140
+ | `crosspad_input` | Send events: `click` {x,y}, `pad_press` {pad,velocity}, `pad_release`, `encoder_rotate` {delta}, `encoder_press`/`release`, `key` {keycode} |
141
+ | `crosspad_stats` | Runtime diagnostics: pad state (16 pads), capabilities, registered apps, heap usage, settings snapshot |
142
+ | `crosspad_settings` | Read settings by category or write individual keys. Auto-saves to `~/.crosspad/preferences.json` |
143
+
144
+ ## Architecture
145
+
146
+ ```
147
+ src/
148
+ index.ts — MCP server, tool registrations, streaming logger
149
+ config.ts — platform-aware paths (env vars, OS detection)
150
+ utils/
151
+ exec.ts — runBuild/runBuildStream (MSVC on Windows, default shell on Unix)
152
+ git.ts — getRepoStatus(), getSubmodulePin(), getHead()
153
+ remote-client.ts — TCP client for simulator remote control (localhost:19840)
154
+ tools/
155
+ build.ts — crosspad_build, crosspad_run
156
+ build-check.ts — crosspad_build_check
157
+ log.ts — crosspad_log
158
+ test.ts — crosspad_test, crosspad_test_scaffold
159
+ repos.ts — crosspad_repos_status
160
+ diff-core.ts — crosspad_diff_core
161
+ symbols.ts — crosspad_search_symbols
162
+ scaffold.ts — crosspad_scaffold_app
163
+ architecture.ts — crosspad_interfaces, crosspad_apps
164
+ screenshot.ts — crosspad_screenshot
165
+ input.ts — crosspad_input
166
+ stats.ts — crosspad_stats
167
+ settings.ts — crosspad_settings
168
+ ```
169
+
170
+ **Static tools** (build, repos, symbols, scaffold) work without the simulator running — they operate on the filesystem and git.
171
+
172
+ **Interactive tools** (screenshot, input, stats, settings) communicate with the simulator via TCP on `localhost:19840`. The simulator includes a built-in remote control server that accepts newline-delimited JSON commands.
173
+
174
+ **Streaming** — long-running tools (build, test, log) emit output line-by-line via MCP logging notifications instead of blocking. Claude sees the output in real-time.
175
+
176
+ ## Development
177
+
178
+ ```bash
179
+ npm run dev # watch mode — recompiles on save
180
+ npm run build # one-shot build
181
+ ```
182
+
183
+ After rebuilding, restart Claude Code to pick up the new server binary.
184
+
185
+ ## License
186
+
187
+ Part of the [CrossPad](https://github.com/CrossPad) project. Open source.
@@ -0,0 +1,10 @@
1
+ export declare const IS_WINDOWS: boolean;
2
+ export declare const IS_MAC: boolean;
3
+ export declare const CROSSPAD_PC_ROOT: string;
4
+ export declare const REPOS: Record<string, string>;
5
+ export declare const VCVARSALL: string;
6
+ export declare const VCPKG_TOOLCHAIN: string;
7
+ export declare const BUILD_DIR: string;
8
+ export declare const BIN_EXE: string;
9
+ export declare const CROSSPAD_IDF_ROOT: string;
10
+ export declare const IDF_PATH: string;
package/dist/config.js ADDED
@@ -0,0 +1,33 @@
1
+ import path from "path";
2
+ import os from "os";
3
+ export const IS_WINDOWS = process.platform === "win32";
4
+ export const IS_MAC = process.platform === "darwin";
5
+ // Base directory for all CrossPad repos (override with CROSSPAD_GIT_DIR)
6
+ const defaultGitDir = IS_WINDOWS
7
+ ? "C:/Users/Mateusz/GIT"
8
+ : path.join(os.homedir(), "GIT");
9
+ const GIT_DIR = process.env.CROSSPAD_GIT_DIR || defaultGitDir;
10
+ export const CROSSPAD_PC_ROOT = process.env.CROSSPAD_PC_ROOT || path.join(GIT_DIR, "crosspad-pc");
11
+ export const REPOS = {
12
+ "crosspad-core": path.join(GIT_DIR, "crosspad-core"),
13
+ "crosspad-gui": path.join(GIT_DIR, "crosspad-gui"),
14
+ "crosspad-pc": CROSSPAD_PC_ROOT,
15
+ "ESP32-S3": path.join(GIT_DIR, "ESP32-S3"),
16
+ "2playerCrosspad": path.join(GIT_DIR, "P4_TEST", "2playerCrosspad"),
17
+ "crosspad-idf": path.join(GIT_DIR, "crosspad-idf"),
18
+ };
19
+ // MSVC — only used on Windows
20
+ export const VCVARSALL = process.env.VCVARSALL ||
21
+ "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat";
22
+ // vcpkg — platform-aware defaults
23
+ const defaultVcpkgRoot = IS_WINDOWS ? "C:/vcpkg" : path.join(os.homedir(), "vcpkg");
24
+ const vcpkgRoot = process.env.VCPKG_ROOT || defaultVcpkgRoot;
25
+ export const VCPKG_TOOLCHAIN = path.join(vcpkgRoot, "scripts", "buildsystems", "vcpkg.cmake");
26
+ export const BUILD_DIR = path.join(CROSSPAD_PC_ROOT, "build");
27
+ const EXE_EXT = IS_WINDOWS ? ".exe" : "";
28
+ export const BIN_EXE = path.join(CROSSPAD_PC_ROOT, "bin", `CrossPad${EXE_EXT}`);
29
+ // ESP-IDF
30
+ export const CROSSPAD_IDF_ROOT = process.env.CROSSPAD_IDF_ROOT || path.join(GIT_DIR, "crosspad-idf");
31
+ const defaultIdfPath = path.join(os.homedir(), "esp", "v5.5", "esp-idf");
32
+ export const IDF_PATH = process.env.IDF_PATH || defaultIdfPath;
33
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;AACpF,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,gBAAgB,CAAC;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,CAAC,CAAC;AAE9F,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;AAE9D,MAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;AACzC,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,KAAK,EAAE,WAAW,OAAO,EAAE,CAAC,CAAC;AAEhF,UAAU;AACV,MAAM,CAAC,MAAM,iBAAiB,GAC5B,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;AAEtE,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AACzE,MAAM,CAAC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,360 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { z } from "zod";
5
+ import { crosspadBuild, crosspadRun } from "./tools/build.js";
6
+ import { crosspadReposStatus } from "./tools/repos.js";
7
+ import { crosspadScaffoldApp } from "./tools/scaffold.js";
8
+ import { crosspadInterfaces, crosspadApps } from "./tools/architecture.js";
9
+ import { crosspadBuildCheck } from "./tools/build-check.js";
10
+ import { crosspadSearchSymbols } from "./tools/symbols.js";
11
+ import { crosspadDiffCore } from "./tools/diff-core.js";
12
+ import { crosspadLog } from "./tools/log.js";
13
+ import { crosspadTest, crosspadTestScaffold } from "./tools/test.js";
14
+ import { crosspadScreenshot } from "./tools/screenshot.js";
15
+ import { crosspadInput } from "./tools/input.js";
16
+ import { crosspadSettingsGet, crosspadSettingsSet } from "./tools/settings.js";
17
+ import { crosspadStats } from "./tools/stats.js";
18
+ import { crosspadIdfBuild } from "./tools/idf-build.js";
19
+ const server = new McpServer({
20
+ name: "crosspad",
21
+ version: "4.0.0",
22
+ }, {
23
+ capabilities: {
24
+ logging: {},
25
+ },
26
+ });
27
+ /**
28
+ * Create an OnLine callback that streams each line to the MCP client
29
+ * via logging notifications. Build output is "info", errors are "error".
30
+ */
31
+ function makeStreamLogger(logger) {
32
+ return (stream, line) => {
33
+ if (!line.trim())
34
+ return; // skip empty lines
35
+ const level = stream === "stderr" ? "warning" : "info";
36
+ server.server.sendLoggingMessage({ level, logger, data: line }).catch(() => { });
37
+ };
38
+ }
39
+ // ═══════════════════════════════════════════════════════════════════════
40
+ // BUILD & RUN
41
+ // ═══════════════════════════════════════════════════════════════════════
42
+ server.tool("crosspad_build", "Build crosspad-pc simulator (incremental, clean, or reconfigure)", {
43
+ mode: z
44
+ .enum(["incremental", "clean", "reconfigure"])
45
+ .default("incremental")
46
+ .describe("incremental: just cmake --build. clean: delete build dir + full rebuild. reconfigure: cmake configure + build (use after adding new source files)"),
47
+ }, async ({ mode }) => {
48
+ const onLine = makeStreamLogger("build");
49
+ const result = await crosspadBuild(mode, onLine);
50
+ return {
51
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
52
+ };
53
+ });
54
+ server.tool("crosspad_run", "Launch the crosspad-pc simulator (bin/CrossPad.exe). Returns immediately with PID.", {}, async () => {
55
+ const result = crosspadRun();
56
+ return {
57
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
58
+ };
59
+ });
60
+ server.tool("crosspad_build_check", "Quick health check: is the build up to date? Detects stale exe, new source files needing reconfigure, submodule drift, dirty working trees. Use before build to know what mode to use.", {}, async () => {
61
+ const result = crosspadBuildCheck();
62
+ return {
63
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
64
+ };
65
+ });
66
+ server.tool("crosspad_log", "Launch CrossPad.exe, capture stdout/stderr for a few seconds, then kill it. Great for checking init sequence, crash messages, or runtime errors without leaving the process running.", {
67
+ timeout_seconds: z
68
+ .number()
69
+ .default(5)
70
+ .describe("How long to let the process run before killing it (default: 5)"),
71
+ max_lines: z
72
+ .number()
73
+ .default(200)
74
+ .describe("Max lines of output to return (default: 200)"),
75
+ }, async ({ timeout_seconds, max_lines }) => {
76
+ const onLine = makeStreamLogger("log");
77
+ const result = await crosspadLog(timeout_seconds, max_lines, onLine);
78
+ return {
79
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
80
+ };
81
+ });
82
+ // ═══════════════════════════════════════════════════════════════════════
83
+ // ESP-IDF BUILD
84
+ // ═══════════════════════════════════════════════════════════════════════
85
+ server.tool("crosspad_idf_build", "Build the crosspad-idf ESP32-S3 firmware using idf.py. Use fullclean after adding new app directories or CMakeLists.txt changes.", {
86
+ mode: z
87
+ .enum(["build", "fullclean", "clean"])
88
+ .default("build")
89
+ .describe("build: incremental idf.py build. fullclean: idf.py fullclean + build (required after new app dirs). clean: delete build/ + build."),
90
+ }, async ({ mode }) => {
91
+ const onLine = makeStreamLogger("idf-build");
92
+ const result = await crosspadIdfBuild(mode, onLine);
93
+ return {
94
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
95
+ };
96
+ });
97
+ // ═══════════════════════════════════════════════════════════════════════
98
+ // TEST
99
+ // ═══════════════════════════════════════════════════════════════════════
100
+ server.tool("crosspad_test", "Build and run the Catch2 test suite. If no tests/ dir exists, tells you to scaffold. Supports filtering by test name.", {
101
+ filter: z
102
+ .string()
103
+ .default("")
104
+ .describe("Catch2 test name filter (e.g. '[core]' or 'PadManager')"),
105
+ list_only: z
106
+ .boolean()
107
+ .default(false)
108
+ .describe("Just list available tests without running them"),
109
+ }, async ({ filter, list_only }) => {
110
+ const onLine = makeStreamLogger("test");
111
+ const result = await crosspadTest(filter, list_only, onLine);
112
+ return {
113
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
114
+ };
115
+ });
116
+ server.tool("crosspad_test_scaffold", "Generate test infrastructure: tests/CMakeLists.txt (Catch2 v3), sample test file, and CMake patch instructions. Returns file contents — does NOT write to disk.", {}, async () => {
117
+ const result = crosspadTestScaffold();
118
+ return {
119
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
120
+ };
121
+ });
122
+ // ═══════════════════════════════════════════════════════════════════════
123
+ // REPOS & SUBMODULES
124
+ // ═══════════════════════════════════════════════════════════════════════
125
+ server.tool("crosspad_repos_status", "Show git status across all CrossPad repos (crosspad-core, crosspad-gui, crosspad-pc, ESP32-S3, 2playerCrosspad). Detects dev-mode vs submodule-mode and checks submodule pin sync.", {}, async () => {
126
+ const result = crosspadReposStatus();
127
+ return {
128
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
129
+ };
130
+ });
131
+ server.tool("crosspad_diff_core", "Show what changed in crosspad-core and/or crosspad-gui relative to the pinned submodule commit. Shows commits ahead/behind, changed files, uncommitted changes. Essential for dev-mode workflows.", {
132
+ submodule: z
133
+ .enum(["crosspad-core", "crosspad-gui", "both"])
134
+ .default("both")
135
+ .describe("Which submodule(s) to diff"),
136
+ }, async ({ submodule }) => {
137
+ const result = crosspadDiffCore(submodule);
138
+ return {
139
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
140
+ };
141
+ });
142
+ // ═══════════════════════════════════════════════════════════════════════
143
+ // CODE & ARCHITECTURE
144
+ // ═══════════════════════════════════════════════════════════════════════
145
+ server.tool("crosspad_search_symbols", "Search for classes, functions, macros, enums across all CrossPad repos. Faster than manual grep — uses git grep under the hood.", {
146
+ query: z.string().describe("Symbol name or substring to search for"),
147
+ kind: z
148
+ .enum(["class", "function", "macro", "enum", "typedef", "all"])
149
+ .default("all")
150
+ .describe("Filter by symbol kind"),
151
+ repos: z
152
+ .array(z.string())
153
+ .default(["all"])
154
+ .describe('Repo names to search: "crosspad-core", "crosspad-pc", "ESP32-S3", etc. or ["all"]'),
155
+ max_results: z
156
+ .number()
157
+ .default(50)
158
+ .describe("Max results to return"),
159
+ }, async ({ query, kind, repos, max_results }) => {
160
+ const result = crosspadSearchSymbols(query, kind, repos, max_results);
161
+ return {
162
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
163
+ };
164
+ });
165
+ server.tool("crosspad_scaffold_app", "Generate boilerplate for a new CrossPad app (cpp, hpp, CMakeLists.txt, optional pad logic). Returns file contents for Claude to write — does NOT create files on disk.", {
166
+ name: z
167
+ .string()
168
+ .describe("PascalCase app name, e.g. 'Metronome'"),
169
+ display_name: z
170
+ .string()
171
+ .optional()
172
+ .describe("Human-readable name (defaults to name)"),
173
+ has_pad_logic: z
174
+ .boolean()
175
+ .default(false)
176
+ .describe("Generate IPadLogicHandler stub"),
177
+ icon: z
178
+ .string()
179
+ .default("CrossPad_Logo_110w.png")
180
+ .describe("Icon filename"),
181
+ }, async ({ name, display_name, has_pad_logic, icon }) => {
182
+ const result = crosspadScaffoldApp({
183
+ name,
184
+ display_name,
185
+ has_pad_logic,
186
+ icon,
187
+ });
188
+ return {
189
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
190
+ };
191
+ });
192
+ server.tool("crosspad_interfaces", 'Query crosspad-core interfaces and their implementations across all platforms. Use query="list" to list all interfaces, "implementations <InterfaceName>" to find implementations, or "capabilities" to show platform capability flags.', {
193
+ query: z
194
+ .string()
195
+ .describe('"list", "implementations <InterfaceName>", or "capabilities"'),
196
+ }, async ({ query }) => {
197
+ const result = crosspadInterfaces(query);
198
+ return {
199
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
200
+ };
201
+ });
202
+ server.tool("crosspad_apps", "List all registered CrossPad apps (found via REGISTER_APP macro or _register_*_app functions).", {
203
+ platform: z
204
+ .enum(["pc", "esp32", "2player", "all"])
205
+ .default("pc")
206
+ .describe("Which platform to scan"),
207
+ }, async ({ platform }) => {
208
+ const result = crosspadApps(platform);
209
+ return {
210
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
211
+ };
212
+ });
213
+ // ═══════════════════════════════════════════════════════════════════════
214
+ // SIMULATOR INTERACTION (requires running simulator with remote control)
215
+ // ═══════════════════════════════════════════════════════════════════════
216
+ server.tool("crosspad_screenshot", "Capture a screenshot from the running CrossPad simulator. Saves PNG to screenshots/ dir by default. Requires the simulator to be running (use crosspad_run first).", {
217
+ save_to_file: z
218
+ .boolean()
219
+ .default(true)
220
+ .describe("Save to disk (default: true). If false, returns base64 data inline."),
221
+ filename: z
222
+ .string()
223
+ .optional()
224
+ .describe("Custom filename (default: screenshot_<timestamp>.png)"),
225
+ region: z
226
+ .enum(["full", "lcd"])
227
+ .default("full")
228
+ .describe("full: entire simulator window (490x680). lcd: LCD screen only (320x240)."),
229
+ }, async ({ save_to_file, filename, region }) => {
230
+ const result = await crosspadScreenshot(save_to_file, filename, region);
231
+ return {
232
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
233
+ };
234
+ });
235
+ server.tool("crosspad_input", `Send input events to the running CrossPad simulator. Requires simulator to be running.
236
+
237
+ Actions:
238
+ click {x, y} — mouse click at window coordinates (490x680 window)
239
+ pad_press {pad, vel} — press pad 0-15 with velocity 0-127
240
+ pad_release {pad} — release pad 0-15
241
+ encoder_rotate {delta} — rotate encoder (positive=CW, negative=CCW)
242
+ encoder_press — press encoder button
243
+ encoder_release — release encoder button
244
+ key {keycode} — SDL keycode (e.g. 13=Enter, 27=Escape)
245
+
246
+ LCD area is centered at roughly x=85..405, y=20..260 within the 490x680 window.`, {
247
+ action: z
248
+ .enum(["click", "pad_press", "pad_release", "encoder_rotate", "encoder_press", "encoder_release", "key"])
249
+ .describe("Input action type"),
250
+ x: z.number().optional().describe("X coordinate for click"),
251
+ y: z.number().optional().describe("Y coordinate for click"),
252
+ pad: z.number().optional().describe("Pad index 0-15 for pad_press/pad_release"),
253
+ velocity: z.number().optional().describe("Velocity 0-127 for pad_press (default: 127)"),
254
+ delta: z.number().optional().describe("Rotation delta for encoder_rotate"),
255
+ keycode: z.number().optional().describe("SDL keycode for key action"),
256
+ }, async ({ action, x, y, pad, velocity, delta, keycode }) => {
257
+ let input;
258
+ switch (action) {
259
+ case "click":
260
+ input = { action: "click", x: x ?? 0, y: y ?? 0 };
261
+ break;
262
+ case "pad_press":
263
+ input = { action: "pad_press", pad: pad ?? 0, velocity: velocity ?? 127 };
264
+ break;
265
+ case "pad_release":
266
+ input = { action: "pad_release", pad: pad ?? 0 };
267
+ break;
268
+ case "encoder_rotate":
269
+ input = { action: "encoder_rotate", delta: delta ?? 1 };
270
+ break;
271
+ case "encoder_press":
272
+ input = { action: "encoder_press" };
273
+ break;
274
+ case "encoder_release":
275
+ input = { action: "encoder_release" };
276
+ break;
277
+ case "key":
278
+ input = { action: "key", keycode: keycode ?? 0 };
279
+ break;
280
+ default:
281
+ return {
282
+ content: [{ type: "text", text: JSON.stringify({ success: false, error: "Unknown action" }) }],
283
+ };
284
+ }
285
+ const result = await crosspadInput(input);
286
+ return {
287
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
288
+ };
289
+ });
290
+ server.tool("crosspad_stats", `Query runtime statistics from the running simulator. Returns:
291
+ - Platform capabilities (active flags)
292
+ - Pad state (16 pads: pressed, playing, note, channel, RGB color)
293
+ - Active/registered pad logic handlers
294
+ - Registered apps list
295
+ - Heap stats (SRAM/PSRAM free/total)
296
+ - Settings summary (brightness, theme, kit, audio engine)`, {}, async () => {
297
+ const result = await crosspadStats();
298
+ return {
299
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
300
+ };
301
+ });
302
+ server.tool("crosspad_settings", `Read or write CrossPad settings on the running simulator.
303
+
304
+ Read: action="get", category="all"|"display"|"keypad"|"vibration"|"wireless"|"audio"|"system"
305
+ Write: action="set", key="<setting_key>", value=<number> (booleans: 0/1)
306
+
307
+ Writable keys:
308
+ lcd_brightness (0-255), rgb_brightness (0-255), theme_color (0-255), perf_stats_flags (bitmask)
309
+ kit (0-255), audio_engine (0/1)
310
+ keypad.enable, keypad.inactive_lights, keypad.eco_mode, keypad.send_stm/ble/usb/cc (0/1)
311
+ vibration.enable, vibration.on_touch, vibration.in_min/max, vibration.out_min/max (0-255)
312
+ master_fx.mute (0/1), master_fx.in_volume, master_fx.out_volume (0-100)
313
+
314
+ Changes are auto-saved to ~/.crosspad/preferences.json.`, {
315
+ action: z
316
+ .enum(["get", "set"])
317
+ .describe("Read or write settings"),
318
+ category: z
319
+ .string()
320
+ .default("all")
321
+ .describe("For get: all, display, keypad, vibration, wireless, audio, system"),
322
+ key: z
323
+ .string()
324
+ .optional()
325
+ .describe("For set: dotted key name (e.g. 'lcd_brightness', 'keypad.eco_mode')"),
326
+ value: z
327
+ .number()
328
+ .optional()
329
+ .describe("For set: numeric value (booleans: 0=false, 1=true)"),
330
+ }, async ({ action, category, key, value }) => {
331
+ if (action === "get") {
332
+ const result = await crosspadSettingsGet(category);
333
+ return {
334
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
335
+ };
336
+ }
337
+ else {
338
+ if (!key || value === undefined) {
339
+ return {
340
+ content: [{ type: "text", text: JSON.stringify({ success: false, error: "key and value required for set" }) }],
341
+ };
342
+ }
343
+ const result = await crosspadSettingsSet(key, value);
344
+ return {
345
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
346
+ };
347
+ }
348
+ });
349
+ // ═══════════════════════════════════════════════════════════════════════
350
+ // START
351
+ // ═══════════════════════════════════════════════════════════════════════
352
+ async function main() {
353
+ const transport = new StdioServerTransport();
354
+ await server.connect(transport);
355
+ }
356
+ main().catch((err) => {
357
+ console.error("MCP server failed:", err);
358
+ process.exit(1);
359
+ });
360
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAe,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAIxD,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B;IACE,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;CACjB,EACD;IACE,Y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AAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACnE,CAAC;IACJ,CAAC;AACH,CAAC,CACF,CAAC;AAEF,0EAA0E;AAC1E,QAAQ;AACR,0EAA0E;AAE1E,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;IACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ export interface InterfaceInfo {
2
+ name: string;
3
+ file: string;
4
+ }
5
+ export interface ImplementationInfo {
6
+ className: string;
7
+ file: string;
8
+ platform: string;
9
+ }
10
+ export declare function crosspadInterfaces(query: string): Record<string, unknown>;
11
+ export interface AppInfo {
12
+ name: string;
13
+ registration_file: string;
14
+ platform: string;
15
+ }
16
+ export declare function crosspadApps(platform: "pc" | "esp32" | "2player" | "all"): AppInfo[];