Codemagic CI/CD MCP Server β manage builds, apps, artifacts, and caches from your AI
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
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.
| Tool | Description |
|---|---|
list_apps | List all applications in your Codemagic account |
get_app | Get details of a specific application |
add_app | Add a public repository to Codemagic |
add_private_app | Add a private repository using an SSH key |
delete_app β οΈ | Delete an application from Codemagic |
| Tool | Description |
|---|---|
list_builds | List builds, optionally filtered by app |
get_build | Get build details with step count summary; pass include_steps=True for full step list |
trigger_build | Trigger a new build for an application |
cancel_build β οΈ | Cancel a running build |
get_build_logs | Get a step-by-step status summary of a build (filterable by status) |
get_step_logs | Get raw logs inline or create/update a managed temp file for a specific build step |
get_step_log_artifact | Check whether a managed local step-log artifact still exists for a specific build step |
list_build_artifacts | List all artifacts produced by a build |
| Tool | Description |
|---|---|
get_artifact_url | Get the download URL for a build artifact |
create_artifact_public_url | Create a time-limited public URL for an artifact |
| Tool | Description |
|---|---|
list_caches | List all build caches for an application |
delete_cache β οΈ | Delete a specific build cache |
delete_all_caches β οΈ | Delete all build caches for an application |
| Tool | Description |
|---|---|
list_variables | List all environment variables for an application |
add_variable | Add an environment variable to an application |
update_variable | Update an existing environment variable |
delete_variable β οΈ | Delete an environment variable |
| Tool | Description |
|---|---|
list_webhooks | List all webhooks for an application |
add_webhook | Add a webhook to an application |
delete_webhook β οΈ | Delete a webhook |
β οΈ These tools are marked as destructive and will prompt for confirmation before executing.
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.
Requirements: Python 3.11+
Get your API token from Codemagic User Settings β Integrations β Codemagic API.
You can provide settings as environment variables or via a .env file:
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:
list_apps to discover available apps.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 as artifact_id, file_path, bytes, line_count, and expires_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.
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:
Restart Claude Code β the tools will appear in /tools.
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.
client.pytools/*.py fileserver.py never needs to changeShowcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/codemagicmcp)<a href="https://allmcps.com/mcp/codemagicmcp"><img src="https://allmcps.com/api/badge/codemagicmcp?style=directory" alt="CodemagicMcp on AllMCPs" /></a>