P
Project Context MCP
MCP server by KanishkaHalder1771
Created 7/19/2025
Updated 2 days ago
README
Repository documentation and setup instructions
Project Context MCP Server
A smart context management system for coding projects that uses knowledge graphs and vector databases for intelligent storage and retrieval.
Features
- Zero-friction storage: Just say "add this to context" - no manual categorization needed
- Smart auto-categorization: AI-powered category detection and assignment
- Intelligent relationships: Automatic discovery of connections between contexts
- Semantic search: Find contexts by meaning, not just keywords
- Session continuity: Never lose project context again
Quick Start
Installation with uv (Recommended)
# Install dependencies
uv sync
# Run setup script
uv run python scripts/setup_dev.py
Alternative Installation with pip
pip install -e .
python scripts/setup_dev.py
Setup
- Copy environment template:
cp .env.example .env
- Run the MCP server:
uv run python -m src.main
# OR with pip: python -m src.main
MCP Tools
The server exposes 5 simple tools:
list_categories()
- Show available context categoriesstore_context(content, category)
- Store new context with auto-categorizationget_context(topic, category)
- Retrieve contexts about a topicget_related_contexts(topic)
- Find related contexts using knowledge graphdelete_context(topic, category)
- Remove contexts about a topic
Architecture
- Vector Database: LanceDB for high-performance semantic search with Apache Arrow
- Knowledge Graph: NetworkX for relationship management
- Embeddings: Sentence Transformers (all-MiniLM-L6-v2) for local, fast embeddings
- Auto-categorization: Smart category detection
- Duplicate detection: Prevents redundant contexts
- Local storage: All data stored locally in
./data/
Technology Stack
- LanceDB: Ultra-fast vector database built on Apache Arrow
- NetworkX: Directed graph for context relationships
- Sentence Transformers: Local embedding generation
- Pydantic: Type safety and validation
- Python 3.10+: Modern Python features
Development
# Install development dependencies
uv sync
# Format code
uv run black .
uv run ruff check .
# Type checking
uv run mypy src/
Performance Benefits of LanceDB
- 2-3x faster than ChromaDB for queries
- Lower memory footprint with zero-copy operations
- Built-in analytics capabilities for complex filtering
- Apache Arrow based for maximum performance
- Local-first with no external dependencies
License
MIT
Quick Setup
Installation guide for this server
Install Package (if required)
uvx project-context-mcp
Cursor configuration (mcp.json)
{
"mcpServers": {
"kanishkahalder1771-project-context-mcp": {
"command": "uvx",
"args": [
"project-context-mcp"
]
}
}
}