coder-mcp

πŸš€ Intelligent MCP server that gives AI assistants persistent memory, advanced code analysis, and context-aware development tools

GitHub Stars

1

User Rating

Not Rated

Favorites

0

Views

5

Forks

0

Issues

1

README
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.

Features β€’ Quick Start β€’ Documentation β€’ Examples β€’ Contributing


🌟 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:
    "coder-mcp": {
      "command": "/{path}/{path}/{path}/coder-mcp/.venv/bin/python",
      "args": [
        "-m",
        "coder_mcp.server"
      ],
      "cwd": "/{path}/{path}/{path}/coder-mcp",
      "env": {
        "MCP_WORKSPACE_ROOT": "/{path}/{to}/{target}/{project}",
        "OPENAI_API_KEY": "sk-svcacct-xxxxxxxxxxxxxxxx"
      }
    }
  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 Bug β€’ Request Feature β€’ Join Discussion