Skip to main content

High‑performance Managed Code Processor (MCP) server with AI‑powered code analysis and editing.

Project description

coder-mcp: The Intelligent Code Development MCP Server 🚀

PyPI version Python Versions License Status MCP

Transform Claude into your most intelligent coding assistant with persistent memory, advanced code analysis, and context-aware development tools.

FeaturesQuick StartDocumentationExamplesContributing


🌟 What Makes coder-mcp Unique?

While other MCP servers provide basic file operations or simple integrations, coder-mcp is the first comprehensive code intelligence platform for AI assistants. It's not just about reading and writing files—it's about understanding your entire codebase, remembering context across sessions, and providing intelligent assistance that improves over time.

🎯 The Problem

  • Traditional MCP servers forget everything between sessions
  • Basic file operations lack code understanding
  • No semantic awareness of relationships between files
  • Limited to simple read/write operations
  • No code quality analysis or intelligent suggestions

💡 Our Solution

  • Persistent vector-based memory that survives across sessions
  • AST-based code analysis for deep understanding
  • Semantic search across your entire codebase
  • Intelligent scaffolding with best practices built-in
  • Multi-language support with extensible architecture

🚀 Features

🧠 Intelligent Context Management

  • Cross-Session Memory: Your AI assistant remembers your project, decisions, and patterns
  • Vector-Based Search: Find code by meaning, not just text matching
  • Relationship Mapping: Understands how files relate to each other
  • Project Intelligence: Builds comprehensive knowledge of your codebase

🔍 Advanced Code Analysis

  • AST-Based Understanding: Goes beyond text to understand code structure
  • Multi-Language Support: Python, JavaScript, TypeScript (more coming)
  • Code Smell Detection: Identifies issues like long functions, complex conditionals
  • Dependency Analysis: Tracks and analyzes your project dependencies
  • Quality Metrics: Calculates complexity, maintainability scores

🏗️ Intelligent Code Generation

  • Smart Scaffolding: Generate boilerplate with your patterns and preferences
  • Best Practices: Automatically applies language-specific best practices
  • Template System: Extensible templates for common patterns
  • Context-Aware: Uses your existing code style and patterns

🔒 Enterprise-Ready Architecture

  • Secure by Design: Path traversal protection, input validation
  • High Performance: Redis-backed storage with efficient caching
  • Scalable: Handles large codebases with thousands of files
  • Reliable: Comprehensive error handling and recovery

📋 Requirements

  • Python 3.10+
  • Redis server (for vector storage and caching)
  • 4GB+ RAM recommended
  • OpenAI API key (for embeddings)

🚀 Quick Start

Installation

Install from PyPI (Recommended)

pip install coder-mcp

Install from Source

git clone https://github.com/coder-mcp/coder-mcp.git
cd coder-mcp
pip install -e .

Configuration

  1. Set up your environment variables:
cp .env.example .env
# Edit .env with your configuration:
# - OPENAI_API_KEY (required for embeddings)
# - REDIS_URL (defaults to localhost:6379)
# - Other optional settings
  1. Add to your MCP settings:
{
  "mcpServers": {
    "coder-mcp": {
      "command": "python",
      "args": ["-m", "coder_mcp.server"],
      "env": {
        "OPENAI_API_KEY": "<your-openai-api-key>",
        "REDIS_URL": "redis://localhost:6379"
      }
    }
  }
}
  1. Start using with Claude Desktop or your MCP client!

🎯 Example Usage

Initialize Your Project

"Initialize the coder-mcp context for my Python project"

Smart Code Analysis

"Analyze the code quality of my API endpoints and suggest improvements"

Intelligent Search

"Find all functions that handle user authentication"

Generate Code with Context

"Create a new REST endpoint following the patterns in my existing code"

Refactoring Assistant

"Help me refactor the payment processing module to improve testability"

📚 Documentation


🛠️ Advanced Features

Vector Search Capabilities

# Semantic search across your codebase
results = await search_context("functions that validate user input")

Code Quality Analysis

# Get detailed metrics and suggestions
analysis = await analyze_code("src/api/", analysis_type="deep")

Smart Editing

# Natural language code modifications
await smart_edit("add error handling to all database operations")

Project Intelligence

# Get AI-powered improvement suggestions
roadmap = await generate_improvement_roadmap(focus_areas=["security", "performance"])

🏗️ Architecture

coder-mcp is built with a modular, extensible architecture:

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   MCP Client    │────▶│  coder-mcp      │────▶│     Redis       │
│ (Claude, etc.)  │     │    Server       │     │  Vector Store   │
└─────────────────┘     └─────────────────┘     └─────────────────┘
                               │
                               ▼
                        ┌─────────────────┐
                        │   Code Intel    │
                        │   Subsystems    │
                        └─────────────────┘

🤝 Contributing

We welcome contributions! See our Contributing Guide for details.

Development Setup

# Clone the repository
git clone https://github.com/coder-mcp/coder-mcp.git
cd coder-mcp

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Run linting
black . && isort . && flake8

📊 Performance

  • Indexing Speed: ~1000 files/second
  • Search Latency: <100ms for most queries
  • Memory Usage: ~500MB for 10k file project
  • Startup Time: <2 seconds

🔒 Security

  • Path traversal protection
  • Input sanitization
  • Secure credential handling
  • No arbitrary code execution
  • Audit logging for sensitive operations

📝 License

MIT License - see LICENSE for details.


🌟 Star History

Star History Chart


🙏 Acknowledgments

  • Built on the Model Context Protocol
  • Inspired by the need for better AI-assisted development
  • Thanks to all our contributors and early adopters

Made with ❤️ by the coder-mcp team

Report BugRequest FeatureJoin Discussion

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coder_mcp-1.0.1.tar.gz (370.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coder_mcp-1.0.1-py3-none-any.whl (485.4 kB view details)

Uploaded Python 3

File details

Details for the file coder_mcp-1.0.1.tar.gz.

File metadata

  • Download URL: coder_mcp-1.0.1.tar.gz
  • Upload date:
  • Size: 370.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for coder_mcp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d743d572ba93d40cd9261bc88fff7f90d38ca9c1b53c43cb03cebd24b78aea36
MD5 d241b3dcc1b1a67c052a93b0cb21b669
BLAKE2b-256 606c2c6a308ff47eb12cbbdf1ccafae5678e6b06f7a9bd1426909c2c12549426

See more details on using hashes here.

Provenance

The following attestation bundles were made for coder_mcp-1.0.1.tar.gz:

Publisher: publish.yml on coder-mcp/coder-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file coder_mcp-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: coder_mcp-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 485.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for coder_mcp-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bcdf011fd2f6f6e98fb31a2b0785e864a15dc763a751cd143013e091af02557e
MD5 4bb65cb37651429a0e2353b8e32f0e11
BLAKE2b-256 edc5bae3e298ac937b895d627498d0e10d3b26e4b98d77234d9d3d85b921707c

See more details on using hashes here.

Provenance

The following attestation bundles were made for coder_mcp-1.0.1-py3-none-any.whl:

Publisher: publish.yml on coder-mcp/coder-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page