x64dbg-mcp-server 1.1.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 (76) hide show
  1. package/dist/config.d.ts +8 -0
  2. package/dist/config.js +10 -0
  3. package/dist/config.js.map +1 -0
  4. package/dist/http_client.d.ts +26 -0
  5. package/dist/http_client.js +213 -0
  6. package/dist/http_client.js.map +1 -0
  7. package/dist/index.d.ts +3 -0
  8. package/dist/index.js +32 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/tools/analysis.d.ts +3 -0
  11. package/dist/tools/analysis.js +81 -0
  12. package/dist/tools/analysis.js.map +1 -0
  13. package/dist/tools/antidebug.d.ts +3 -0
  14. package/dist/tools/antidebug.js +25 -0
  15. package/dist/tools/antidebug.js.map +1 -0
  16. package/dist/tools/breakpoints.d.ts +3 -0
  17. package/dist/tools/breakpoints.js +124 -0
  18. package/dist/tools/breakpoints.js.map +1 -0
  19. package/dist/tools/command.d.ts +3 -0
  20. package/dist/tools/command.js +41 -0
  21. package/dist/tools/command.js.map +1 -0
  22. package/dist/tools/controlflow.d.ts +3 -0
  23. package/dist/tools/controlflow.js +48 -0
  24. package/dist/tools/controlflow.js.map +1 -0
  25. package/dist/tools/debug.d.ts +3 -0
  26. package/dist/tools/debug.js +51 -0
  27. package/dist/tools/debug.js.map +1 -0
  28. package/dist/tools/disassembly.d.ts +3 -0
  29. package/dist/tools/disassembly.js +39 -0
  30. package/dist/tools/disassembly.js.map +1 -0
  31. package/dist/tools/dumping.d.ts +3 -0
  32. package/dist/tools/dumping.js +60 -0
  33. package/dist/tools/dumping.js.map +1 -0
  34. package/dist/tools/exceptions.d.ts +3 -0
  35. package/dist/tools/exceptions.js +31 -0
  36. package/dist/tools/exceptions.js.map +1 -0
  37. package/dist/tools/handles.d.ts +3 -0
  38. package/dist/tools/handles.js +33 -0
  39. package/dist/tools/handles.js.map +1 -0
  40. package/dist/tools/index.d.ts +3 -0
  41. package/dist/tools/index.js +46 -0
  42. package/dist/tools/index.js.map +1 -0
  43. package/dist/tools/memmap.d.ts +3 -0
  44. package/dist/tools/memmap.js +13 -0
  45. package/dist/tools/memmap.js.map +1 -0
  46. package/dist/tools/memory.d.ts +3 -0
  47. package/dist/tools/memory.js +57 -0
  48. package/dist/tools/memory.js.map +1 -0
  49. package/dist/tools/modules.d.ts +3 -0
  50. package/dist/tools/modules.js +29 -0
  51. package/dist/tools/modules.js.map +1 -0
  52. package/dist/tools/patches.d.ts +3 -0
  53. package/dist/tools/patches.js +33 -0
  54. package/dist/tools/patches.js.map +1 -0
  55. package/dist/tools/process.d.ts +3 -0
  56. package/dist/tools/process.js +31 -0
  57. package/dist/tools/process.js.map +1 -0
  58. package/dist/tools/registers.d.ts +3 -0
  59. package/dist/tools/registers.js +28 -0
  60. package/dist/tools/registers.js.map +1 -0
  61. package/dist/tools/search.d.ts +3 -0
  62. package/dist/tools/search.js +60 -0
  63. package/dist/tools/search.js.map +1 -0
  64. package/dist/tools/stack.d.ts +3 -0
  65. package/dist/tools/stack.js +40 -0
  66. package/dist/tools/stack.js.map +1 -0
  67. package/dist/tools/symbols.d.ts +3 -0
  68. package/dist/tools/symbols.js +53 -0
  69. package/dist/tools/symbols.js.map +1 -0
  70. package/dist/tools/threads.d.ts +3 -0
  71. package/dist/tools/threads.js +45 -0
  72. package/dist/tools/threads.js.map +1 -0
  73. package/dist/tools/tracing.d.ts +3 -0
  74. package/dist/tools/tracing.js +77 -0
  75. package/dist/tools/tracing.js.map +1 -0
  76. package/package.json +52 -0
