aidex-mcp 1.6.0 → 1.6.1

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to AiDex will be documented in this file.
4
4
 
5
+ ## [1.6.1] - 2026-02-01
6
+
7
+ ### Fixed
8
+ - **MCP Server version**: Now reads version dynamically from package.json (was hardcoded to 1.3.0)
9
+ - **`aidex setup` for local installs**: Detects if `aidex` is globally available; falls back to `node /full/path/index.js` when not installed globally
10
+
5
11
  ## [1.6.0] - 2026-02-01
6
12
 
7
13
  ### Added
package/FUTURE.md ADDED
@@ -0,0 +1,75 @@
1
+ # AiDex - Future Ideas
2
+
3
+ Ideensammlung für zukünftige Features und Erweiterungen.
4
+
5
+ ---
6
+
7
+ ## A. Projekt-Ebene (Erweiterungen für einzelne Projekte)
8
+
9
+ ### Datei-Abhängigkeiten (File Dependencies)
10
+ - Import/Require-Analyse: Welche Datei importiert welche?
11
+ - Impact-Analyse: "Wenn ich diese Datei ändere, welche anderen sind betroffen?"
12
+ - Visualisierung als Graph im Viewer
13
+
14
+ ---
15
+
16
+ ## B. AiDex Global / Hub (v2.0) - Neue Meta-Ebene
17
+
18
+ Meta-Ebene über allen AiDex-Projekten. Eine zentrale Datenbank (`~/.aidex/global.db`) die alle Projekt-Datenbanken kennt und somit das gesamte Ökosystem auf dem Rechner versteht.
19
+
20
+ ### 1. Projekt-Registry
21
+ - Automatische Registrierung bei jedem `aidex_init`
22
+ - Kennt Pfad, Name, Sprachen, Größe, letzter Zugriff
23
+ - Weiß welche Projekte aktiv/archiviert/veraltet sind
24
+
25
+ ### 2. Cross-Project Suche
26
+ - "Hab ich das schon mal gebaut?" → Sucht einen Term in ALLEN Projekten gleichzeitig
27
+ - "Wo benutze ich WebSockets?" → Findet alle Projekte mit WebSocket-Code
28
+ - "Hab ich mich damit schon mal beschäftigt?" → Durchsucht gesamtes Ökosystem
29
+
30
+ ### 3. Dependency-Graph zwischen Projekten ⭐
31
+ - LibPyramid3D wird von DebugViewer verwendet
32
+ - LibWebAppGpu wird von 6 Projekten referenziert
33
+ - "Was bricht wenn ich LibX ändere?"
34
+ - Automatische Erkennung über package.json, .csproj, Cargo.toml etc.
35
+
36
+ ### 4. Duplikat-Erkennung
37
+ - Identische oder ähnliche Methoden-Signaturen über Projekte hinweg
38
+ - "Du hast diese Utility-Funktion in 3 Projekten kopiert"
39
+ - Vorschläge zum Zusammenführen in eine Shared-Library
40
+
41
+ ### 5. Technologie-Profil
42
+ - "Du hast 12 TypeScript-Projekte, 8 C#, 3 Rust"
43
+ - Welche Frameworks/Libraries werden wo eingesetzt?
44
+ - Versions-Überblick: "5 Projekte nutzen React 18, 2 noch React 17"
45
+
46
+ ### 6. Pattern-Bibliothek
47
+ - Häufig wiederverwendete Code-Patterns automatisch erkennen
48
+ - "Deine typische HTTP-Client-Konfiguration sieht so aus..."
49
+ - Best-Practices aus eigenen Projekten ableiten
50
+
51
+ ### 7. Skill / Wissens-Map
52
+ - Aus Code ableiten: "Erfahrung mit: WebGL, Tree-sitter, SQLite, MCP Protocol, ..."
53
+ - Tiefe vs. Breite: Wo viel Code, wo nur mal reingeschnuppert?
54
+ - Nützlich für: "Kann ich das mit meinem Wissen umsetzen?"
55
+
56
+ ### 8. Projekt-Empfehlungen
57
+ - "Projekt A und B haben ähnliche Lösungen - zusammenführen?"
58
+ - "Projekt X wurde seit 8 Monaten nicht angefasst - archivieren?"
59
+ - "Du hast 3 verschiedene Logger-Implementierungen - konsolidieren?"
60
+
61
+ ### Technische Skizze
62
+
63
+ ```
64
+ ~/.aidex/
65
+ ├── global.db ← Zentrale Meta-DB
66
+ └── (config, cache)
67
+
68
+ Tabellen:
69
+ - projects (path, name, languages, last_session, file_count, method_count)
70
+ - global_index (term, project_id, file, line) ← aggregiert aus Projekt-DBs
71
+ - dependencies (project_id, depends_on, type)
72
+ - tags (project_id, tag)
73
+ ```
74
+
75
+ Die globale DB zapft die Projekt-DBs periodisch an und baut einen aggregierten Index auf - nicht alles kopieren, aber genug für Cross-Project Queries.
@@ -5,16 +5,26 @@
5
5
  * Also installs CLAUDE.md instructions for Claude Code/Desktop.
