gitnexus-mcp 0.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 (53) hide show
  1. package/dist/bridge/daemon-client.d.ts +77 -0
  2. package/dist/bridge/daemon-client.d.ts.map +1 -0
  3. package/dist/bridge/daemon-client.js +135 -0
  4. package/dist/bridge/daemon-client.js.map +1 -0
  5. package/dist/bridge/protocol.d.ts +28 -0
  6. package/dist/bridge/protocol.d.ts.map +1 -0
  7. package/dist/bridge/protocol.js +18 -0
  8. package/dist/bridge/protocol.js.map +1 -0
  9. package/dist/bridge/websocket-server.d.ts +85 -0
  10. package/dist/bridge/websocket-server.d.ts.map +1 -0
  11. package/dist/bridge/websocket-server.js +180 -0
  12. package/dist/bridge/websocket-server.js.map +1 -0
  13. package/dist/cli.d.ts +9 -0
  14. package/dist/cli.d.ts.map +1 -0
  15. package/dist/cli.js +56 -0
  16. package/dist/cli.js.map +1 -0
  17. package/dist/commands/daemon.d.ts +37 -0
  18. package/dist/commands/daemon.d.ts.map +1 -0
  19. package/dist/commands/daemon.js +173 -0
  20. package/dist/commands/daemon.js.map +1 -0
  21. package/dist/commands/generate-guidance.d.ts +13 -0
  22. package/dist/commands/generate-guidance.d.ts.map +1 -0
  23. package/dist/commands/generate-guidance.js +140 -0
  24. package/dist/commands/generate-guidance.js.map +1 -0
  25. package/dist/commands/serve.d.ts +13 -0
  26. package/dist/commands/serve.d.ts.map +1 -0
  27. package/dist/commands/serve.js +23 -0
  28. package/dist/commands/serve.js.map +1 -0
  29. package/dist/commands/setup.d.ts +8 -0
  30. package/dist/commands/setup.d.ts.map +1 -0
  31. package/dist/commands/setup.js +48 -0
  32. package/dist/commands/setup.js.map +1 -0
  33. package/dist/config/detect-ides.d.ts +12 -0
  34. package/dist/config/detect-ides.d.ts.map +1 -0
  35. package/dist/config/detect-ides.js +81 -0
  36. package/dist/config/detect-ides.js.map +1 -0
  37. package/dist/config/inject-config.d.ts +9 -0
  38. package/dist/config/inject-config.d.ts.map +1 -0
  39. package/dist/config/inject-config.js +65 -0
  40. package/dist/config/inject-config.js.map +1 -0
  41. package/dist/config/paths.d.ts +16 -0
  42. package/dist/config/paths.d.ts.map +1 -0
  43. package/dist/config/paths.js +32 -0
  44. package/dist/config/paths.js.map +1 -0
  45. package/dist/mcp/server.d.ts +21 -0
  46. package/dist/mcp/server.d.ts.map +1 -0
  47. package/dist/mcp/server.js +183 -0
  48. package/dist/mcp/server.js.map +1 -0
  49. package/dist/mcp/tools.d.ts +24 -0
  50. package/dist/mcp/tools.d.ts.map +1 -0
  51. package/dist/mcp/tools.js +166 -0
  52. package/dist/mcp/tools.js.map +1 -0
  53. package/package.json +45 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inject-config.js","sourceRoot":"","sources":["../../src/config/inject-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAuB/B,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,GAAQ,EAAE,UAAkB;IAChE,uCAAuC;IACvC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;QAChC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACpC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,qCAAqC;IACrC,IAAI,GAAG,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QAC5B,MAAM,oBAAoB,CAAC,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACvD,OAAO;IACT,CAAC;IAED,4EAA4E;IAC5E,IAAI,MAAM,GAAsB,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;IAEnD,kCAAkC;IACl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C;IAEF,uBAAuB;IACvB,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Path Utilities