@@ -0,0 +1,8 @@
1
+ export declare const config: {
2
+ host: string;
3
+ port: number;
4
+ timeout: number;
5
+ retries: number;
6
+ };
7
+ export declare function getBaseUrl(): string;
8
+ //# sourceMappingURL=config.d.ts.map
package/dist/config.js ADDED
@@ -0,0 +1,10 @@
1
+ export const config = {
2
+ host: process.env.X64DBG_MCP_HOST ?? '127.0.0.1',
3
+ port: parseInt(process.env.X64DBG_MCP_PORT ?? '27042', 10),
4
+ timeout: parseInt(process.env.X64DBG_MCP_TIMEOUT ?? '30000', 10),
5
+ retries: parseInt(process.env.X64DBG_MCP_RETRIES ?? '3', 10),
6
+ };
7
+ export function getBaseUrl() {
8
+ return `http://${config.host}:${config.port}`;
9
+ }
10
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,WAAW;IAChD,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,OAAO,EAAE,EAAE,CAAC;IAC1D,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,OAAO,EAAE,EAAE,CAAC;IAChE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,GAAG,EAAE,EAAE,CAAC;CAC7D,CAAC;AAEF,MAAM,UAAU,UAAU;IACxB,OAAO,UAAU,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;AAChD,CAAC"}
@@ -0,0 +1,26 @@
1
+ type ConnectionState = 'connected' | 'disconnected' | 'reconnecting';
2
+ export declare class HttpClient {
3
+ private base_url;
4
+ private state;
5
+ private last_successful_request;
6
+ private consecutive_failures;
7
+ private health_check_interval;
8
+ constructor();
9
+ get connection_state(): ConnectionState;
10
+ get<T = unknown>(path: string, params?: Record<string, string>): Promise<T>;
11
+ post<T = unknown>(path: string, body?: unknown): Promise<T>;
12
+ destroy(): void;
13
+ private start_health_monitor;
14
+ private check_health;
15
+ /**
16
+ * Block until the plugin is reachable. Polls /api/health every 2s
17
+ * for up to 2 minutes. This is the key fix: instead of failing
18
+ * immediately when the plugin isn't running, we wait for it.
19
+ */
20
+ private wait_for_connection;
21
+ private is_connection_error;
22
+ private request;
23
+ }
24
+ export declare const httpClient: HttpClient;
25
+ export {};
26
+ //# sourceMappingURL=http_client.d.ts.map
@@ -0,0 +1,213 @@
1
+ import { config, getBaseUrl } from './config.js';
2
+ // How long to wait for the plugin to come online before failing a request
3
+ const WAIT_FOR_PLUGIN_TIMEOUT_MS = 120_000; // 2 minutes
4
+ const WAIT_POLL_INTERVAL_MS = 2_000; // poll every 2s
5
+ export class HttpClient {
6
+ base_url;
7
+ state = 'disconnected';
8
+ last_successful_request = 0;
9
+ consecutive_failures = 0;
10
+ health_check_interval = null;
11
+ constructor() {
12
+ this.base_url = getBaseUrl();
13
+ this.start_health_monitor();
14
+ }
15
+ get connection_state() {
16
+ return this.state;
17
+ }
18
+ async get(path, params) {
19
+ const url = new URL(path, this.base_url);
20
+ if (params) {
21
+ for (const [key, value] of Object.entries(params)) {
22
+ if (value !== undefined && value !== '') {
23
+ url.searchParams.set(key, value);
24
+ }
25
+ }
26
+ }
27
+ return this.request(url.toString(), { method: 'GET' });
28
+ }
29
+ async post(path, body) {
30
+ const url = new URL(path, this.base_url);
31
+ const options = {
32
+ method: 'POST',
33
+ headers: { 'Content-Type': 'application/json' },
34
+ };
35
+ if (body !== undefined) {
36
+ options.body = JSON.stringify(body);
37
+ }
38
+ return this.request(url.toString(), options);
39
+ }
40
+ destroy() {
41
+ if (this.health_check_interval) {
42
+ clearInterval(this.health_check_interval);
43
+ this.health_check_interval = null;
44
+ }
45
+ }
46
+ start_health_monitor() {
47
+ // Periodic health check every 15s to maintain connection awareness
48
+ this.health_check_interval = setInterval(async () => {
49
+ await this.check_health();
50
+ }, 15_000);
51
+ // Initial health check (non-blocking)
52
+ this.check_health().catch(() => { });
53
+ }
54
+ async check_health() {
55
+ try {
56
+ const controller = new AbortController();
57
+ const timeout_id = setTimeout(() => controller.abort(), 3000);
58
+ const response = await fetch(`${this.base_url}/api/health`, {
59
+ method: 'GET',
60
+ signal: controller.signal,
61
+ });
62
+ clearTimeout(timeout_id);
63
+ if (response.ok) {
64
+ const was_disconnected = this.state !== 'connected';
65
+ this.state = 'connected';
66
+ this.consecutive_failures = 0;
67
+ if (was_disconnected) {
68
+ console.error(`[x64dbg-mcp] Plugin connection established at ${this.base_url}`);
69
+ }
70
+ return true;
71
+ }
72
+ return false;
73
+ }
74
+ catch {
75
+ if (this.state === 'connected') {
76
+ console.error('[x64dbg-mcp] Plugin connection lost, will reconnect automatically');
77
+ this.state = 'disconnected';
78
+ }
79
+ return false;
80
+ }
81
+ }
82
+ /**
83
+ * Block until the plugin is reachable. Polls /api/health every 2s
84
+ * for up to 2 minutes. This is the key fix: instead of failing
85
+ * immediately when the plugin isn't running, we wait for it.
86
+ */
87
+ async wait_for_connection() {
88
+ // Already connected - skip
89
+ if (this.state === 'connected')
90
+ return;
91
+ // Quick check first
92
+ if (await this.check_health())
93
+ return;
94
+ // Plugin not available - enter wait loop
95
+ this.state = 'reconnecting';
96
+ console.error(`[x64dbg-mcp] Plugin not reachable at ${this.base_url}, waiting up to ${WAIT_FOR_PLUGIN_TIMEOUT_MS / 1000}s for it to come online...`);
97
+ const deadline = Date.now() + WAIT_FOR_PLUGIN_TIMEOUT_MS;
98
+ let poll_count = 0;
99
+ while (Date.now() < deadline) {
100
+ await new Promise(resolve => setTimeout(resolve, WAIT_POLL_INTERVAL_MS));
101
+ poll_count++;
102
+ if (await this.check_health()) {
103
+ console.error(`[x64dbg-mcp] Plugin came online after ~${poll_count * 2}s`);
104
+ return;
105
+ }
106
+ // Log progress every 10s
107
+ if (poll_count % 5 === 0) {
108
+ const elapsed = Math.round((Date.now() - (deadline - WAIT_FOR_PLUGIN_TIMEOUT_MS)) / 1000);
109
+ const remaining = Math.round((deadline - Date.now()) / 1000);
110
+ console.error(`[x64dbg-mcp] Still waiting for plugin... (${elapsed}s elapsed, ${remaining}s remaining)`);
111
+ }
112
+ }
113
+ this.state = 'disconnected';
114
+ throw new Error(`x64dbg plugin did not come online at ${this.base_url} within ${WAIT_FOR_PLUGIN_TIMEOUT_MS / 1000}s. ` +
115
+ `Make sure x64dbg is running with the MCP plugin loaded. ` +
116
+ `Check with 'mcpserver status' in x64dbg command bar.`);
117
+ }
118
+ is_connection_error(err) {
119
+ const msg = err.message.toLowerCase();
120
+ return (msg.includes('econnrefused') ||
121
+ msg.includes('econnreset') ||
122
+ msg.includes('epipe') ||
123
+ msg.includes('enotfound') ||
124
+ msg.includes('enetunreach') ||
125
+ msg.includes('ehostunreach') ||
126
+ msg.includes('socket hang up') ||
127
+ msg.includes('fetch failed') ||
128
+ msg.includes('network') ||
129
+ msg.includes('econnaborted') ||
130
+ msg.includes('etimedout'));
131
+ }
132
+ async request(url, options) {
133
+ // CRITICAL: If not connected, wait for the plugin to come online
134
+ // This prevents Claude from seeing connection errors and giving up
135
+ await this.wait_for_connection();
136
+ let last_error = null;
137
+ for (let attempt = 0; attempt <= config.retries; attempt++) {
138
+ try {
139
+ const controller = new AbortController();
140
+ const timeout_id = setTimeout(() => controller.abort(), config.timeout);
141
+ const response = await fetch(url, {
142
+ ...options,
143
+ signal: controller.signal,
144
+ });
145
+ clearTimeout(timeout_id);
146
+ const text = await response.text();
147
+ let parsed;
148
+ try {
149
+ parsed = JSON.parse(text);
150
+ }
151
+ catch {
152
+ throw new Error(`Invalid JSON response from plugin: ${text.substring(0, 200)}`);
153
+ }
154
+ if (!parsed.success) {
155
+ const err_msg = parsed.error?.message ?? 'Unknown plugin error';
156
+ const err_code = parsed.error?.code ?? 500;
157
+ throw new Error(`Plugin error (${err_code}): ${err_msg}`);
158
+ }
159
+ // Success
160
+ this.state = 'connected';
161
+ this.consecutive_failures = 0;
162
+ this.last_successful_request = Date.now();
163
+ return parsed.data;
164
+ }
165
+ catch (err) {
166
+ last_error = err instanceof Error ? err : new Error(String(err));
167
+ // Don't retry on 4xx plugin errors - these are valid responses
168
+ if (last_error.message.includes('Plugin error (4')) {
169
+ this.state = 'connected';
170
+ throw last_error;
171
+ }
172
+ // Handle timeout
173
+ if (last_error.name === 'AbortError') {
174
+ this.consecutive_failures++;
175
+ if (attempt >= config.retries) {
176
+ throw new Error(`Request timed out after ${config.timeout}ms (${attempt + 1} attempts). ` +
177
+ `The plugin may be busy with a long operation.`);
178
+ }
179
+ // Brief pause before retry on timeout
180
+ await new Promise(resolve => setTimeout(resolve, 500));
181
+ continue;
182
+ }
183
+ // Connection errors mid-request: the plugin may have restarted
184
+ if (this.is_connection_error(last_error)) {
185
+ this.consecutive_failures++;
186
+ this.state = 'reconnecting';
187
+ console.error(`[x64dbg-mcp] Connection error on attempt ${attempt + 1}: ${last_error.message}`);
188
+ if (attempt < config.retries) {
189
+ // Wait for reconnection before retrying
190
+ console.error('[x64dbg-mcp] Waiting for plugin to come back...');
191
+ try {
192
+ await this.wait_for_connection();
193
+ continue; // Plugin is back, retry the request
194
+ }
195
+ catch {
196
+ throw last_error; // Timed out waiting
197
+ }
198
+ }
199
+ this.state = 'disconnected';
200
+ throw new Error(`Lost connection to x64dbg plugin at ${this.base_url}. ` +
201
+ `The plugin may have been stopped or x64dbg was closed.`);
202
+ }
203
+ // Other errors - brief retry
204
+ if (attempt < config.retries) {
205
+ await new Promise(resolve => setTimeout(resolve, 300 * (attempt + 1)));
206
+ }
207
+ }
208
+ }
209
+ throw last_error ?? new Error('Request failed');
210
+ }
211
+ }
212
+ export const httpClient = new HttpClient();
213
+ //# sourceMappingURL=http_client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http_client.js","sourceRoot":"","sources":["../src/http_client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAajD,0EAA0E;AAC1E,MAAM,0BAA0B,GAAG,OAAO,CAAC,CAAC,YAAY;AACxD,MAAM,qBAAqB,GAAG,KAAK,CAAC,CAAQ,gBAAgB;AAE5D,MAAM,OAAO,UAAU;IACb,QAAQ,CAAS;IACjB,KAAK,GAAoB,cAAc,CAAC;IACxC,uBAAuB,GAAG,CAAC,CAAC;IAC5B,oBAAoB,GAAG,CAAC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MAAM,IAAI,CAAC,mBAAmB,EAAE,CAAC;4BACjC,SAAS,CAAC,oCAAoC;wBAChD,CAAC;wBAAC,MAAM,CAAC;4BACP,MAAM,UAAU,CAAC,CAAC,oBAAoB;wBACxC,CAAC;oBACH,CAAC;oBAED,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC;oBAC5B,MAAM,IAAI,KAAK,CACb,uCAAuC,IAAI,CAAC,QAAQ,IAAI;wBACxD,wDAAwD,CACzD,CAAC;gBACJ,CAAC;gBAED,6BAA6B;gBAC7B,IAAI,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;oBAC7B,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;gBACzE,CAAC;YACH,CAAC;QACH,CAAC;QAED,MAAM,UAAU,IAAI,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAClD,CAAC;CACF;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js ADDED
@@ -0,0 +1,32 @@
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 { registerAllTools } from './tools/index.js';
5
+ import { config } from './config.js';
6
+ import { httpClient } from './http_client.js';
7
+ async function main() {
8
+ const server = new McpServer({
9
+ name: 'x64dbg',
10
+ version: '1.0.0',
11
+ });
12
+ // Register all 152 tools
13
+ registerAllTools(server);
14
+ // Connect via stdio (rock-solid transport, no connection drops)
15
+ const transport = new StdioServerTransport();
16
+ await server.connect(transport);
17
+ // Log to stderr (stdout is used by MCP protocol)
18
+ console.error(`[x64dbg-mcp] Server started (152 tools), plugin expected at ${config.host}:${config.port}`);
19
+ console.error(`[x64dbg-mcp] Timeout: ${config.timeout}ms, Retries: ${config.retries}`);
20
+ // Graceful shutdown
21
+ const cleanup = () => {
22
+ httpClient.destroy();
23
+ process.exit(0);
24
+ };
25
+ process.on('SIGINT', cleanup);
26
+ process.on('SIGTERM', cleanup);
27
+ }
28
+ main().catch((err) => {
29
+ console.error('[x64dbg-mcp] Fatal error:', err);
30
+ process.exit(1);
31
+ });
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,OAAO;KACjB,CAAC,CAAC;IAEH,yBAAyB;IACzB,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAEzB,gEAAgE;IAChE,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,iDAAiD;IACjD,OAAO,CAAC,KAAK,CAAC,+DAA+D,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3G,OAAO,CAAC,KAAK,CAAC,yBAAyB,MAAM,CAAC,OAAO,gBAAgB,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IAEvF,oBAAoB;IACpB,MAAM,OAAO,GAAG,GAAG,EAAE;QACnB,UAAU,CAAC,OAAO,EAAE,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IACF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC9B,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACjC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAC;IAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function registerAnalysisTools(server: McpServer): void;
3
+ //# sourceMappingURL=analysis.d.ts.map
@@ -0,0 +1,81 @@
1
+ import { z } from 'zod';
2
+ import { httpClient } from '../http_client.js';
3
+ export function registerAnalysisTools(server) {
4
+ // Existing analysis routes (were previously not in MCP)
5
+ server.tool('get_function_info', 'Get function boundaries, label, and module at an address', {
6
+ address: z.string().optional().default('cip').describe('Address within the function (default: current instruction)'),
7
+ }, async ({ address }) => {
8
+ const data = await httpClient.get('/api/analysis/function', { address });
9
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
10
+ });
11
+ server.tool('get_xrefs_to', 'Get cross-references TO an address (who calls/jumps to this address)', {
12
+ address: z.string().describe('Target address to find references to'),
13
+ }, async ({ address }) => {
14
+ const data = await httpClient.get('/api/analysis/xrefs_to', { address });
15
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
16
+ });
17
+ server.tool('get_xrefs_from', 'Get cross-references FROM an address (what does this instruction reference)', {
18
+ address: z.string().describe('Source address to find references from'),
19
+ }, async ({ address }) => {
20
+ const data = await httpClient.get('/api/analysis/xrefs_from', { address });
21
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
22
+ });
23
+ server.tool('get_basic_blocks', 'Get basic blocks (CFG) for a function. Returns block start/end addresses and sizes.', {
24
+ address: z.string().optional().default('cip').describe('Address within the function'),
25
+ }, async ({ address }) => {
26
+ const data = await httpClient.get('/api/analysis/basic_blocks', { address });
27
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
28
+ });
29
+ server.tool('find_strings_in_module', 'Find string references in a module (displayed in x64dbg references view)', {
30
+ module: z.string().describe('Module name to search for strings'),
31
+ }, async ({ module }) => {
32
+ const data = await httpClient.get('/api/analysis/strings', { module });
33
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
34
+ });
35
+ // New Tier 2 tools: Constants, error codes, watches, structs
36
+ server.tool('list_constants', 'List all known constants in the x64dbg database (Windows API constants, etc.)', {}, async () => {
37
+ const data = await httpClient.get('/api/analysis/constants');
38
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
39
+ });
40
+ server.tool('list_error_codes', 'List all known Windows error codes (GetLastError values) with their names', {}, async () => {
41
+ const data = await httpClient.get('/api/analysis/error_codes');
42
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
43
+ });
44
+ server.tool('is_watchdog_triggered', 'Check if a watch expression watchdog has been triggered', {
45
+ id: z.string().optional().default('0').describe('Watch ID (decimal)'),
46
+ }, async ({ id }) => {
47
+ const data = await httpClient.get('/api/analysis/watch', { id });
48
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
49
+ });
50
+ server.tool('list_structs', 'List all defined struct types in the x64dbg database', {}, async () => {
51
+ const data = await httpClient.get('/api/analysis/structs');
52
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
53
+ });
54
+ // Tier 3 analysis tools
55
+ server.tool('get_source_location', 'Get the source file and line number for an address (requires debug symbols)', {
56
+ address: z.string().optional().default('cip').describe('Address to look up source for'),
57
+ }, async ({ address }) => {
58
+ const data = await httpClient.get('/api/analysis/source', { address });
59
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
60
+ });
61
+ server.tool('va_to_file_offset', 'Convert a virtual address (VA) to the corresponding file offset on disk', {
62
+ address: z.string().describe('Virtual address to convert'),
63
+ }, async ({ address }) => {
64
+ const data = await httpClient.get('/api/analysis/va_to_file', { address });
65
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
66
+ });
67
+ server.tool('file_offset_to_va', 'Convert a file offset to the corresponding virtual address (VA) in the loaded module', {
68
+ module: z.string().describe('Module name'),
69
+ offset: z.string().describe('File offset (hex)'),
70
+ }, async ({ module, offset }) => {
71
+ const data = await httpClient.get('/api/analysis/file_to_va', { module, offset });
72
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
73
+ });
74
+ server.tool('get_mnemonic_brief', 'Get a brief description of an x86/x64 instruction mnemonic (e.g. "mov", "jmp", "call")', {
75
+ mnemonic: z.string().describe('Instruction mnemonic (e.g. "mov", "push", "xor")'),
76
+ }, async ({ mnemonic }) => {
77
+ const data = await httpClient.get('/api/analysis/mnemonic_brief', { mnemonic });
78
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
79
+ });
80
+ }
81
+ //# sourceMappingURL=analysis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analysis.js","sourceRoot":"","sources":["../../src/tools/analysis.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,UAAU,qBAAqB,CAAC,MAAiB;IACrD,wDAAwD;IACxD,MAAM,CAAC,IAAI,CACT,mBAAmB,EACnB,0DAA0D,EAC1D;QACE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,4DAA4D,CAAC;KACrH,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,EAA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aAAa,CAAC;QAC1C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;KACjD,EACD,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE;QAC3B,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAClF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IAC9E,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,oBAAoB,EACpB,wFAAwF,EACxF;QACE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;KAClF,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,8BAA8B,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QAChF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IAC9E,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function registerAntiDebugTools(server: McpServer): void;
3
+ //# sourceMappingURL=antidebug.d.ts.map
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ import { httpClient } from '../http_client.js';
3
+ export function registerAntiDebugTools(server) {
4
+ server.tool('get_peb_info', 'Read PEB (Process Environment Block) fields including BeingDebugged, NtGlobalFlag, and ProcessHeap. Essential for understanding anti-debug checks in VMProtect/Themida.', {
5
+ pid: z.string().optional().default('').describe('Process ID (default: current debuggee PID)'),
6
+ }, async ({ pid }) => {
7
+ const data = await httpClient.get('/api/antidebug/peb', { pid });
8
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
9
+ });
10
+ server.tool('get_teb_info', 'Read TEB (Thread Environment Block) fields including SEH chain, stack base/limit, and PEB pointer', {
11
+ tid: z.string().optional().default('').describe('Thread ID (default: current thread)'),
12
+ }, async ({ tid }) => {
13
+ const data = await httpClient.get('/api/antidebug/teb', { tid });
14
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
15
+ });
16
+ server.tool('hide_debugger', 'Hide the debugger by zeroing PEB.BeingDebugged and PEB.NtGlobalFlag. Bypasses common anti-debug checks used by VMProtect, Themida, and other protectors.', {}, async () => {
17
+ const data = await httpClient.post('/api/antidebug/hide_debugger');
18
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
19
+ });
20
+ server.tool('get_dep_status', 'Check if Data Execution Prevention (DEP) is enabled for the debugged process', {}, async () => {
21
+ const data = await httpClient.get('/api/antidebug/dep_status');
22
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
23
+ });
24
+ }
25
+ //# sourceMappingURL=antidebug.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"antidebug.js","sourceRoot":"","sources":["../../src/tools/antidebug.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,UAAU,sBAAsB,CAAC,MAAiB;IACtD,MAAM,CAAC,IAAI,CACT,cAAc,EACd,yKAAyK,EACzK;QACE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,4CAA4C,CAAC;KAC9F,EACD,KA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A8E,EAC9E,EAAE,EACF,KAAK,IAAI,EAAE;QACT,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;QAC/D,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IAC9E,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function registerBreakpointTools(server: McpServer): void;
3
+ //# sourceMappingURL=breakpoints.d.ts.map
@@ -0,0 +1,124 @@
1
+ import { z } from 'zod';
2
+ import { httpClient } from '../http_client.js';
3
+ export function registerBreakpointTools(server) {
4
+ server.tool('list_breakpoints', 'List all breakpoints (software, hardware, and memory)', {}, async () => {
5
+ const data = await httpClient.get('/api/breakpoints/list');
6
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
7
+ });
8
+ server.tool('get_breakpoint', 'Get detailed info about a breakpoint at a specific address', { address: z.string().describe('Breakpoint address (hex string or expression)') }, async ({ address }) => {
9
+ const data = await httpClient.get('/api/breakpoints/get', { address });
10
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
11
+ });
12
+ server.tool('set_breakpoint', 'Set a software breakpoint (INT3) at an address', {
13
+ address: z.string().describe('Address for the breakpoint (hex string, symbol name, or expression)'),
14
+ singleshot: z.boolean().optional().default(false).describe('If true, breakpoint is deleted after first hit'),
15
+ }, async ({ address, singleshot }) => {
16
+ const data = await httpClient.post('/api/breakpoints/set', { address, singleshot });
17
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
18
+ });
19
+ server.tool('set_hardware_breakpoint', 'Set a hardware breakpoint using debug registers (limited to 4)', {
20
+ address: z.string().describe('Address for the hardware breakpoint'),
21
+ type: z.enum(['r', 'w', 'x']).optional().default('x').describe('Type: r=read, w=write, x=execute (default: x)'),
22
+ size: z.enum(['1', '2', '4', '8']).optional().default('1').describe('Size in bytes: 1, 2, 4, or 8 (default: 1)'),
23
+ }, async ({ address, type, size }) => {
24
+ const data = await httpClient.post('/api/breakpoints/set_hardware', { address, type, size });
25
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
26
+ });
27
+ server.tool('set_memory_breakpoint', 'Set a memory breakpoint (page guard) on a memory region', {
28
+ address: z.string().describe('Address for the memory breakpoint'),
29
+ type: z.enum(['a', 'r', 'w', 'x']).optional().default('a').describe('Type: a=access, r=read, w=write, x=execute (default: a)'),
30
+ }, async ({ address, type }) => {
31
+ const data = await httpClient.post('/api/breakpoints/set_memory', { address, type });
32
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
33
+ });
34
+ server.tool('delete_breakpoint', 'Delete a breakpoint at an address', {
35
+ address: z.string().describe('Address of the breakpoint to delete'),
36
+ type: z.enum(['software', 'hardware', 'memory']).optional().default('software').describe('Breakpoint type (default: software)'),
37
+ }, async ({ address, type }) => {
38
+ const data = await httpClient.post('/api/breakpoints/delete', { address, type });
39
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
40
+ });
41
+ server.tool('enable_breakpoint', 'Enable a disabled breakpoint', { address: z.string().describe('Address of the breakpoint to enable') }, async ({ address }) => {
42
+ const data = await httpClient.post('/api/breakpoints/enable', { address });
43
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
44
+ });
45
+ server.tool('disable_breakpoint', 'Disable a breakpoint without deleting it', { address: z.string().describe('Address of the breakpoint to disable') }, async ({ address }) => {
46
+ const data = await httpClient.post('/api/breakpoints/disable', { address });
47
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
48
+ });
49
+ server.tool('toggle_breakpoint', 'Toggle a breakpoint between enabled and disabled', { address: z.string().describe('Address of the breakpoint to toggle') }, async ({ address }) => {
50
+ const data = await httpClient.post('/api/breakpoints/toggle', { address });
51
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
52
+ });
53
+ server.tool('set_breakpoint_condition', 'Set a conditional expression on a breakpoint (breaks only when condition is true)', {
54
+ address: z.string().describe('Address of the breakpoint'),
55
+ condition: z.string().describe('Condition expression (e.g. "eax==0", "rcx>0x100")'),
56
+ }, async ({ address, condition }) => {
57
+ const data = await httpClient.post('/api/breakpoints/set_condition', { address, condition });
58
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
59
+ });
60
+ server.tool('set_breakpoint_log', 'Set a log message on a breakpoint (logs without breaking)', {
61
+ address: z.string().describe('Address of the breakpoint'),
62
+ text: z.string().describe('Log format string (e.g. "eax={eax}, ecx={ecx}")'),
63
+ }, async ({ address, text }) => {
64
+ const data = await httpClient.post('/api/breakpoints/set_log', { address, text });
65
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
66
+ });
67
+ server.tool('configure_breakpoint', 'Unified breakpoint configuration in a single call. Creates the BP if needed, then sets all provided fields.\n' +
68
+ 'Replaces the 6-call workflow (set + condition + command_condition + command_text + silent + fast_resume).\n\n' +
69
+ 'IMPORTANT x64dbg expression syntax:\n' +
70
+ ' - Memory dereference: use [addr] NOT poi(addr). poi() silently fails in breakpoint commands!\n' +
71
+ ' - Format strings: use {format:expr} NOT {expr:format}\n' +
72
+ ' - Example break_condition: "0" (never pause), "[esp+8]==11"\n' +
73
+ ' - Example command_text: "eax=0;eip=[esp];esp=esp+C;run"\n' +
74
+ ' - Example command_condition: "[esp+8]>=0x675C0000&&[esp+8]<0x67DC3000"', {
75
+ address: z.string().describe('Breakpoint address (hex string, symbol name, or expression)'),
76
+ bp_type: z.enum(['software', 'hardware', 'memory']).optional().default('software').describe('Breakpoint type'),
77
+ singleshot: z.boolean().optional().describe('(software only) Delete after first hit'),
78
+ hw_type: z.enum(['r', 'w', 'x']).optional().describe('(hardware only) r=read, w=write, x=execute'),
79
+ hw_size: z.enum(['1', '2', '4', '8']).optional().describe('(hardware only) Size in bytes'),
80
+ mem_type: z.enum(['a', 'r', 'w', 'x']).optional().describe('(memory only) a=access, r=read, w=write, x=execute'),
81
+ break_condition: z.string().optional().describe('Condition to PAUSE execution (empty=always, "0"=never, "[eax]==5")'),
82
+ command_condition: z.string().optional().describe('Condition to run command_text (empty=always, "[esp+8]==11")'),
83
+ command_text: z.string().optional().describe('x64dbg commands to run on hit (e.g. "eax=0;eip=[esp];esp=esp+C;run")'),
84
+ log_text: z.string().optional().describe('Log format string on hit (e.g. "{p:[esp]} called")'),
85
+ log_condition: z.string().optional().describe('Condition to log (empty=always)'),
86
+ silent: z.boolean().optional().describe('Suppress log output'),
87
+ fast_resume: z.boolean().optional().describe('Resume immediately without pausing (for non-intrusive BP monitoring)'),
88
+ name: z.string().optional().describe('Human-readable name for this breakpoint'),
89
+ }, async (params) => {
90
+ const data = await httpClient.post('/api/breakpoints/configure', params);
91
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
92
+ });
93
+ server.tool('configure_breakpoints', 'Batch configure multiple breakpoints in a single call. ' +
94
+ 'Reduces 48 MCP calls (8 BPs × 6 calls each) to a single call. ' +
95
+ 'Each entry in the breakpoints array has the same fields as configure_breakpoint.', {
96
+ breakpoints: z.array(z.object({
97
+ address: z.string().describe('Breakpoint address'),
98
+ bp_type: z.enum(['software', 'hardware', 'memory']).optional(),
99
+ singleshot: z.boolean().optional(),
100
+ hw_type: z.string().optional(),
101
+ hw_size: z.string().optional(),
102
+ mem_type: z.string().optional(),
103
+ break_condition: z.string().optional(),
104
+ command_condition: z.string().optional(),
105
+ command_text: z.string().optional(),
106
+ log_text: z.string().optional(),
107
+ log_condition: z.string().optional(),
108
+ silent: z.boolean().optional(),
109
+ fast_resume: z.boolean().optional(),
110
+ name: z.string().optional(),
111
+ })).describe('Array of breakpoint configurations'),
112
+ }, async ({ breakpoints }) => {
113
+ const data = await httpClient.post('/api/breakpoints/configure_batch', { breakpoints });
114
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
115
+ });
116
+ server.tool('reset_breakpoint_hit_count', 'Reset the hit counter for a breakpoint to zero. ' +
117
+ 'Useful when testing bypass configurations to get a clean delta from a known baseline.', {
118
+ address: z.string().describe('Address of the breakpoint whose hit count to reset'),
119
+ }, async ({ address }) => {
120
+ const data = await httpClient.post('/api/breakpoints/reset_hit_count', { address });
121
+ return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
122
+ });
123
+ }
124
+ //# sourceMappingURL=breakpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakpoints.js","sourceRoot":"","sources":["../../src/tools/breakpoints.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,UAAU,uBAAuB,CAAC,MAAiB;IACvD,MAAM,CAAC,IAAI,CACT,kBAAkB,EAClB,uDAAuD,EACvD,EAAE,EACF,KAAK,IAAI,EAAE;QACT,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;QAC3D,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IAC9E,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,gBAAgB,EAChB,4DAA4D,EAC5D,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC,EAAE,EACjF,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACpB,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;QACvE,OAAO,EAAE,OAAO,E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AC,OAAO,EAAE,CAAC,QAAQ,EAAE;YACnC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC5B,CAAC,CAAC,CAAC,QAAQ,CAAC,oCAAoC,CAAC;KACnD,EACD,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;QACxB,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;QACxF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IAC9E,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,4BAA4B,EAC5B,kDAAkD;QAClD,uFAAuF,EACvF;QACE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;KACnF,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACpB,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;QACpF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IAC9E,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function registerCommandTools(server: McpServer): void;
3
+ //# sourceMappingURL=command.d.ts.map