6
6
  */
7
7
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
8
- import { join, dirname } from 'path';
8
+ import { join, dirname, resolve } from 'path';
9
9
  import { homedir, platform } from 'os';
10
10
  import { execSync } from 'child_process';
11
+ import { fileURLToPath } from 'url';
11
12
  // ============================================================
12
- // MCP Server Entry (for JSON-based clients)
13
+ // MCP Server Command Detection
13
14
  // ============================================================
14
- const AIDEX_MCP_ENTRY = {
15
- command: 'aidex',
16
- args: []
17
- };
15
+ function getServerCommand() {
16
+ // Check if 'aidex' is available as a global command
17
+ try {
18
+ execSync(platform() === 'win32' ? 'where aidex' : 'which aidex', { stdio: 'pipe', timeout: 3000 });
19
+ return { command: 'aidex', args: [] };
20
+ }
21
+ catch {
22
+ // Not globally installed - use node with full path to index.js
23
+ }
24
+ const thisFile = fileURLToPath(import.meta.url);
25
+ const indexJs = resolve(dirname(thisFile), '..', 'index.js');
26
+ return { command: process.execPath, args: [indexJs] };
27
+ }
18
28
  // ============================================================
19
29
  // CLAUDE.md Instructions Block
20
30
  // ============================================================
@@ -72,11 +82,13 @@ function getClients() {
72
82
  const plat = platform();
73
83
  const clients = [];
74
84
  // Claude Code - uses its own CLI for MCP management
85
+ const serverCmd = getServerCommand();
86
+ const cliAddCmd = ['claude', 'mcp', 'add', '--scope', 'user', 'aidex', '--', serverCmd.command, ...serverCmd.args];
75
87
  clients.push({
76
88
  type: 'cli',
77
89
  name: 'Claude Code',
78
90
  detectCmd: 'claude --version',
79
- addCmd: ['claude', 'mcp', 'add', '--scope', 'user', 'aidex', '--', 'aidex'],
91
+ addCmd: cliAddCmd,
80
92
  removeCmd: ['claude', 'mcp', 'remove', '--scope', 'user', 'aidex']
81
93
  });
82
94
  // Claude Desktop - JSON config
@@ -258,7 +270,8 @@ function setupJsonClient(client) {
258
270
  if (!data.mcpServers || typeof data.mcpServers !== 'object') {
259
271
  data.mcpServers = {};
260
272
  }
261
- data.mcpServers.aidex = { ...AIDEX_MCP_ENTRY };
273
+ const serverCmd = getServerCommand();
274
+ data.mcpServers.aidex = { ...serverCmd };
262
275
  const writeResult = writeJsonConfig(client.configPath, data);
263
276
  if (!writeResult.success) {
264
277
  return { status: ` ✗ ${client.name} (${writeResult.error})`, registered: false };
@@ -5,6 +5,7 @@
5
5
  */
6
6
  export declare const PRODUCT_NAME = "AiDex";
7
7
  export declare const PRODUCT_NAME_LOWER = "aidex";
8
+ export declare const PRODUCT_VERSION: string;
8
9
  export declare const INDEX_DIR = ".aidex";
9
10
  export declare const TOOL_PREFIX = "aidex_";
10
11
  //# sourceMappingURL=constants.d.ts.map
@@ -3,8 +3,12 @@
3
3
  *
4
4
  * Change product name here to rename the entire tool.
5
5
  */
6
+ import { createRequire } from 'module';
7
+ const require = createRequire(import.meta.url);
8
+ const pkg = require('../package.json');
6
9
  export const PRODUCT_NAME = 'AiDex';
7
10
  export const PRODUCT_NAME_LOWER = 'aidex';
11
+ export const PRODUCT_VERSION = pkg.version;
8
12
  export const INDEX_DIR = '.aidex';
9
13
  export const TOOL_PREFIX = 'aidex_';
10
14
  //# sourceMappingURL=constants.js.map
@@ -5,11 +5,11 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
5
5
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
6
6
  import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
7
7
  import { registerTools, handleToolCall } from './tools.js';
8
- import { PRODUCT_NAME, PRODUCT_NAME_LOWER } from '../constants.js';
8
+ import { PRODUCT_NAME, PRODUCT_NAME_LOWER, PRODUCT_VERSION } from '../constants.js';
9
9
  export function createServer() {
10
10
  const server = new Server({
11
11
  name: PRODUCT_NAME_LOWER,
12
- version: '1.3.0',
12
+ version: PRODUCT_VERSION,
13
13
  }, {
14
14
  capabilities: {
15
15
  tools: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidex-mcp",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "MCP Server providing persistent code indexing for Claude Code",
5
5
  "main": "build/index.js",
6
6
  "bin": {