Skip to main content
Glama
README.md
# Code-MCP 🧠

**The AI Coding Brain** - A comprehensive Model Context Protocol (MCP) server that turns any AI into a full-stack software engineer.

[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/code-mcp)

## Features

### 🛠️ 36 MCP Tools

| Category | Tools | Purpose |
|----------|-------|---------|
| **Cognitive** (10) | `sequential_thinking`, `plan_task`, `reflect_on_code`, `analyze_architecture`, `debug_problem`, `brainstorm_solutions`, `compare_approaches`, `estimate_complexity`, `generate_tests`, `explain_code` | AI reasoning & analysis |
| **Memory** (4) | `save_memory`, `read_memory`, `list_memories`, `clear_memory` | Persistent context |
| **Validation** (4) | `validate_code`, `check_imports`, `lint_code`, `format_code` | Code quality |
| **AI Configs** (9) | Cursor, Gemini, Claude, Windsurf, Aider, Cline, Copilot, Continue.dev, Tabnine | Generate AI tool configs |
| **IDE Configs** (4) | VSCode tasks/launch, JetBrains | IDE integration |
| **Full-Stack** (5) | `track_project`, `check_dependencies`, `generate_github_actions`, `full_stack_scaffold`, `developer_rules` | Project automation |

### 📚 130+ MCP Resources
- 55+ Programming Languages
- 35+ Databases
- 43+ Frameworks
- DevOps, Security, and more

### 🎭 5 Smart Prompts
- `act_as_architect` - System design expert
- `act_as_debugger` - Debugging specialist
- `act_as_reviewer` - Code review expert
- `act_as_security_auditor` - Security analyst
- `setup_project` - Project scaffold helper

---

## Quick Start

### Local (stdio transport)
```bash
git clone https://github.com/millsydotdev/Code-MCP.git
cd Code-MCP
npm install
npm run build
npm start
```

### Cloud (HTTP transport)
```bash
npm run start:cloud
```

### Docker
```bash
docker build -t code-mcp .
docker run -i code-mcp
```

---

## Connect to AI Tools

### Claude Desktop
```json
{
  "mcpServers": {
    "code-mcp": {
      "command": "node",
      "args": ["/path/to/Code-MCP/dist/index.js"]
    }
  }
}
```

### Cloud Connection
```json
{
  "mcpServers": {
    "code-mcp-cloud": {
      "url": "https://your-deployment.railway.app/mcp",
      "headers": {
        "x-api-key": "your-api-key"
      }
    }
  }
}
```

---

## Deploy to Cloud

See [DEPLOY.md](./DEPLOY.md) for full deployment instructions.

| Platform | Free Tier | Deploy |
|----------|-----------|--------|
| Railway | 500hrs/mo | [![Deploy](https://railway.app/button.svg)](https://railway.app/template/code-mcp) |
| Render | 750hrs/mo | Connect GitHub |
| Fly.io | 3 VMs | CLI deploy |

---

## API Endpoints (Cloud Mode)

| Endpoint | Method | Description |
|----------|--------|-------------|
| `/health` | GET | Health check |
| `/tools` | GET | List all tools |
| `/tools/:name` | POST | Call a tool |
| `/resources` | GET | List resources |
| `/prompts` | GET | List prompts |
| `/mcp` | POST | MCP JSON-RPC |

---

## Environment Variables

```env
PORT=3000
CODE_MCP_API_KEY=your-secret-key  # Optional auth
```

---

## Tech Stack

- **Runtime**: Node.js
- **Language**: TypeScript
- **Protocol**: Model Context Protocol (MCP)
- **Server**: Express (cloud mode)
- **Container**: Docker

---

## Contributing

Contributions welcome! Feel free to add:
- New tools
- More language/framework/database rules
- Additional AI tool config generators
- Improved documentation

---

## License

MIT License - Use freely!

---

Made with 🧠 by [millsydotdev](https://github.com/millsydotdev)

TDQS

B3/5.0

Scored across 35 tools

Disambiguation3/5

The tool set has clear distinct purposes in some areas (e.g., analyze_architecture vs. debug_problem), but significant overlap exists in configuration generation tools (generate_aider_config, generate_claude_config, etc.) which all create config files for different AI tools and could be confused. Additionally, tools like check_dependencies and check_imports both analyze code for issues, potentially causing misselection.

Naming Consistency4/5

Most tools follow a consistent verb_noun pattern (e.g., analyze_architecture, brainstorm_solutions, check_dependencies), which is predictable and readable. There are minor deviations like sequential_thinking (adjective_noun) and developer_rules (noun_noun), but the overall convention is well-maintained across the set.

Tool Count2/5

With 35 tools, this server feels overloaded for a code assistance domain, especially given the redundancy in configuration generation tools. A more focused set of 10-20 tools could cover the same scope without overwhelming agents, as many tools serve similar purposes or are overly specific.

Completeness4/5

The server covers a broad range of code-related tasks from analysis and debugging to planning and configuration, with no obvious major gaps for its purpose. However, minor gaps exist, such as lacking direct code execution or deployment tools, but agents can likely work around these given the comprehensive coverage of other areas.