
CodemagicMcp
io.github.AgiMaulana由 GitHub 账号 AgiMaulana 发布v0.6.2更新于 Oct 24, 2026
Codemagic CI/CD MCP Server — manage builds, apps, artifacts, and caches from your AI
概览
让助手通过 Codemagic REST API 管理 Codemagic CI/CD 的构建、应用、产物、缓存、变量和 Webhook。
- 可以做什么
- 把 Codemagic CI/CD REST API 封装为助手可调用的工具。可以列出并查看应用与构建、触发或取消构建、读取构建与步骤日志、列出产物,并生成有时效的产物公开链接。还可管理构建缓存、应用环境变量和 Webhook,其中包含被标记为破坏性的删除操作。
- 适用场景
- 适合通过 Codemagic 构建和发布项目的团队,希望在对话中查看构建状态、触发或取消构建、获取日志与产物,或调整缓存、变量和 Webhook,而不必打开 Codemagic 网页界面。
- 运行要求
- 以本地 Python 包形式运行(需 Python 3.11 及以上),可通过 uvx、pip 或源码安装,使用 stdio 传输。需要 CODEMAGIC_API_KEY 中的 Codemagic API 密钥;可选 CODEMAGIC_BASE_URL 和 CODEMAGIC_DEFAULT_APP_ID。需要访问 Codemagic API 的网络。仅支持桌面客户端。
安装
在 SourceWeft 中
- 打开 控制台中的 CodemagicMcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Codemagic MCP Server
A local Python MCP server that exposes the Codemagic CI/CD REST API as Claude-callable tools. Trigger builds, manage apps, download artifacts, and clear caches — all from Claude Code or Claude Desktop without leaving the chat.
[CodemagicMcp MCP server] [MCP Badge] [License: MIT]
Tools
Apps
Builds
Artifacts
Caches
Environment Variables
Webhooks
⚠️ These tools are marked as destructive and will prompt for confirmation before executing.
Quick Start
The fastest way to get running with Claude Code — no separate install step needed:
That's it. See Configuration for optional settings like CODEMAGIC_DEFAULT_APP_ID.
Installation
Requirements: Python 3.11+
Option 1 — uvx (recommended, no install needed)
Option 2 — pip
Option 3 — from source
Configuration
Get your API token from Codemagic User Settings → Integrations → Codemagic API.
You can provide settings as environment variables or via a .env file:
Default App ID
CODEMAGIC_DEFAULT_APP_ID is optional but recommended if you work primarily with one app. When set, the AI will use it automatically whenever a tool requires an app_id and none was specified. If it is not set, the AI will:
- Call
list_appsto discover available apps. - Use the app automatically if only one exists.
- Present the list and ask you to choose if multiple apps are found.
Step Log File Delivery
get_step_logs supports two delivery modes:
delivery="file"is the default and writes the log to a managed local temp file, returning metadata such asartifact_id,file_path,bytes,line_count, andexpires_at.delivery="inline"returns the raw step log text directly.
The local file mode is useful when a step log is too large to comfortably return inline. Managed log files are stored under CODEMAGIC_LOG_TEMP_DIR and expired files are cleaned up opportunistically whenever a new log file is written. The default retention window is controlled by CODEMAGIC_LOG_TTL_SECONDS and defaults to 3600 seconds.
The server also runs a startup cleanup pass and a periodic background cleanup loop. The loop interval is controlled by CODEMAGIC_LOG_CLEANUP_INTERVAL_SECONDS and defaults to 300 seconds. As an additional safety backstop, the managed temp directory is capped by CODEMAGIC_LOG_MAX_TOTAL_BYTES and CODEMAGIC_LOG_MAX_FILE_COUNT; when either cap is exceeded, the oldest files are evicted first.
get_step_log_artifact(build_id, step_id) checks whether that managed artifact still exists without calling Codemagic again or returning the file contents. The artifact metadata includes a deterministic artifact_id in this format:
If the artifact is missing, the server returns status="missing" with reason not_generated_or_expired, which means the file was either never generated or it expired and was deleted.
Register with Claude Code
Run the following command to add the server:
Then set your API key in the MCP env config, or export it in your shell before starting Claude Code:
Alternatively, add it manually to ~/.claude.json:
Using uvx (no prior installation needed)
Restart Claude Code — the tools will appear in /tools.
Register with Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Restart Claude Desktop to pick up the changes.
Project Structure
Adding New Tools
- Add a method to
client.py - Add the tool function to the relevant
tools/*.pyfile - That's it —
server.pynever needs to change
来源:README.md,提交 0b726c8
工具
0版本历史
1- v0.6.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分