devcontext
aiurda · aiurda/devcontext
Provides a Model Context Protocol (MCP) server that learns from your development patterns to give AI coding agents continuous, project-centric context awareness.
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 and delivers highly relevant context providing a deeper understanding of your codebase.
Preview
What you can do with it
- Help your AI agent understand your codebase structure and dependencies.
- Enable AI agents to retrieve relevant documentation and task context automatically.
- Integrate autonomous context management directly into your Cursor AI workflow.
Safety check
Usable, but read the notes first.
- ●Installer downloads a remote script and pipes it to the shell.
README.md - ●Not updated for over a year.
Automated scan of the repo files. Always review code you run.
From the README
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 | bash -
Authenticate with Turso:
turso auth login -
Create a project database:
turso db create devcontext -
Get 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 management in
tasks.md - Task ID-based implementation order
- Status tracking with completion metadata
- Project blueprint integration for architectural context
Setting Up Cursor Rules
-
Create Rules Directory:
mkdir -p .cursor/rules -
Download/Copy and Paste Rules:
Download or copy and paste the .cursor/rules directory into your project. Next, copy and paste the contents of the .cursorrules file in your project root and paste it into your cursor settings rules (Cursor Settings -> Rules -> User Rules). You should also copy and paste the .cursorrules file into your main directory as well.
- Customize Task Workflow (Optional): Once the cursor rules are implemented, restart Cursor and proceed to ask it to create tasks for you based on whatever project idea you may have.
Configuration Example
Below is a complete example of an mcp.json file that configures both DevContext and Context7 MCP servers:
{
"mcpServers": {
"devcontext": {
"command": "npx",
"args": ["-y", "devcontext@latest"],
"enabled": true,
"env": {