mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-08 08:53:43 +08:00
Phase 10: Replace one-shot static context injection with persistent MCP resources
for clients that support them (Claude Code, VS Code Copilot, OpenCode).
Resources exposed:
- codebase://schema — node labels and edge types with counts
- codebase://architecture — graph size, key functions by PageRank, relationship patterns
- codebase://status — index status, PageRank stats, ecosystem, dependencies
Implementation:
- resources/list returns 3 resource URIs with descriptions
- resources/read dispatches by URI to build_resource_{schema,architecture,status}
- Server advertises resources capability in initialize response (listChanged:true)
- Client capabilities.resources parsed from initialize params (client_has_resources flag)
- inject_context_once skipped when client supports resources (0 token overhead)
- notifications/resources/updated sent after index_repository, index_dependencies, autoindex
- Fallback: legacy clients without resources support still get _context injection
Tests: 8 new tests (resources_list, resources_read x4, initialize_advertises,
client_capability_parsing, fallback_injection). Total: 2149 tests passing.
Also: add .claude/ to .gitignore for local project memory.
Signed-off-by: Andrew Hundt <ATHundt@gmail.com>
46 lines
467 B
Plaintext
46 lines
467 B
Plaintext
# Binaries
|
|
code-graph-mcp
|
|
/codebase-memory-mcp
|
|
bin/
|
|
*.exe
|
|
*.dll
|
|
*.so
|
|
*.dylib
|
|
|
|
# Test artifacts
|
|
*.test
|
|
*.out
|
|
coverage.txt
|
|
|
|
# IDE
|
|
.idea/
|
|
.vscode/
|
|
*.swp
|
|
*.swo
|
|
|
|
# OS
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# Database files (local cache)
|
|
*.db
|
|
*.db-wal
|
|
*.db-shm
|
|
|
|
# MCP Registry auth tokens
|
|
.mcpregistry_*
|
|
|
|
# Local project memory (Claude Code auto-memory)
|
|
memory/
|
|
reference/
|
|
.claude/
|
|
|
|
# Build artifacts
|
|
build/
|
|
node_modules/
|
|
graph-ui/dist/
|
|
|
|
# Generated reports
|
|
BENCHMARK_REPORT.md
|
|
TEST_PLAN.md
|