Provides perfect memory for AI-assisted development by capturing project context snapshots, enabling natural language search, evolution tracking, and code intelligence.
The Model Context Protocol (MCP) server with perfect memory for AI-assisted development
ContextKeeper revolutionizes AI-assisted development by solving the fundamental problem of context loss between sessions. Using an LSM-tree inspired architecture, it maintains a complete, searchable history of your project's evolutionβensuring your AI assistant never forgets.
Six powerful tools for AI assistants:
snapshot
- Create comprehensive context snapshotssearch_evolution
- Natural language search through project historytrack_component
- Follow feature evolution over timecompare_snapshots
- Diff any two snapshotsget_status
- System status with compaction insightsget_timeline
- Chronological project evolution viewFive Roslyn-powered code analysis tools:
FindSymbolDefinitions
- Locate symbol declarationsFindSymbolReferences
- Find all usagesNavigateInheritanceHierarchy
- Explore type relationshipsSearchSymbolsByPattern
- Wildcard pattern matchingGetSymbolDocumentation
- Extract XML documentationFlexible documentation area accessible via Claude's @ symbol:
# Clone the repository
git clone https://github.com/chasecuppdev/contextkeeper-mcp.git
cd contextkeeper-mcp
# Build the project
dotnet build
# Run as MCP server
dotnet run --project src/ContextKeeper
# Initialize ContextKeeper in your project
dotnet run --project src/ContextKeeper -- init
# Create a manual snapshot
dotnet run --project src/ContextKeeper -- snapshot "feature-complete"
# Search project history
dotnet run --project src/ContextKeeper -- search "authentication"
# Check system status
dotnet run --project src/ContextKeeper -- check
# Install git hooks for automatic capture
dotnet run --project src/ContextKeeper -- init --git-hooks
# Now snapshots are created automatically on:
# - Pre-commit: Captures state before committing
# - Post-checkout: Captures state after branch switches
.contextkeeper/
βββ snapshots/ # Active snapshots
β βββ SNAPSHOT_2025-06-24_manual_feature-complete.md
β βββ SNAPSHOT_2025-06-24_git-commit_abc123.md
βββ archived/ # Compacted history
βββ ARCHIVED_2024-01-01_2024-03-31_COMPACTED.md
context-workspace/ # User-accessible workspace (visible in Claude's @)
βββ workspace/ # Your custom documentation
β βββ requirements/ # Project requirements
β βββ design/ # Design decisions
β βββ instructions/ # AI instructions
βββ project-history/ # ContextKeeper development docs
Each snapshot captures:
Automatic archiving triggers when:
Add to your Claude Desktop configuration (~/.claude.json
):
{
"mcpServers": {
"contextkeeper": {
"type": "stdio",
"command": "dotnet",
"args": ["run", "--project", "/path/to/contextkeeper/src/ContextKeeper"],
"env": {}
}
}
}
Important: Make sure to:
/path/to/contextkeeper
with the actual path to your ContextKeeper installation"type": "stdio"
in the configurationContextKeeper implements the standard MCP protocol and works with any compatible client. The server provides tool discovery and JSON-based communication.
contextkeeper.config.json
){
"version": "2.0",
"paths": {
"history": ".contextkeeper",
"snapshots": ".contextkeeper/snapshots",
"archived": ".contextkeeper/archived",
"userWorkspace": "context-workspace/workspace"
},
"snapshot": {
"dateFormat": "yyyy-MM-dd",
"filenamePattern": "SNAPSHOT_{date}_{type}_{milestone}.md",
"autoCapture": true,
"autoCaptureIntervalMinutes": 30
},
"compaction": {
"threshold": 20,
"maxAgeInDays": 90,
"autoCompact": true
},
"contextTracking": {
"trackOpenFiles": true,
"trackGitState": true,
"trackRecentCommands": true,
"documentationFiles": ["*.md"],
"ignorePatterns": ["node_modules", "bin", "obj", ".git"]
}
}
CONTEXTKEEPER_PROFILE
- Override auto-detected profileCONTEXTKEEPER_DEBUG
- Enable debug loggingSnapshot Creation: 8ms (10,000 lines)
Search (1000 docs): 45ms (full-text)
Compaction (100MB): 280ms (70% size reduction)
Symbol Search: 12ms (50K symbols)
# Clone repository
git clone https://github.com/chasecuppdev/contextkeeper-mcp.git
cd contextkeeper-mcp
# Restore dependencies
dotnet restore
# Build
dotnet build
# Run tests
dotnet test
# Build Native AOT (requires platform-specific SDK)
dotnet publish -c Release -r linux-x64 -p:PublishAot=true
The project includes a comprehensive test suite with 98 tests covering:
Run tests with:
# Run all tests
dotnet test
# Run with detailed output
dotnet test --verbosity detailed
# Run specific test category
dotnet test --filter "Category=Integration"
contextkeeper-mcp/
βββ src/
β βββ ContextKeeper/
β βββ Config/ # Configuration management
β βββ Core/ # Core services
β βββ Protocol/ # MCP implementation
β βββ CodeAnalysis/ # Roslyn integration
β βββ Utils/ # Utilities
βββ tests/
β βββ ContextKeeper.Tests/ # Comprehensive test suite
βββ docs/ # Additional documentation
$ dotnet run -- search "authentication"
Found 3 matches across history:
π
2025-06-15: First mention in requirements (Status: Planned)
π
2025-06-18: Implementation started (Status: In Progress)
π
2025-06-22: Completed with JWT integration (Status: Completed)
$ dotnet run -- evolution "payment system"
Evolution Timeline:
βββ 2025-06-10: Initial design discussion
βββ 2025-06-15: API specification defined
βββ 2025-06-20: Stripe integration chosen
βββ 2025-06-25: Production deployment
ContextKeeper implements a Log-Structured Merge-tree approach for efficient storage:
Leveraging .NET 9's Native AOT for production performance:
# Compile to native binary (41MB with Roslyn included)
dotnet publish -c Release -r linux-x64 -p:PublishAot=true
# Startup comparison:
# JIT: ~200ms | AOT: ~12ms (16x faster)
# Memory: 85MB β 18MB (78% reduction)
Full Model Context Protocol server with:
Advanced C# code analysis capabilities:
// Example: Find all implementations of IRepository
var implementations = await FindSymbolReferences("IRepository");
// Returns: UserRepository, ProductRepository, OrderRepository
// Navigate inheritance hierarchy
var hierarchy = await NavigateInheritance("BaseController");
// Returns full inheritance tree with 15 derived controllers
AI assistants lose context between sessions, forcing developers to repeatedly explain project history, architectural decisions, and implementation details.
ContextKeeper maintains a complete, searchable history of your project's evolution. Your AI assistant can instantly access:
Originally extracted from CodeCartographerAI, ContextKeeper has proven its value in production:
Developer: "When did we change the user authentication flow?"
AI (using ContextKeeper): "According to the history:
- June 15: Original OAuth2 implementation
- June 22: Added 2FA support (commit abc123)
- June 28: Switched to JWT tokens (security audit)
The JWT change on June 28 might be related to your production issue."
Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)This project is licensed under the MIT License - see the LICENSE file for details.
ContextKeeper - Never lose context again π§ β¨
Bootstrap Model Context Protocol (MCP) servers and clients in TypeScript with best practices, examples, and proper tooling setup.
An MCP server that enables Large Language Models to make HTTP requests and interact with web APIs. It supports automatic tool generation from OpenAPI/Swagger specifications.
Connects Blender to Claude AI via the Model Context Protocol (MCP), enabling direct interaction and control for prompt-assisted 3D modeling, scene creation, and manipulation.
A diagram generation server supporting multiple UML and other diagram types, with various output formats. It integrates with rendering services like Kroki and PlantUML.
An MCP server for accessing Julia documentation and source code.
A comprehensive crash course on the Model Context Protocol (MCP), covering everything from basic concepts to building production-ready MCP servers and clients in Python.
Extracts images from files, URLs, or base64 strings and converts them to base64 for LLM analysis.
A collection of reference implementations for the Model Context Protocol (MCP), demonstrating how to give LLMs secure access to tools and data using Typescript and Python SDKs.
Fetch comprehensive information about CRAN packages, including READMEs, metadata, and search functionality.
Execute shell commands with structured output via a powerful CLI server.