Skip to main content
Glama
Codemagic MCP Server

Codemagic MCP Server

Codemagic MCP Server


License: MIT Python 3.10+ Platform Build Status


A lightweight, community-maintained Model Context Protocol (MCP) server that provides seamless access to Codemagic CI/CD APIs. Built for agents, AI-native workflows, and for use of MCP-compatible clients.


🌐 How can you use this

You: What applications do I have on Codemagic?
Assistant: calls get_all_applications() and displays the list.

You: Start a new build for my Flutter app
Assistant: calls start_build() with appropriate parameters

You: Can you get the artifacts from my last build?
Assistant: calls get_builds() to find the latest build and then get_artifact() to download the files

You: Show me the cache usage for my app
Assistant: calls get_app_caches() and displays storage information


Related MCP server: codemagic_mcp

🌐 Getting started

1. Clone this repository

git clone https://github.com/stefanoamorelli/codemagic-mcp.git
cd codemagic-mcp

2. Set up your API key

Follow the official documentation.

3. Install the MCP server in your client

For example, for Claude Desktop:

{
  "mcpServers": {
    "Codemagic MCP Server": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with",
        "requests",
        "mcp",
        "run",
        "<global_path_to_the_cloned_repo>/codemagic_mcp/server.py"
      ],
      "env": {
        "PYTHONPATH": "<global_path_to_the_cloned_repo>/",
        "CODEMAGIC_API_KEY": "your-api-key-here"
      }
    },
}

📈 What this server can do

Interact with Codemagic CI/CD using natural language.

API Category

Tools

Applications API

get_all_applications, get_application, add_application, add_application_private

Artifacts API

get_artifact, create_public_artifact_url

Builds API

start_build, get_builds, get_build_status, cancel_build, get_build_step_log

Caches API

get_app_caches, delete_all_app_caches, delete_app_cache

Teams API

invite_team_member, delete_team_member


🛠️ Development

Run the server locally for testing:

mcp dev codemagic_mcp/server.py

📚 References


📜 License

MIT License © 2025 Stefano Amorelli

Available Tools

16 tools
add_applicationA

Add a new application to Codemagic.

Args: repository_url: SSH or HTTPS URL for cloning the repository team_id: Optional team ID to add the app directly to a team (must be admin)

Returns: Dictionary containing the created application details

Inputs: repository_url (required), team_id. Returns: result

add_application_privateA

Add a new application from a private repository to Codemagic.

Args: repository_url: SSH or HTTPS URL for cloning the repository ssh_key_data: base64-encoded private key file ssh_key_passphrase: SSH key passphrase or None if the SSH key is without a passphrase project_type: Set to "flutter-app" when adding Flutter application team_id: Optional team ID to add the app directly to a team (must be admin)

Returns: Dictionary containing the created application details

Inputs: repository_url (required), ssh_key_data (required), ssh_key_passphrase, project_type, +1 more. Returns: result

cancel_buildC

Cancel a running build on Codemagic.

Args: build_id: The build identifier

Returns: Response from the API (empty if successful)

Inputs: build_id (required). Returns: result

create_public_artifact_urlA

Create a public download URL for a build artifact.

Args: secure_filename: The secure filename of the artifact (from Builds API or Codemagic UI) Format: uuid1/uuid2/filename.ext expires_at: URL expiration UNIX timestamp in seconds

Returns: Dictionary containing the public artifact URL and expiration timestamp

Inputs: secure_filename (required), expires_at (required). Returns: result

delete_all_app_cachesC

Delete all stored caches for an application.

Args: app_id: The application identifier

Returns: Dictionary with the list of cache IDs that will be deleted and a message

Inputs: app_id (required). Returns: result

delete_app_cacheA

Delete a specific cache from an application.

Args: app_id: The application identifier cache_id: The cache identifier to delete

Returns: Dictionary with the deleted cache ID and a message

Inputs: app_id (required), cache_id (required). Returns: result

delete_team_memberA

Remove a team member from the team.

Args: team_id: The team identifier user_id: The user identifier to remove

Returns: Response from the API (empty if successful)

Inputs: team_id (required), user_id (required). Returns: result

get_all_applicationsB

Retrieve all applications from Codemagic.

Returns: Dictionary containing the applications

Inputs: no named parameters. Returns: result

get_app_cachesC

Retrieve a list of caches for an application.

Args: app_id: The application identifier

Returns: Dictionary containing the list of caches for the application

Inputs: app_id (required). Returns: result

get_applicationB

Retrieve a specific application from Codemagic by ID.

Args: app_id: Application ID

Returns: Dictionary containing the application details

Inputs: app_id (required). Returns: result

get_artifactB

Get authenticated download URL for a build artifact.

Args: secure_filename: The secure filename of the artifact (from Builds API or Codemagic UI) Format: uuid1/uuid2/filename.ext

Returns: The artifact file content as bytes

Inputs: secure_filename (required). Returns: result

get_buildsA

Get a list of builds from Codemagic build history.

Args: app_id: Optional filter by application identifier workflow_id: Optional filter by workflow identifier branch: Optional filter by branch name tag: Optional filter by tag name

Returns: Dictionary containing applications and builds information

Inputs: app_id, workflow_id, branch, tag. Returns: result

get_build_statusB

Get the status of a build on Codemagic.

Args: build_id: The build identifier

Returns: Dictionary containing the application and build information

Inputs: build_id (required). Returns: result

get_build_step_logA

Get the raw log output for a specific build step on Codemagic.

Calls the undocumented endpoint that the Codemagic web dashboard uses internally (GET /builds/{build_id}/step/{step_id}), which returns the step's stdout/stderr as text/plain. Use this to diagnose failed builds without manual dashboard access.

The step_id is the _id field of any entry in the buildActions array returned by get_build_status, or equivalently the last path segment of that step's logUrl.

Args: build_id: The build identifier step_id: The build step identifier

Returns: The step log as plain text

Inputs: build_id (required), step_id (required). Returns: result

invite_team_memberA

Invite a new team member to your team.

Args: team_id: The team identifier email: User email to invite role: User role, can be 'owner' (Admin) or 'developer' (Member)

Returns: Full team object

Inputs: team_id (required), email (required), role (required). Returns: result

start_buildA

Start a new build on Codemagic.

Args: app_id: The application identifier workflow_id: The workflow identifier branch: The branch name (either branch or tag is required) tag: The tag name (either branch or tag is required) environment: Dictionary with environment variables, variable groups, and software versions labels: List of labels to include for the build instance_type: Type of instance to use for the build (e.g. 'mac_mini_m2')

Returns: Dictionary with the build ID

Inputs: app_id (required), workflow_id (required), branch, tag, +3 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 16 tools

    Disambiguation5/5

    All tools have clearly distinct purposes: adding public vs private apps, managing builds, caches, team members, and artifacts. No overlap or ambiguity.

    Naming Consistency4/5

    Tools follow a consistent verb_noun pattern with underscores. Minor inconsistency: singular vs plural nouns (e.g., 'get_application' vs 'get_all_applications').

    Tool Count5/5

    16 tools cover the essential aspects of Codemagic CI/CD (apps, builds, caches, teams, artifacts) without being excessive or sparse.

    Completeness3/5

    Core operations are present, but missing update/delete for applications and no tool to list or get workflow details, which agents may need.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      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.
      25
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for the Codemagic CI/CD API, enabling app management, build operations, artifact handling, cache control, and team management through natural language.
      12 npm
      3
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      This MCP server enables users to manage Codemagic CI/CD builds directly from Claude Code, including listing apps, triggering builds, checking status, and canceling builds.
      6
      MIT