| Crates.io | context-mcp |
| lib.rs | context-mcp |
| version | 0.1.6 |
| created_at | 2026-01-10 15:00:58.825385+00 |
| updated_at | 2026-01-10 19:48:51.883971+00 |
| description | MCP server for context storage, text-based retrieval, and temporal tracking with optional persistence |
| homepage | |
| repository | https://github.com/tzervas/context-mcp |
| max_upload_size | |
| id | 2034295 |
| size | 368,086 |
MCP server for context management, temporal metadata, and lightweight retrieval plumbing.
This crate provides a "memory service" for agents: store/retrieve context items with timestamps and metadata, supporting basic query/retrieval patterns via text matching and filtering.
curl -fsSL https://raw.githubusercontent.com/tzervas/context-mcp/main/install.sh | bash
Or via cargo:
cargo install context-mcp
See INSTALL.md for detailed installation instructions and VS Code configuration.
# Stdio transport (for MCP clients like VS Code)
context-mcp --stdio
# HTTP server
context-mcp --host 127.0.0.1 --port 3000
Validated through comprehensive benchmarking:
See ASSESSMENT_REPORT.md for detailed performance analysis.
Production-ready for context management and lightweight RAG. APIs are stable.
use context_mcp::{ContextStore, StorageConfig, Context, ContextDomain};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create storage configuration
let config = StorageConfig {
memory_cache_size: 1000,
enable_persistence: true,
};
// Create context store
let store = ContextStore::new(config)?;
// Store some context
let ctx = Context::new("This is some important information", ContextDomain::Code);
let id = store.store(ctx).await?;
// Retrieve it
let retrieved = store.get(&id).await?;
println!("Retrieved: {}", retrieved.content);
Ok(())
}
Run as HTTP server:
context-mcp --host 127.0.0.1 --port 3000
Run as stdio transport:
context-mcp --stdio
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ MCP Client │ │ JSON-RPC Server │ │ Storage Layer │
│ │ │ │ │ │
│ • HTTP/WS │◄──►│ • Store/Retrieve │◄──►│ • In-Memory LRU │
│ • stdio │ │ • Query/Filter │ │ • Sled (opt) │
│ • curl/tools │ │ • Temporal Stats │ │ • Domain Index │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│
▼
┌──────────────┐
│ RAG Processor│
│ • Text Match │
│ • Parallel │
│ • Scoring │
└──────────────┘
Install development dependencies:
./setup-dev.sh
Run all quality checks:
just check
This project uses just for development tasks:
just # Show all available tasks
just check # Run all quality checks (fmt, clippy, test, security, docs)
just test # Run tests
just bench # Run benchmarks
just docs # Generate documentation
just security # Run security checks
just audit # Run security audit
just licenses # Check licenses
just build # Build all targets
just dev # Full development cycle
just pre-commit # Pre-commit checks
just ci # Simulate CI pipeline locally
cargo fmt (enforced)cargo clippy with warnings as errorscargo tarpaulincargo audit and cargo deny for vulnerabilities and license compliancecargo doc with warning checkscargo udepsThe project includes comprehensive security scanning:
cargo audit checks for known security issuescargo deny ensures only approved licensesPerformance benchmarks are included for critical paths:
just bench # Run all benchmarks
just bench-flamegraph # Generate flamegraphs (requires cargo-flamegraph)
See CONTRIBUTING.md for development setup and contribution guidelines.
Licensed under the MIT License. See LICENSE for details.