
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 分