context-mcp-server 1.1.1 → 1.1.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "context-mcp-server",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Persistent AI memory + codebase knowledge graph MCP server. Works across Claude Code, Cursor, Gemini CLI, Codex, Windsurf, VS Code Copilot, Antigravity IDE, Claude.ai, and ChatGPT.",
5
5
  "type": "module",
6
6
  "bin": {
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "codegraph-mcp"
7
- version = "1.1.1"
7
+ version = "1.1.2"
8
8
  description = "Codebase knowledge graph MCP server — AST extraction, graph queries, community detection"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
package/src/cli.js CHANGED
@@ -595,6 +595,14 @@ const PLATFORMS = {
595
595
  }
596
596
  // Slash commands — user-global
597
597
  _writeCommands(homedir());
598
+ // Rules file — project root for project scope, ~/.claude/CLAUDE.md for global
599
+ const claudeMd = _tpl('claude/CLAUDE.md');
600
+ if (claudeMd) {
601
+ const claudeMdPath = scope === 'project'
602
+ ? join(dir, 'CLAUDE.md')
603
+ : join(homedir(), '.claude', 'CLAUDE.md');
604
+ _writeFile(claudeMdPath, claudeMd, scope === 'project' ? 'CLAUDE.md' : '~/.claude/CLAUDE.md');
605
+ }
598
606
  // Hooks — write into the appropriate settings.json scope
599
607
  // Project hooks live in .claude/hooks/ and are committed; user hooks in ~/.claude/hooks/
600
608
  const hooksBase = scope === 'project' ? dir : homedir();
@@ -734,16 +742,21 @@ const PLATFORMS = {
734
742
  JSON.stringify(settings, null, 2),
735
743
  scope === 'project' ? '.gemini/settings.json' : '~/.gemini/settings.json',
736
744
  );
737
- // Slash commands (.toml) — project-scoped only
738
- if (scope === 'project') {
739
- const cmdsSrc = join(TPLS, 'gemini', 'commands');
740
- const cmdsDest = join(dir, '.gemini', 'commands');
741
- for (const file of ['context-resume.toml', 'graph-build.toml', 'save-context.toml']) {
742
- const src = join(cmdsSrc, file);
743
- if (existsSync(src)) _writeFile(join(cmdsDest, file), readFileSync(src, 'utf8'), `.gemini/commands/${file}`);
744
- }
745
- const md = _tpl('gemini/GEMINI.md');
746
- if (md) _writeFile(join(dir, 'GEMINI.md'), md, 'GEMINI.md');
745
+ // Slash commands (.toml) — project: .gemini/commands/, global: ~/.gemini/commands/
746
+ const geminiCmdsDest = join(hooksBase, '.gemini', 'commands');
747
+ const cmdsSrc = join(TPLS, 'gemini', 'commands');
748
+ for (const file of ['context-resume.toml', 'graph-build.toml', 'save-context.toml']) {
749
+ const src = join(cmdsSrc, file);
750
+ const label = scope === 'project' ? `.gemini/commands/${file}` : `~/.gemini/commands/${file}`;
751
+ if (existsSync(src)) _writeFile(join(geminiCmdsDest, file), readFileSync(src, 'utf8'), label);
752
+ }
753
+ // Rules file — project root for project scope, ~/.gemini/GEMINI.md for global
754
+ const geminiMd = _tpl('gemini/GEMINI.md');
755
+ if (geminiMd) {
756
+ const geminiMdPath = scope === 'project'
757
+ ? join(dir, 'GEMINI.md')
758
+ : join(homedir(), '.gemini', 'GEMINI.md');
759
+ _writeFile(geminiMdPath, geminiMd, scope === 'project' ? 'GEMINI.md' : '~/.gemini/GEMINI.md');
747
760
  }
748
761
  },
749
762
  },
@@ -754,9 +767,13 @@ const PLATFORMS = {
754
767
  const includeHooks = scope === 'project';
755
768
  if (includeHooks) _copyCodexHooks(dir);
756
769
  _writeFile(join(dir, '.codex', 'config.toml'), _codexConfigToml(dir, includeHooks), '.codex/config.toml');
757
- if (scope === 'project') {
758
- const md = _tpl('codex/AGENTS.md');
759
- if (md) _writeFile(join(dir, 'AGENTS.md'), md, 'AGENTS.md');
770
+ // Rules file project root for project scope, ~/.codex/AGENTS.md for global
771
+ const codexMd = _tpl('codex/AGENTS.md');
772
+ if (codexMd) {
773
+ const codexMdPath = scope === 'project'
774
+ ? join(dir, 'AGENTS.md')
775
+ : join(homedir(), '.codex', 'AGENTS.md');
776
+ _writeFile(codexMdPath, codexMd, scope === 'project' ? 'AGENTS.md' : '~/.codex/AGENTS.md');
760
777
  }
761
778
  // Prompts (slash commands) — always user-global; Codex only loads ~/.codex/prompts/
762
779
  const promptsSrc = join(TPLS, 'codex', 'prompts');
@@ -834,9 +851,14 @@ const PLATFORMS = {
834
851
  const src = join(wfSrc, file);
835
852
  if (existsSync(src)) _writeFile(join(dir, '.agents', 'workflows', file), readFileSync(src, 'utf8'), `.agents/workflows/${file}`);
836
853
  }
837
- // Rules file — Antigravity reads GEMINI.md at project root
838
- const md = _tpl('antigravity/GEMINI.md');
839
- if (md) _writeFile(join(dir, 'GEMINI.md'), md, 'GEMINI.md');
854
+ }
855
+ // Rules file — project root for project scope, ~/.config/antigravity/GEMINI.md for global
856
+ const agMd = _tpl('antigravity/GEMINI.md');
857
+ if (agMd) {
858
+ const agMdPath = scope === 'project'
859
+ ? join(dir, 'GEMINI.md')
860
+ : join(homedir(), '.config', 'antigravity', 'GEMINI.md');
861
+ _writeFile(agMdPath, agMd, scope === 'project' ? 'GEMINI.md' : '~/.config/antigravity/GEMINI.md');
840
862
  }
841
863
  },
842
864
  },