Empower your development workflow with intelligent context awareness
DevContext: Autonomous Context Awareness Model-Context-Protocol (MCP) Server
Empower your development workflow with intelligent context awareness - DevContext understands your codebase, conversations, and development patterns to provide relevant context exactly when you need it.
Introduction
DevContext is a cutting-edge Model Context Protocol (MCP) server designed to provide developers with continuous, project-centric context awareness. Unlike traditional context systems, DevContext continuously learns from and adapts to your development patterns. DevContext leverages sophisticated retrieval methods, focusing on keyword analysis, relationship graphs, and structured metadata to deliver highly relevant context during development, understanding both your conversations and your codebase at a deeper level.
The server operates with a database instance dedicated to a single project, eliminating cross-project complexity and ensuring performance with minimal resource requirements. DevContext builds a comprehensive understanding of your codebase - from repository structure down to individual functions - while continuously learning from and adapting to your development patterns.
The BEST way to use this MCP server is to follow the guide below on implementing the provided Cursor Rules system which in turn gives you:
- Completely autonomous context management
- Autonomous external documentation context and use
- Complete task management workflow integration
Core Technologies
- Node.js: Runtime environment (Node.js 18+)
- TursoDB: SQL database optimized for edge deployment (compatible with SQLite)
- Model Context Protocol SDK: For standardized communication with IDE clients
- Cursor Rules: Autonomous development environment and workflow management
- JavaScript/TypeScript: Pure JavaScript implementation with no external ML dependencies
Installation Guide
Prerequisites
- Node.js 18.0.0 or higher
- Cursor IDE with MCP support
- TursoDB account (for database)
Step 1: Set up TursoDB Database
Sign up for TursoDB:
- Visit Turso and create an account
- The free tier is sufficient for most projects
Install Turso CLI (optional but recommended):
curl -sSfL https://get.turso.tech/install.sh | bashAuthenticate with Turso:
turso auth loginCreate a project database:
turso db create devcontextGet database credentials:
# Get database URL turso db show devcontext --url # Create auth token turso db tokens create devcontextSave both the URL and token for the next step.
Step 2: Configure MCP in Cursor (can be applied to other IDE's as well)
Create or edit .cursor/mcp.json in your project directory:
{
"mcpServers": {
"devcontext": {
"command": "npx",
"args": ["-y", "devcontext@latest"],
"enabled": true,
"env": {
"TURSO_DATABASE_URL": "your-turso-database-url",
"TURSO_AUTH_TOKEN": "your-turso-auth-token"
}
}
}
}
Replace your-turso-database-url and your-turso-auth-token with the values obtained in Step 1.
Cursor Rules Implementation
DevContext implements a sophisticated set of Cursor Rules that create an autonomous development environment. These rules guide Cursor's AI assistants in maintaining project scope alignment, incorporating up-to-date documentation, and implementing advanced task workflows.
Be on the lookout for the DevContext Project Generator which is coming very soon and will create a COMPLETE set up for your project to literally 10x your development workflow.
Key Rule Components
1. DevContext MCP Tools Usage Guide
The core rule defines a precise sequence for tool execution:
1. FIRST: Call initialize_conversation_context EXACTLY ONCE at START
2. AS NEEDED: Call update_conversation_context for code changes/new messages
3. AS NEEDED: Call retrieve_relevant_context when specific context is required
4. OCCASIONALLY: Call record_milestone_context for significant achievements
5. LAST: Call finalize_conversation_context EXACTLY ONCE at END
This workflow ensures comprehensive context management throughout the entire development session.
2. External Library Documentation Requirements
All external library usage must be preceded by proper documentation retrieval:
- Two-Step Documentation Retrieval using Context7
- Web Search Fallback for documentation not available through Context7
- Multi-Source Documentation Synthesis for comprehensive understanding
This prevents common issues with incorrect API usage, incompatible versions, or missing dependencies.
3. Task Workflow System
The task workflow system enables:
- Structured task m
Tools (5)
initialize_conversation_contextCall exactly once at the start of a session to set up the initial context.update_conversation_contextUpdates the context based on code changes or new messages in the conversation.retrieve_relevant_contextRetrieves specific context from the database when required for a task.record_milestone_contextRecords significant achievements or milestones within the project context.finalize_conversation_contextCall exactly once at the end of a session to save the final state.Environment Variables
TURSO_DATABASE_URLrequiredThe URL for the TursoDB project databaseTURSO_AUTH_TOKENrequiredThe authentication token for the TursoDB instanceConfiguration
{
"mcpServers": {
"devcontext": {
"command": "npx",
"args": ["-y", "devcontext@latest"],
"enabled": true,
"env": {
"TURSO_DATABASE_URL": "your-turso-database-url",
"TURSO_AUTH_TOKEN": "your-turso-auth-token"
}
}
}
}