3
+ *
4
+ * Resolves paths for the MCP bridge executable.
5
+ */
6
+ /**
7
+ * Get the path to this CLI executable.
8
+ * When installed via npm, this will be in node_modules/.bin/
9
+ * The MCP config needs to point to the actual executable.
10
+ */
11
+ export declare function getBridgePath(): string;
12
+ /**
13
+ * Get user's GitNexus config directory
14
+ */
15
+ export declare function getGitNexusConfigDir(): string;
16
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/config/paths.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,MAAM,CActC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAG7C"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Path Utilities
3
+ *
4
+ * Resolves paths for the MCP bridge executable.
5
+ */
6
+ import { fileURLToPath } from 'url';
7
+ import { dirname, resolve } from 'path';
8
+ /**
9
+ * Get the path to this CLI executable.
10
+ * When installed via npm, this will be in node_modules/.bin/
11
+ * The MCP config needs to point to the actual executable.
12
+ */
13
+ export function getBridgePath() {
14
+ // When running as ES module, we need to resolve from import.meta.url
15
+ // But for the installed package, we want the bin path
16
+ // Get the path to this module
17
+ const __filename = fileURLToPath(import.meta.url);
18
+ const __dirname = dirname(__filename);
19
+ // Go up from dist/config/ to the package root, then to the bin
20
+ const packageRoot = resolve(__dirname, '..', '..');
21
+ const binPath = resolve(packageRoot, 'dist', 'cli.js');
22
+ // Return as node command since it's a JS file
23
+ return `node ${binPath}`;
24
+ }
25
+ /**
26
+ * Get user's GitNexus config directory
27
+ */
28
+ export function getGitNexusConfigDir() {
29
+ const home = process.env.HOME || process.env.USERPROFILE || '';
30
+ return resolve(home, '.gitnexus');
31
+ }
32
+ //# sourceMappingURL=paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/config/paths.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAExC;;;;GAIG;AACH,MAAM,UAAU,aAAa;IAC3B,qEAAqE;IACrE,sDAAsD;IAEtD,8BAA8B;IAC9B,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAEtC,+DAA+D;IAC/D,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAEvD,8CAA8C;IAC9C,OAAO,QAAQ,OAAO,EAAE,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC;IAC/D,OAAO,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;AACpC,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * MCP Server
3
+ *
4
+ * Model Context Protocol server that runs on stdio.
5
+ * External AI tools (Cursor, Claude Code) spawn this process and
6
+ * communicate via stdin/stdout using the MCP protocol.
7
+ *
8
+ * Exposes:
9
+ * - Tools: search, cypher, blastRadius, highlight
10
+ * - Resources: codebase context (stats, hotspots, folder tree)
11
+ */
12
+ import type { CodebaseContext } from '../bridge/websocket-server.js';
13
+ interface ToolCaller {
14
+ callTool(method: string, params: any): Promise<any>;
15
+ disconnect?(): void;
16
+ context?: CodebaseContext | null;
17
+ onContextChange?: (listener: (context: CodebaseContext | null) => void) => () => void;
18
+ }
19
+ export declare function startMCPServer(client: ToolCaller): Promise<void>;
20
+ export {};
21
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGrE,UAAU,UAAU;IAClB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACpD,UAAU,CAAC,IAAI,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACjC,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;CACvF;AAoED,wBAAsB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA0HtE"}
@@ -0,0 +1,183 @@
1
+ /**
2
+ * MCP Server
3
+ *
4
+ * Model Context Protocol server that runs on stdio.
5
+ * External AI tools (Cursor, Claude Code) spawn this process and
6
+ * communicate via stdin/stdout using the MCP protocol.
7
+ *
8
+ * Exposes:
9
+ * - Tools: search, cypher, blastRadius, highlight
10
+ * - Resources: codebase context (stats, hotspots, folder tree)
11
+ */
12
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
13
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
14
+ import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
15
+ import { GITNEXUS_TOOLS } from './tools.js';
16
+ /**
17
+ * Format context as markdown for the resource
18
+ */
19
+ function formatContextAsMarkdown(context) {
20
+ const { projectName, stats, hotspots, folderTree } = context;
21
+ const lines = [];
22
+ lines.push(`# GitNexus: ${projectName}`);
23
+ lines.push('');
24
+ lines.push('This codebase is currently loaded in GitNexus. Use the tools below to explore it.');
25
+ lines.push('');
26
+ // Stats
27
+ lines.push('## 📊 Statistics');
28
+ lines.push(`- **Files**: ${stats.fileCount}`);
29
+ lines.push(`- **Functions**: ${stats.functionCount}`);
30
+ if (stats.classCount > 0)
31
+ lines.push(`- **Classes**: ${stats.classCount}`);
32
+ if (stats.interfaceCount > 0)
33
+ lines.push(`- **Interfaces**: ${stats.interfaceCount}`);
34
+ if (stats.methodCount > 0)
35
+ lines.push(`- **Methods**: ${stats.methodCount}`);
36
+ lines.push('');
37
+ // Hotspots
38
+ if (hotspots.length > 0) {
39
+ lines.push('## 🔥 Hotspots (Most Connected Nodes)');
40
+ lines.push('');
41
+ hotspots.forEach(h => {
42
+ lines.push(`- \`${h.name}\` (${h.type}) — ${h.connections} connections — ${h.filePath}`);
43
+ });
44
+ lines.push('');
45
+ }
46
+ // Folder tree
47
+ if (folderTree) {
48
+ lines.push('## 📁 Project Structure');
49
+ lines.push('```');
50
+ lines.push(projectName + '/');
51
+ lines.push(folderTree);
52
+ lines.push('```');
53
+ lines.push('');
54
+ }
55
+ // Usage hints
56
+ lines.push('## 🛠️ Available Tools');
57
+ lines.push('');
58
+ lines.push('- **search**: Semantic search across the codebase');
59
+ lines.push('- **cypher**: Execute Cypher queries on the knowledge graph');
60
+ lines.push('- **blastRadius**: Analyze impact of changes to a node');
61
+ lines.push('- **highlight**: Visualize nodes in the graph');
62
+ lines.push('');
63
+ lines.push('## 📝 Graph Schema');
64
+ lines.push('');
65
+ lines.push('**Node Types**: File, Folder, Function, Class, Interface, Method');
66
+ lines.push('');
67
+ lines.push('**Relation**: `CodeRelation` with `type` property:');
68
+ lines.push('- CONTAINS, DEFINES, IMPORTS, CALLS, EXTENDS, IMPLEMENTS');
69
+ lines.push('');
70
+ lines.push('**Example Cypher Queries**:');
71
+ lines.push('```cypher');
72
+ lines.push('MATCH (f:Function) RETURN f.name LIMIT 10');
73
+ lines.push("MATCH (f:File)-[:CodeRelation {type: 'IMPORTS'}]->(g:File) RETURN f.name, g.name");
74
+ lines.push('```');
75
+ return lines.join('\n');
76
+ }
77
+ export async function startMCPServer(client) {
78
+ const server = new Server({
79
+ name: 'gitnexus',
80
+ version: '0.1.0',
81
+ }, {
82
+ capabilities: {
83
+ tools: {},
84
+ resources: {},
85
+ },
86
+ });
87
+ // Handle list resources request
88
+ server.setRequestHandler(ListResourcesRequestSchema, async () => {
89
+ const context = client.context;
90
+ if (!context) {
91
+ return { resources: [] };
92
+ }
93
+ return {
94
+ resources: [
95
+ {
96
+ uri: 'gitnexus://codebase/context',
97
+ name: `GitNexus: ${context.projectName}`,
98
+ description: `Codebase context for ${context.projectName} (${context.stats.fileCount} files, ${context.stats.functionCount} functions)`,
99
+ mimeType: 'text/markdown',
100
+ },
101
+ ],
102
+ };
103
+ });
104
+ // Handle read resource request
105
+ server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
106
+ const { uri } = request.params;
107
+ if (uri === 'gitnexus://codebase/context') {
108
+ const context = client.context;
109
+ if (!context) {
110
+ return {
111
+ contents: [
112
+ {
113
+ uri,
114
+ mimeType: 'text/plain',
115
+ text: 'No codebase loaded. Open GitNexus in your browser and load a repository.',
116
+ },
117
+ ],
118
+ };
119
+ }
120
+ return {
121
+ contents: [
122
+ {
123
+ uri,
124
+ mimeType: 'text/markdown',
125
+ text: formatContextAsMarkdown(context),
126
+ },
127
+ ],
128
+ };
129
+ }
130
+ throw new Error(`Unknown resource: ${uri}`);
131
+ });
132
+ // Handle list tools request
133
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
134
+ tools: GITNEXUS_TOOLS.map((tool) => ({
135
+ name: tool.name,
136
+ description: tool.description,
137
+ inputSchema: tool.inputSchema,
138
+ })),
139
+ }));
140
+ // Handle tool calls
141
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
142
+ const { name, arguments: args } = request.params;
143
+ try {
144
+ // Forward the tool call to the browser via daemon
145
+ const result = await client.callTool(name, args);
146
+ return {
147
+ content: [
148
+ {
149
+ type: 'text',
150
+ text: typeof result === 'string' ? result : JSON.stringify(result, null, 2),
151
+ },
152
+ ],
153
+ };
154
+ }
155
+ catch (error) {
156
+ const message = error instanceof Error ? error.message : 'Unknown error';
157
+ return {
158
+ content: [
159
+ {
160
+ type: 'text',
161
+ text: `Error: ${message}`,
162
+ },
163
+ ],
164
+ isError: true,
165
+ };
166
+ }
167
+ });
168
+ // Connect to stdio transport
169
+ const transport = new StdioServerTransport();
170
+ await server.connect(transport);
171
+ // Handle graceful shutdown
172
+ process.on('SIGINT', async () => {
173
+ client.disconnect?.();
174
+ await server.close();
175
+ process.exit(0);
176
+ });
177
+ process.on('SIGTERM', async () => {
178
+ client.disconnect?.();
179
+ await server.close();
180
+ process.exit(0);
181
+ });
182
+ }
183
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAW5C;;GAEG;AACH,SAAS,uBAAuB,CAAC,OAAwB;IACvD,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAE7D,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,CA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,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;YACzE,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,UAAU,OAAO,EAAE;qBAC1B;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,6BAA6B;IAC7B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,2BAA2B;IAC3B,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;QAC9B,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;QACtB,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QAC/B,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;QACtB,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * MCP Tool Definitions
3
+ *
4
+ * Defines the tools that GitNexus exposes to external AI agents.
5
+ * Each tool has a rich description with examples to help agents use them correctly.
6
+ */
7
+ export interface ToolDefinition {
8
+ name: string;
9
+ description: string;
10
+ inputSchema: {
11
+ type: 'object';
12
+ properties: Record<string, {
13
+ type: string;
14
+ description?: string;
15
+ default?: any;
16
+ items?: {
17
+ type: string;
18
+ };
19
+ }>;
20
+ required: string[];
21
+ };
22
+ }
23
+ export declare const GITNEXUS_TOOLS: ToolDefinition[];
24
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;YACzB,IAAI,EAAE,MAAM,CAAC;YACb,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,OAAO,CAAC,EAAE,GAAG,CAAC;YACd,KAAK,CAAC,EAAE;gBAAE,IAAI,EAAE,MAAM,CAAA;aAAE,CAAC;SAC1B,CAAC,CAAC;QACH,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;CACH;AAED,eAAO,MAAM,cAAc,EAAE,cAAc,EA8J1C,CAAC"}
@@ -0,0 +1,166 @@
1
+ /**
2
+ * MCP Tool Definitions
3
+ *
4
+ * Defines the tools that GitNexus exposes to external AI agents.
5
+ * Each tool has a rich description with examples to help agents use them correctly.
6
+ */
7
+ export const GITNEXUS_TOOLS = [
8
+ {
9
+ name: 'context',
10
+ description: `Get GitNexus codebase context. CALL THIS FIRST before using other tools.
11
+
12
+ Returns:
13
+ - Project name and stats (files, functions, classes)
14
+ - Hotspots (most connected/important nodes)
15
+ - Directory structure (TOON format for token efficiency)
16
+ - Tool usage guidance
17
+
18
+ ALWAYS call this first to understand the codebase before searching or querying.`,
19
+ inputSchema: {
20
+ type: 'object',
21
+ properties: {},
22
+ required: [],
23
+ },
24
+ },
25
+ {
26
+ name: 'search',
27
+ description: `Hybrid search (keyword + semantic) across the codebase.
28
+ Returns code nodes with their graph connections.
29
+
30
+ WHEN TO USE:
31
+ - Finding implementations ("where is auth handled?")
32
+ - Understanding code flow ("what calls UserService?")
33
+ - Locating patterns ("find all API endpoints")
34
+
35
+ RETURNS: Array of {name, type, filePath, code, connections[]}`,
36
+ inputSchema: {
37
+ type: 'object',
38
+ properties: {
39
+ query: { type: 'string', description: 'Natural language or keyword search query' },
40
+ limit: { type: 'number', description: 'Max results to return', default: 10 },
41
+ },
42
+ required: ['query'],
43
+ },
44
+ },
45
+ {
46
+ name: 'cypher',
47
+ description: `Execute Cypher query against the code knowledge graph.
48
+
49
+ SCHEMA:
50
+ - Nodes: File, Function, Class, Interface, Method
51
+ - Edges: CALLS, IMPORTS, EXTENDS, IMPLEMENTS, CONTAINS
52
+
53
+ EXAMPLES:
54
+ • Find callers of a function:
55
+ MATCH (a)-[:CALLS]->(b:Function {name: "validateUser"}) RETURN a.name, a.filePath
56
+
57
+ • Find class hierarchy:
58
+ MATCH (c:Class)-[:EXTENDS*]->(base) WHERE c.name = "AdminUser" RETURN base.name
59
+
60
+ • Impact analysis (what depends on X):
61
+ MATCH (target:Function {name: $name})<-[:CALLS*1..3]-(caller) RETURN DISTINCT caller
62
+
63
+ TIPS:
64
+ - Relationship types are UPPERCASE: CALLS, IMPORTS, EXTENDS
65
+ - Node labels are PascalCase: Function, Class, Interface
66
+ - Properties: name, filePath, code, startLine, endLine`,
67
+ inputSchema: {
68
+ type: 'object',
69
+ properties: {
70
+ query: { type: 'string', description: 'Cypher query to execute' },
71
+ },
72
+ required: ['query'],
73
+ },
74
+ },
75
+ {
76
+ name: 'grep',
77
+ description: `Regex search for exact patterns in file contents.
78
+
79
+ WHEN TO USE:
80
+ - Finding exact strings: error codes, TODOs, specific API keys
81
+ - Pattern matching: all console.log, all fetch calls
82
+ - Finding imports of specific modules
83
+
84
+ BETTER THAN search for: exact matches, regex patterns, case-sensitive
85
+
86
+ RETURNS: Array of {filePath, line, lineNumber, match}`,
87
+ inputSchema: {
88
+ type: 'object',
89
+ properties: {
90
+ pattern: { type: 'string', description: 'Regex pattern to search for' },
91
+ caseSensitive: { type: 'boolean', description: 'Case-sensitive search', default: false },
92
+ maxResults: { type: 'number', description: 'Max results to return', default: 50 },
93
+ },
94
+ required: ['pattern'],
95
+ },
96
+ },
97
+ {
98
+ name: 'read',
99
+ description: `Read file content from the codebase.
100
+
101
+ WHEN TO USE:
102
+ - After search/grep to see full context
103
+ - To understand implementation details
104
+ - Before making changes
105
+
106
+ ALWAYS read before concluding - don't guess from names alone.
107
+
108
+ RETURNS: {filePath, content, language, lines}`,
109
+ inputSchema: {
110
+ type: 'object',
111
+ properties: {
112
+ filePath: { type: 'string', description: 'Path to file to read' },
113
+ startLine: { type: 'number', description: 'Start line (optional)' },
114
+ endLine: { type: 'number', description: 'End line (optional)' },
115
+ },
116
+ required: ['filePath'],
117
+ },
118
+ },
119
+ {
120
+ name: 'blastRadius',
121
+ description: `Analyze the impact of changing a code element.
122
+ Returns all nodes affected by modifying the target, with distance, edge type, and confidence.
123
+
124
+ USE BEFORE making changes to understand ripple effects.
125
+
126
+ Output format (compact tabular):
127
+ Type|Name|File:Line|EdgeType|Confidence%
128
+
129
+ EdgeType: CALLS, IMPORTS, EXTENDS, IMPLEMENTS
130
+ Confidence: 100% = certain, <80% = fuzzy match [fuzzy]
131
+
132
+ Depth groups:
133
+ - d=1: WILL BREAK (direct callers/importers)
134
+ - d=2: LIKELY AFFECTED (indirect)
135
+ - d=3: MAY NEED TESTING (transitive)`,
136
+ inputSchema: {
137
+ type: 'object',
138
+ properties: {
139
+ target: { type: 'string', description: 'Name of function, class, or file to analyze' },
140
+ direction: { type: 'string', description: 'upstream (what depends on this) or downstream (what this depends on)' },
141
+ maxDepth: { type: 'number', description: 'Max relationship depth (default: 3)', default: 3 },
142
+ relationTypes: { type: 'array', items: { type: 'string' }, description: 'Filter: CALLS, IMPORTS, EXTENDS, IMPLEMENTS, CONTAINS, DEFINES (default: usage-based)' },
143
+ includeTests: { type: 'boolean', description: 'Include test files (default: false)' },
144
+ minConfidence: { type: 'number', description: 'Minimum confidence 0-1 (default: 0.7)' },
145
+ },
146
+ required: ['target', 'direction'],
147
+ },
148
+ },
149
+ {
150
+ name: 'highlight',
151
+ description: `Highlight nodes in the GitNexus graph visualization.
152
+ Use after search/analysis to show the user what you found.
153
+
154
+ The user will see the nodes glow in the graph view.
155
+ Great for visual confirmation of your findings.`,
156
+ inputSchema: {
157
+ type: 'object',
158
+ properties: {
159
+ nodeIds: { type: 'array', items: { type: 'string' }, description: 'Array of node IDs to highlight' },
160
+ color: { type: 'string', description: 'Highlight color (optional, default: cyan)' },
161
+ },
162
+ required: ['nodeIds'],
163
+ },
164
+ },
165
+ ];
166
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiBH,MAAM,CAAC,MAAM,cAAc,GAAqB;IAC9C;QACE,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;;;;;;;;gFAQ+D;QAC5E,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,EAAE;SACb;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;;;;;;;;8DAQ6C;QAC1D,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0CAA0C,EAAE;gBAClF,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uBAAuB,EAAE,OAAO,EAAE,EAAE,EAAE;aAC7E;YACD,QAAQ,EAAE,CAAC,OAAO,CAAC;SACpB;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE;;;;;;;;;;;;;;;;;;;uDAmBsC;QACnD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,yBAAyB,EAAE;aACl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Q,EAAE,WAAW,EAAE,qCAAqC,EAAE,OAAO,EAAE,CAAC,EAAE;gBAC5F,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,uFAAuF,EAAE;gBACjK,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,qCAAqC,EAAE;gBACrF,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uCAAuC,EAAE;aACxF;YACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC;SAClC;KACF;IACD;QACE,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE;;;;gDAI+B;QAC5C,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,gCAAgC,EAAE;gBACpG,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2CAA2C,EAAE;aACpF;YACD,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB;KACF;CACF,CAAC"}
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "gitnexus-mcp",
3
+ "version": "0.1.0",
4
+ "description": "MCP server for GitNexus code intelligence - connect Cursor, Claude, and other AI agents to your codebase",
5
+ "author": "Abhigyan Patwari",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/abhigyanpatwari/GitNexus"
10
+ },
11
+ "keywords": [
12
+ "mcp",
13
+ "model-context-protocol",
14
+ "code-intelligence",
15
+ "cursor",
16
+ "claude",
17
+ "ai-agent",
18
+ "gitnexus"
19
+ ],
20
+ "type": "module",
21
+ "bin": {
22
+ "gitnexus-mcp": "./dist/cli.js"
23
+ },
24
+ "files": [
25
+ "dist"
26
+ ],
27
+ "scripts": {
28
+ "build": "tsc",
29
+ "dev": "tsx watch src/cli.ts",
30
+ "prepublishOnly": "npm run build"
31
+ },
32
+ "dependencies": {
33
+ "@modelcontextprotocol/sdk": "^1.0.0",
34
+ "ws": "^8.16.0"
35
+ },
36
+ "devDependencies": {
37
+ "@types/node": "^20.0.0",
38
+ "@types/ws": "^8.5.10",
39
+ "typescript": "^5.4.0",
40
+ "tsx": "^4.0.0"
41
+ },
42
+ "engines": {
43
+ "node": ">=18.0.0"
44
+ }
45
+ }