Install
$ agentstack add mcp-agimaulana-codemagicmcp ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.6.2 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ● Network access Used
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ● Environment & secrets Used
- ✓ Dynamic code execution No
From automated source analysis of v0.6.2. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Codemagic MCP Server
[](https://registry.modelcontextprotocol.io/servers/io.github.AgiMaulana/CodemagicMcp)
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.
[](https://glama.ai/mcp/servers/AgiMaulana/CodemagicMcp)
[](https://glama.ai/mcp/servers/AgiMaulana/CodemagicMcp) [](https://lobehub.com/mcp/agimaulana-codemagicmcp) [](LICENSE)
Tools
Apps
| 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 |
Builds
| 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 |
Artifacts
| 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 |
Caches
| 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 |
Environment Variables
| 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 |
Webhooks
| 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.
Quick Start
The fastest way to get running with Claude Code — no separate install step needed:
# 1. Add the server (uses uvx to run it on-demand)
claude mcp add codemagic -e CODEMAGIC_API_KEY=your-api-key-here -- uvx codemagic-mcp
# 2. Restart Claude Code — tools will appear in /tools
That's it. See [Configuration](#configuration) for optional settings like CODEMAGIC_DEFAULT_APP_ID.
Installation
Requirements: Python 3.11+
Option 1 — uvx (recommended, no install needed)
uvx codemagic-mcp
Option 2 — pip
pip install codemagic-mcp
Option 3 — from source
git clone https://github.com/AgiMaulana/CodemagicMcp.git
cd CodemagicMcp
python3 -m venv .venv
.venv/bin/pip install -e .
Configuration
Get your API token from Codemagic User Settings → Integrations → Codemagic API.
You can provide settings as environment variables or via a .env file:
# .env
CODEMAGIC_API_KEY=your-api-key-here
# Optional: set a default app so you don't have to specify it every time
CODEMAGIC_DEFAULT_APP_ID=your-app-id-here
# Optional: customize managed temp log storage for get_step_logs(..., delivery="file")
CODEMAGIC_LOG_TEMP_DIR=/tmp/codemagic-mcp
CODEMAGIC_LOG_TTL_SECONDS=3600
CODEMAGIC_LOG_CLEANUP_INTERVAL_SECONDS=300
CODEMAGIC_LOG_MAX_TOTAL_BYTES=524288000
CODEMAGIC_LOG_MAX_FILE_COUNT=200
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:
artifact__
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:
claude mcp add codemagic -- codemagic-mcp
Then set your API key in the MCP env config, or export it in your shell before starting Claude Code:
export CODEMAGIC_API_KEY=your-api-key-here
Alternatively, add it manually to ~/.claude.json:
{
"mcpServers": {
"codemagic": {
"command": "codemagic-mcp",
"env": {
"CODEMAGIC_API_KEY": "your-api-key-here",
"CODEMAGIC_DEFAULT_APP_ID": "your-app-id-here"
}
}
}
}
Using uvx (no prior installation needed)
{
"mcpServers": {
"codemagic": {
"command": "uvx",
"args": ["codemagic-mcp"],
"env": {
"CODEMAGIC_API_KEY": "your-api-key-here",
"CODEMAGIC_DEFAULT_APP_ID": "your-app-id-here"
}
}
}
}
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):
{
"mcpServers": {
"codemagic": {
"command": "codemagic-mcp",
"env": {
"CODEMAGIC_API_KEY": "your-api-key-here",
"CODEMAGIC_DEFAULT_APP_ID": "your-app-id-here"
}
}
}
}
Restart Claude Desktop to pick up the changes.
Project Structure
codemagic_mcp/
├── config.py # pydantic-settings config (validates API key at startup)
├── client.py # httpx async client, one method per endpoint
├── server.py # FastMCP instance
└── tools/
├── apps.py
├── builds.py
├── artifacts.py
├── caches.py
├── variables.py
└── webhooks.py
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
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: AgiMaulana
- Source: AgiMaulana/CodemagicMcp
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.6.2 Imported from the upstream source.