A powerful backend service that enables AI assistants to autonomously manage, modify, and execute code projects through secure sandboxed environments.
Coder-API bridges the gap between AI models and code execution, providing a comprehensive toolkit for project management, file operations, and command execution. Built with dual protocol support (REST API + Model Context Protocol), it seamlessly integrates with ChatGPT, GitHub Copilot, and other AI assistants to enable autonomous coding workflows.
Key Capabilities:
- 🔧 Project Management: Clone repositories, create projects, manage workspaces
- 📁 File Operations: Read, write, patch, and organize code files with precision
- ⚡ Code Execution: Run bash commands and scripts in isolated project environments
- 🤖 AI Design: Built with MCP support with automatic tool discovery for LLMs
- 🛡️ Secure Sandbox: All operations confined to designated workspace directories
- 🌐 Flexible Deployment: Local development, cloud platforms, or tunneled access
The server provides the following capabilities:
create-project
- Create new projects from Git repositories, archives, or empty directoriesrename-project
- Rename existing projectslist-projects
- Get a list of all projectsget-project-details
- Get detailed information about a specific project
get-file
- Read file contents with support for text and base64 encodingcreate-file
- Create new files with overwrite protectiondelete-file
- Delete files or directories with recursive optionspatch-file
- Apply modifications using various patch operations (diff, replace, lines, insert, code_block)
run-bash
- Execute bash commands in project directories with timeout and environment controlslist-filetree
- Browse project file structures with configurable depth and entry limits
- Express server with dual protocol support:
- REST API for traditional HTTP-based project and file management
- MCP (Model Context Protocol) for seamless LLM integration
- OpenAPI contract (
openapi.json
) - Multiple transport options for MCP (HTTP and Server-Sent Events)
For detailed local setup instructions, see Running Locally.
Quick start:
- Node.js >= 20
- pnpm (recommended)
- Clone, install dependencies, configure
.env
, and runpnpm dev
For detailed setup and deployment instructions, see our deployment guides:
- Running Locally - Local development setup and testing
- Self-Hosted Server - Deploy on your own VPS or server
- Cloud Platforms - Deploy on Render, Heroku, Easypanel, and other cloud services
- Local Tunneling - Use ngrok or other tunneling services for development
To allow external services (like ChatGPT or other AI assistants) to access your Coder-API, you need to make it accessible over the internet using one of the deployment methods above.
Coder-API provides two main interfaces:
Traditional HTTP-based API for project and file management.
- REST API Documentation - Complete REST API guide with examples
- OpenAPI Contract:
/openapi
endpoint oropenapi.json
file
Standardized protocol for AI assistant integration.
- MCP Overview - MCP protocol documentation and examples
- ChatGPT MCP Integration - Using MCP with ChatGPT
- ChatGPT REST Integration - Using REST API with ChatGPT
- VS Code Copilot Integration - Using with VS Code
- All file operations are confined to
WORKSPACE_ROOT/{projectId}
. - Bash commands are not fully network-isolated (MVP). Use in a controlled environment.
- See deployment documentation for security considerations specific to each deployment method.
-
Fork and clone the repo.
-
Create a feature branch.
-
Open a pull request with a clear description.