Codemagic
Codemagic MCP 서버
Codemagic CI/CD REST API를 Claude에서 호출 가능한 도구로 노출하는 로컬 Python MCP 서버입니다. 채팅을 나갈 필요 없이 Claude Code나 Claude Desktop에서 바로 빌드를 트리거하고, 앱을 관리하고, 아티팩트를 다운로드하고, 캐시를 삭제할 수 있습니다.
도구
앱
도구 | 설명 |
| Codemagic 계정의 모든 애플리케이션 나열 |
| 특정 애플리케이션의 세부 정보 가져오기 |
| 공개 저장소를 Codemagic에 추가 |
| SSH 키를 사용하여 비공개 저장소 추가 |
| Codemagic에서 애플리케이션 삭제 |
빌드
도구 | 설명 |
| 빌드 나열 (앱별 필터링 가능) |
| 단계 수 요약이 포함된 빌드 세부 정보 가져오기; 전체 단계 목록을 보려면 |
| 애플리케이션에 대한 새 빌드 트리거 |
| 실행 중인 빌드 취소 |
| 빌드의 단계별 상태 요약 가져오기 (상태별 필터링 가능) |
| 특정 빌드 단계에 대한 원시 로그를 인라인으로 가져오거나 관리되는 임시 파일 생성/업데이트 |
| 특정 빌드 단계에 대해 관리되는 로컬 단계 로그 아티팩트가 여전히 존재하는지 확인 |
| 빌드에서 생성된 모든 아티팩트 나열 |
아티팩트
도구 | 설명 |
| 빌드 아티팩트의 다운로드 URL 가져오기 |
| 아티팩트에 대한 시간 제한 공개 URL 생성 |
캐시
도구 | 설명 |
| 애플리케이션의 모든 빌드 캐시 나열 |
| 특정 빌드 캐시 삭제 |
| 애플리케이션의 모든 빌드 캐시 삭제 |
환경 변수
도구 | 설명 |
| 애플리케이션의 모든 환경 변수 나열 |
| 애플리케이션에 환경 변수 추가 |
| 기존 환경 변수 업데이트 |
| 환경 변수 삭제 |
웹훅
도구 | 설명 |
| 애플리케이션의 모든 웹훅 나열 |
| 애플리케이션에 웹훅 추가 |
| 웹훅 삭제 |
⚠️ 이 도구들은 파괴적인 작업으로 표시되어 있으며 실행 전 확인을 요청합니다.
Related MCP server: claudecode-mcp
빠른 시작
Claude Code를 빠르게 시작하는 방법입니다. 별도의 설치 단계가 필요하지 않습니다:
# 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끝입니다. CODEMAGIC_DEFAULT_APP_ID와 같은 선택적 설정은 구성을 참조하세요.
설치
요구 사항: Python 3.11+
옵션 1 — uvx (권장, 설치 불필요)
uvx codemagic-mcp옵션 2 — pip
pip install codemagic-mcp옵션 3 — 소스에서 설치
git clone https://github.com/AgiMaulana/CodemagicMcp.git
cd CodemagicMcp
python3 -m venv .venv
.venv/bin/pip install -e .구성
Codemagic 사용자 설정 → 통합 → Codemagic API에서 API 토큰을 받으세요.
설정은 환경 변수나 .env 파일을 통해 제공할 수 있습니다:
# .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기본 앱 ID
CODEMAGIC_DEFAULT_APP_ID는 선택 사항이지만 주로 하나의 앱으로 작업하는 경우 권장됩니다. 설정하면 도구에서 app_id가 필요하고 지정되지 않았을 때 AI가 자동으로 이를 사용합니다. 설정되지 않은 경우 AI는 다음과 같이 동작합니다:
list_apps를 호출하여 사용 가능한 앱을 찾습니다.앱이 하나만 존재하면 자동으로 사용합니다.
여러 앱이 발견되면 목록을 제시하고 선택을 요청합니다.
단계 로그 파일 전달
get_step_logs는 두 가지 전달 모드를 지원합니다:
delivery="file"은 기본값이며 로그를 관리되는 로컬 임시 파일에 쓰고artifact_id,file_path,bytes,line_count,expires_at과 같은 메타데이터를 반환합니다.delivery="inline"은 원시 단계 로그 텍스트를 직접 반환합니다.
로컬 파일 모드는 단계 로그가 너무 커서 인라인으로 반환하기 어려울 때 유용합니다. 관리되는 로그 파일은 CODEMAGIC_LOG_TEMP_DIR 아래에 저장되며 만료된 파일은 새 로그 파일이 작성될 때마다 기회주의적으로 정리됩니다. 기본 보존 기간은 CODEMAGIC_LOG_TTL_SECONDS에 의해 제어되며 기본값은 3600초입니다.
서버는 시작 시 정리 작업과 주기적인 백그라운드 정리 루프도 실행합니다. 루프 간격은 CODEMAGIC_LOG_CLEANUP_INTERVAL_SECONDS에 의해 제어되며 기본값은 300초입니다. 추가적인 안전 장치로 관리되는 임시 디렉토리는 CODEMAGIC_LOG_MAX_TOTAL_BYTES 및 CODEMAGIC_LOG_MAX_FILE_COUNT에 의해 제한됩니다. 제한을 초과하면 가장 오래된 파일부터 삭제됩니다.
get_step_log_artifact(build_id, step_id)는 Codemagic을 다시 호출하거나 파일 내용을 반환하지 않고 해당 관리되는 아티팩트가 여전히 존재하는지 확인합니다. 아티팩트 메타데이터에는 다음과 같은 형식의 결정론적 artifact_id가 포함됩니다:
artifact_<build_id>_<step_id>아티팩트가 없으면 서버는 status="missing"과 이유 not_generated_or_expired를 반환합니다. 이는 파일이 생성되지 않았거나 만료되어 삭제되었음을 의미합니다.
Claude Code에 등록
다음 명령어를 실행하여 서버를 추가하세요:
claude mcp add codemagic -- codemagic-mcp그런 다음 MCP 환경 설정에 API 키를 설정하거나, Claude Code를 시작하기 전에 셸에서 내보내세요:
export CODEMAGIC_API_KEY=your-api-key-here또는 ~/.claude.json에 수동으로 추가하세요:
{
"mcpServers": {
"codemagic": {
"command": "codemagic-mcp",
"env": {
"CODEMAGIC_API_KEY": "your-api-key-here",
"CODEMAGIC_DEFAULT_APP_ID": "your-app-id-here"
}
}
}
}uvx 사용 (사전 설치 불필요)
{
"mcpServers": {
"codemagic": {
"command": "uvx",
"args": ["codemagic-mcp"],
"env": {
"CODEMAGIC_API_KEY": "your-api-key-here",
"CODEMAGIC_DEFAULT_APP_ID": "your-app-id-here"
}
}
}
}Claude Code를 다시 시작하면 /tools에 도구가 나타납니다.
Claude Desktop에 등록
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 또는 %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"
}
}
}
}변경 사항을 적용하려면 Claude Desktop을 다시 시작하세요.
프로젝트 구조
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새 도구 추가
client.py에 메서드 추가관련
tools/*.py파일에 도구 함수 추가끝입니다 —
server.py는 변경할 필요가 없습니다
Available Tools
25 toolsadd_appB
Add a new public repository to Codemagic.
Args: repository_url: The HTTPS URL of the public Git repository.
Inputs: repository_url (required).
add_private_appC
Add a new private repository to Codemagic using an SSH key.
Args: repository_url: The SSH URL of the private Git repository. ssh_key_data: Base64-encoded SSH private key. ssh_passphrase: Optional passphrase for the SSH key. project_type: Optional project type (e.g. "flutter-app", "react-native"). team_id: Optional team ID to add the app to.
Inputs: repository_url (required), ssh_key_data (required), ssh_passphrase, project_type, +1 more.
add_variableA
Add an environment variable to a Codemagic application.
Args: app_id: The Codemagic application ID. key: The variable name. value: The variable value. group: The variable group name. secure: Whether the variable should be encrypted (e.g. for secrets/tokens).
Inputs: app_id (required), key (required), value (required), group (required), +1 more.
add_webhookB
Add a webhook to a Codemagic application.
Args: app_id: The Codemagic application ID. url: The URL to send webhook payloads to. events: List of events to subscribe to (e.g. ["build.finished", "build.started"]).
Inputs: app_id (required), url (required), events (required).
cancel_buildADestructive
Cancel a running Codemagic build.
Args: build_id: The build ID to cancel.
Inputs: build_id (required).
create_artifact_public_urlB
Create a time-limited public URL for a build artifact.
Args: secure_filename: The secure filename of the artifact (from build results). expires_at: Expiry time as a UNIX timestamp (seconds since epoch).
Inputs: secure_filename (required), expires_at (required).
delete_all_cachesBDestructive
Delete all build caches for a Codemagic application.
Args: app_id: The Codemagic application ID.
Inputs: app_id (required).
delete_appADestructive
Delete an application from Codemagic.
Args: app_id: The Codemagic application ID.
Inputs: app_id (required).
delete_cacheBDestructive
Delete a specific build cache for a Codemagic application.
Args: app_id: The Codemagic application ID. cache_id: The cache ID to delete.
Inputs: app_id (required), cache_id (required).
delete_variableBDestructive
Delete an environment variable from a Codemagic application.
Args: app_id: The Codemagic application ID. variable_id: The variable ID to delete.
Inputs: app_id (required), variable_id (required).
delete_webhookADestructive
Delete a webhook from a Codemagic application.
Args: app_id: The Codemagic application ID. webhook_id: The webhook ID to delete.
Inputs: app_id (required), webhook_id (required).
get_appA
Get details of a specific application by its ID.
Args: app_id: The Codemagic application ID.
Inputs: app_id (required).
get_artifact_urlA
Get the download URL for a build artifact.
Args: secure_filename: The secure filename of the artifact (from build results).
Inputs: secure_filename (required).
get_buildA
Get details and status of a specific Codemagic build.
Always includes a step summary (total, success, failed, skipped counts). Set include_steps=True to also get the full list of steps with their IDs, which can then be used with get_step_logs.
Args: build_id: The Codemagic build ID. include_steps: If True, include full step list with IDs. Default False.
Inputs: build_id (required), include_steps.
get_build_logsA
Get a step-by-step status summary of a Codemagic build.
Returns each build step with its name, ID, and status (✅ success, ❌ failed, ⏭ skipped).
Args: build_id: The Codemagic build ID. statuses: Optional list of statuses to filter by. Valid values: "success", "failed", "skipped", "canceled". If omitted, all steps are returned.
Inputs: build_id (required), statuses.
get_step_log_artifactA
Check whether a managed step log artifact exists for a build step.
This tool only inspects the local managed artifact created by get_step_logs(..., delivery="file"). It does not fetch from Codemagic, recreate missing files, or return log contents inline.
The returned artifact metadata includes a deterministic artifact_id: artifact_<build_id>_<step_id>
Args: build_id: The Codemagic build ID. step_id: The step ID (from get_build_logs output).
Inputs: build_id (required), step_id (required).
get_step_logsA
Get the raw logs for a specific build step.
Use get_build_logs first to see all step IDs, then call this to drill into a specific step.
Args: build_id: The Codemagic build ID. step_id: The step ID (from get_build_logs output). delivery: Defaults to "file" to create/update a managed temp file and return artifact metadata. Use "inline" to return log text directly.
Inputs: build_id (required), step_id (required), delivery.
list_appsA
List all applications in your Codemagic account.
Inputs: no named parameters.
list_build_artifactsC
List all artifacts produced by a Codemagic build.
Args: build_id: The Codemagic build ID.
Inputs: build_id (required).
list_buildsA
List Codemagic builds, optionally filtered by app, branch, and/or tag.
Args: app_id: Optional app ID to filter builds. If omitted, returns builds across all apps. branch: Optional branch name to filter builds (e.g. "main"). tag: Optional tag name to filter builds (e.g. "release_v5.57.2"). limit: Number of builds per page (default 10). page: Page number to retrieve, starting from 1 (default 1).
Inputs: app_id, branch, tag, limit, +1 more.
list_cachesB
List all build caches for a Codemagic application.
Args: app_id: The Codemagic application ID.
Inputs: app_id (required).
list_variablesB
List all environment variables for a Codemagic application.
Args: app_id: The Codemagic application ID.
Inputs: app_id (required).
list_webhooksA
List all webhooks configured for a Codemagic application.
Args: app_id: The Codemagic application ID.
Inputs: app_id (required).
trigger_buildA
Trigger a new build for a Codemagic application.
Args: app_id: The Codemagic application ID. workflow_id: The workflow ID to run. branch: Git branch to build (mutually exclusive with tag). tag: Git tag to build (mutually exclusive with branch). environment: Optional environment variables to override, e.g. {"variables": {"KEY": "value"}}. instance_type: Optional machine instance type to use for the build.
Inputs: app_id (required), workflow_id (required), branch, tag, +2 more.
update_variableA
Update an existing environment variable for a Codemagic application.
Args: app_id: The Codemagic application ID. variable_id: The variable ID to update. key: The variable name. value: The new variable value. group: The variable group name. secure: Whether the variable should be encrypted.
Inputs: app_id (required), variable_id (required), key (required), value (required), +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 25 tools
All tools have clearly distinct purposes, with no overlap. Even similar tools like add_app and add_private_app are distinguished by public vs private repos. Descriptions and parameters further clarify their roles.
Tool names consistently follow a verb_noun pattern in snake_case. Examples: add_app, get_build, list_apps, delete_variable. No mixing of casing or style.
25 tools is on the higher end but appropriate for a full CI/CD API covering apps, builds, artifacts, caches, variables, and webhooks. Each tool serves a distinct purpose without redundancy.
Covers most core workflows: app management (add, get, delete), build lifecycle (trigger, cancel, get, list, logs), artifact handling, caches, variables, and webhooks. Missing update_app, but that is a minor gap.
Maintenance
Related MCP Connectors
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
MCP server exposing Buildkite API data (pipelines, builds, jobs, tests) to AI tooling and editors.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Related MCP Servers
AlicenseNot gradedqualityFmaintenanceA Python-based MCP server that allows Claude and other LLMs to execute arbitrary Python code directly through your desktop Claude app, enabling data scientists to connect LLMs to APIs and executable code.25MIT- AlicenseAqualityBmaintenanceLocal MCP server that wraps the headless Claude Code CLI as MCP tools, providing stateless access to Claude's coding capabilities through prompt-based interactions. It enables users to execute Claude Code commands with various prompt formats and structured outputs directly from MCP clients.3MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for the Codemagic CI/CD API, enabling app management, build operations, artifact handling, cache control, and team management through natural language.8 npm3MIT
- AlicenseAqualityDmaintenanceA lightweight MCP server that provides seamless access to Codemagic CI/CD APIs, enabling natural language interaction with applications, builds, artifacts, caches, and teams.1616MIT