AltairaLabs CodeGen MCP
分布式沙箱和模型上下文协议(MCP)提供程序,用于LLM驱动的代码生成和测试。
   
  

 ](https://go.dev/dl/) 
______________________________________________________________________
🧩 概述
AltairaLabs CodeGen MCP是一个开源软件 分布式执行层 这允许LLM在隔离的沙箱中安全地生成、编辑和测试代码——所有这些都是通过 模型上下文协议(MCP).
它提供了一个 MCP提供者和运行时 其工作原理类似于代理的轻量级CI系统:
- 协调池 基于Docker的worker代理
- 协调员服务 暴露MCP端点
- 安全、短暂 代码沙箱
- 可选的 共享文件系统或对象存储 为了恢复
- 直接集成 PromptKit/竞技场 工作流
______________________________________________________________________
🏗️ 建筑
flowchart TB
subgraph Coordinator["🧠 CodeGen Coordinator (Control Plane)"]
MCP["MCP Server (public endpoint)"]
Router["Session Router & Registry"]
Store["Session Store (Redis/Postgres)"]
end
subgraph Worker["⚙️ Docker Worker Agent (Data Plane)"]
API["Agent API (gRPC)"]
Sandbox["Per-Session Sandboxes"]
Vol["Ephemeral FS (mounted volume or object storage)"]
end
subgraph Client["🗣️ LLM / PromptKit Runtime"]
Arena["Arena / PromptPack Workflow"]
end
Client -->|"MCP Calls"| MCP
MCP --> Router
Router -->|Route Command| API
API --> Sandbox
Sandbox --> Vol
API --> Router
Router --> Store
Router -->|Stream Results| MCP
MCP --> Client______________________________________________________________________
🛠️ 发展
📖 ****
完整的部署指南,包括:
- 🚀 快速启动说明
- 📊 架构图
- ⚙️ 配置选项
- 🧪 测试和故障排除
- 🔧 开发工作流程
快速开始
# Clone the repository
git clone https://github.com/AltairaLabs/codegen-mcp.git
cd codegen-mcp
# Run the full CI pipeline locally
make ci可用生成目标
make help # Show all available targets
make install # Install dependencies and protoc plugins
make build # Build coordinator and worker binaries
make test # Run all tests
make test-unit # Run tests with coverage (used in CI)
make lint # Run linters (development mode)
make lint-ci # Run linters in strict mode (used in CI)
make coverage # Generate coverage report
make ci # Run full CI pipeline locally
make clean # Clean build artifactsCI管道
GitHub Actions CI管道使用make目标来实现一致性:
- 测试工作:
make install→make test-unit - 棉绒工作:
make install→make lint-ci - 构建作业:
make install→make build
在本地模拟CI管道,只需运行:
make ci这与CI执行相同的步骤:
- 安装依赖项
- 生成二进制文件
- 运行覆盖率测试
- 以严格模式运行过梁
先决条件
- 转到1.25+
- 协议缓冲区编译器 (
protoc) - 戈朗茨皮棉 对于linting
覆盖
当前测试覆盖率: ~85%
make coverage查看详细报道:
go tool cover -html=coverage.out______________________________________________________________________
📚 文档
有关详细文档,请参阅:
- docs/ -完整的文档
- 文档/协调员/ -协调员文件
- 文档/工作者/ -工人文件
- docs/local backlog/e2e-test-proposal.md -E2E测试实施
______________________________________________________________________
📄 许可证
Apache 2.0-请参阅 许可证 详情
版权所有©2025 AltairaLabs.ai
