Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
Cursor ruleCẩn thậnQuy trình & bộ nhớ agentCần cài đặt chút

devcontext

aiurda · aiurda/devcontext

Cung cấp một MCP server (Model Context Protocol) học hỏi từ thói quen phát triển của bạn để cung cấp cho các AI coding agent nhận thức ngữ cảnh liên tục, tập trung vào dự án.

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.

49 sao14Giấy phép: MITCập nhật năm ngoái0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Giúp AI agent của bạn hiểu cấu trúc codebase và các phụ thuộc.
  • Cho phép AI agent tự động truy xuất tài liệu và ngữ cảnh tác vụ liên quan.
  • Tích hợp quản lý ngữ cảnh tự động trực tiếp vào quy trình làm việc của Cursor AI.

Kiểm tra an toàn

Cẩn thận

Dùng được, nhưng nên đọc ghi chú trước.

  • ●Trình cài đặt tải script từ xa và chạy thẳng bằng shell.README.md
  • ●Hơn một năm không cập nhật.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ 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

  1. Sign up for TursoDB:

    • Visit Turso and create an account
    • The free tier is sufficient for most projects
  2. Install Turso CLI (optional but recommended):

    curl -sSfL https://get.turso.tech/install.sh | bash
    
  3. Authenticate with Turso:

    turso auth login
    
  4. Create a project database:

    turso db create devcontext
    
  5. Get database credentials:

    # Get database URL
    turso db show devcontext --url
    
    # Create auth token
    turso db tokens create devcontext
    

    Save 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

  1. Create Rules Directory:

    mkdir -p .cursor/rules
    
  2. 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.

  1. 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": {
      
Xem mã nguồn trên GitHub