CodePilot
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CodePilotadd JWT authentication to auth.py"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CodePilot
Work in Progress (WIP): This project is under active development. Some components and agents are currently being optimized and refined.
CodePilot is a production-grade, autonomous AI software engineer and Model Context Protocol (MCP) server. It leverages LangGraph for task planning and execution, and uses a hybrid RAG index (combining SQLite for relational symbol mapping and ChromaDB for semantic code search) to edit, test, and debug codebases autonomously.
๐๏ธ System Architecture
CodePilot decouples the Editor UI/Extension from the AI Agent Runtime using the MCP protocol.
VS Code / Client (e.g. Cursor, Cline, Roo Code)
โ
โ MCP (stdio)
โผ
FastMCP Server (Python)
โ
โผ
LangGraph Supervisor
โ
Planner โโโบ Task Scheduler (Conditional Routing)
โ
โโโโโโโโโโโโโโโโโฌโโโโโโโโดโโโโโโโโฌโโโโโโโโโโโโโโโโ
โผ โผ โผ โผ
Retriever Coder Agent Tester Node Reflection
โ โ โ โ
โผ โผ โผ โผ
SQLite / Chroma Reviewer Gate Test Runner Git Safety Commit
โ
โผ
Patch Generator (Search/Replace Matcher)Related MCP server: Gravitas-Core-MCP
โก Prerequisites
To run CodePilot locally, ensure the following are installed:
Python >= 3.10
Git
Ollama (for local offline LLM execution):
Download and run Ollama
Pull the chat and embedding models in your terminal:
ollama pull qwen2.5-coder:1.5b ollama pull nomic-embed-text
๐ฆ Installation & Setup
Activate the Conda Environment:
conda activate codepilotInstall CodePilot in Editable Mode:
python -m pip install -e .Configure Environment Variables (Optional): Create a
.envfile in the root directory:LLM_PROVIDER=ollama LLM_MODEL=qwen2.5-coder:1.5b OLLAMA_BASE_URL=http://localhost:11434
๐งช How to Verify and Run Tests
Run the full suite of unit tests to verify git safety tools, AST parser, indexers, scheduler graph routing, and FastMCP registration:
# Run all Phase 1-5 test suites
python -m unittest discover -s testsTo run a specific test suite directly:
# Test AST Parsers & DB RAG
python -m unittest tests/test_phase2.py
# Test LangGraph Compilation & Scheduler
python -m unittest tests/test_phase3.py
# Test FastMCP Server Registrations
python -m unittest tests/test_phase4.py๐ Usage Guide
1. Direct Execution via CLI
Use the command-line interface to execute the autonomous coding agent directly on a codebase:
python main.py --query "Your task description" --repo "path/to/target/repository" --max-iterations 3--query: The task you want the agent to accomplish (e.g. "Add JWT validation helper functions to auth.py").--repo: Absolute or relative path to the codebase repository you want CodePilot to index, modify, test, and commit.--max-iterations: The maximum number of self-healing compile/test debugging retries allowed before rolling back.
2. Stateful Interactive Shell Mode
Start CodePilot without a --query parameter to enter a stateful, interactive shell loop. The agent will greet you and keep track of modified files and conversation history across follow-up queries:
python main.py --repo "path/to/target/repository"3. Integration via MCP Server (VS Code, Cursor, Claude)
Start the MCP server using:
python apps/mcp_server/server.pyTo integrate CodePilot with client tools, register the Python script as an MCP server stdio transport in your settings.
Cursor Configuration
Add a new MCP server in Cursor settings (Cursor Settings -> Features -> MCP):
Name: CodePilot
Type:
stdioCommand:
conda run -n codepilot python "path/to/CodePilot/apps/mcp_server/server.py"
Claude Desktop Configuration
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"codepilot": {
"command": "conda",
"args": [
"run",
"-n",
"codepilot",
"python",
"path/to/CodePilot/apps/mcp_server/server.py"
]
}
}
}โ๏ธ Modular Safety Strategy
Git Safe Guarding: Before applying any changes, CodePilot creates a temporary safety commit. If linter checks or pytest runs fail during verification, CodePilot automatically rolls back modifications, leaving your active workspace clean and untouched.
Fuzzy Matcher: The patching agent writes exact Search/Replace blocks. If minor spacing or indentation variations exist in the files, CodePilot's fuzzy sliding-window matcher resolves them safely.
# Create a Tic-Tac-Toe game
python main.py --query "Create a Tic-Tac-Toe game in game.py with a simple text UI" --repo projects/tictactoe
# Create a Flask app
python main.py --query "Create a Flask app in app.py with a /hello endpoint" --repo projects/flask_demo
# Add tests
python main.py --query "Create tests/test_calculator.py with pytest tests for add, subtract" --repo projects/codepilot_calc
# Interactive mode (type multiple queries)
python main.py --repo projects/codepilot_calcThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tanmaygangurde20/CodePilot'
If you have feedback or need assistance with the MCP directory API, please join our Discord server