Skip to content
Build Station

MCP server for AI assistants

Through the MCP server, AI assistants like Claude Code start local and Codemagic builds, read logs, upload builds and repair failed ones.

The Model Context Protocol (MCP) is an open standard that lets AI assistants use tools on your computer. The Build Station is an MCP server itself: the app serves it at a local address while it’s running. Through it, an assistant like Claude Code or Claude Desktop can start builds, read logs, upload artifacts and repair a failed build on its own.

What the assistant can do with it

A typical flow: you ask the assistant to build and upload a new version for a customer. It starts the build, waits for it to finish, reads the log if there’s an error, fixes the cause in the code and tries again. The same works for Codemagic builds, including repairing the codemagic.yaml.

Local builds

Tool What it does
list_projects projects with path, linked branch, Codemagic link and workflows
start_build queues a local build, optionally with version, build number, flutter clean and upload afterwards
list_runs the latest local runs: builds, uploads, repairs
get_run one run in detail: status, version, Git state, artifacts, error lines, open checklist items
get_run_log a run’s log, truncated to the last lines
wait_for_run waits until a run is finished
upload_build uploads a successful build’s artifacts to the configured stores, optionally with release notes
cancel_run cancels a running or waiting run
list_uploads which version is in which store, with commit, tag and release notes

Repair

Tool What it does
diagnose_build findings and repair suggestions with a diff for a failed build, local or in Codemagic
apply_build_fix applies a suggestion, with a backup
undo_build_fix reverts an application

These are the same suggestions the app shows above the log, see When a build fails.

Codemagic

Tool What it does
codemagic_list_builds latest builds, optionally by branch or workflow
codemagic_get_build status, steps, failed steps, artifacts
codemagic_get_build_log log of the failed steps or of one step
codemagic_start_build start a build on a branch or tag, with the same checks as the app
codemagic_wait_for_build wait until the build is finished
codemagic_cancel_build cancel a build
codemagic_get_config content, workflows and findings of the codemagic.yaml
codemagic_validate_config check a file or draft without writing
codemagic_write_config write the codemagic.yaml, refuses content with errors
codemagic_apply_fixes apply automatic corrections

How the server works

The MCP server runs inside the Build Station itself, at http://127.0.0.1:8788/mcp. The assistant connects over HTTP (MCP “Streamable HTTP”) and authenticates with a token. There’s no extra program to install.

Local builds and uploads go into the normal queue. That way the “one operation per folder” rule also applies to jobs from an AI, and you see every run in the window and in the history. It follows that:

  • The Build Station has to be running for the assistant to reach it.
  • The app only accepts jobs once the terms of use notice has been accepted.

upload_build really uploads, to the stores configured for the project. Only allow the assistant to use this tool if that’s what you want.

What the server deliberately doesn’t do

Commit and push. That stays with the assistant or with you, with whatever permissions and confirmations apply to it anyway.

The server may only write:

  • the codemagic.yaml of a linked project
  • via apply_build_fix, the files of a repair suggestion

Both with a backup each time, so a change can be reverted.

Setup

Under Einstellungen › MCP-Server (Settings › MCP server), the Station shows the address, the token and ready-to-copy commands. For Claude Code:

claude mcp add --transport http buildstation http://127.0.0.1:8788/mcp \
  --header "Authorization: Bearer <token>"

For a single project, you can also add the server to .mcp.json:

{
  "mcpServers": {
    "buildstation": {
      "type": "http",
      "url": "http://127.0.0.1:8788/mcp",
      "headers": { "Authorization": "Bearer <token>" }
    }
  }
}

Claude Desktop only launches local programs. There, you connect the address through npx mcp-remote, which requires Node.js. The Station shows the ready-made entry for claude_desktop_config.json as well. Set up other MCP clients with the address and the Authorization header.

Token and port

The token is per installation and only opens /mcp, not the rest of the app’s interface. Neues Token (New token) replaces it, and the old one stops working at once. The server rejects requests from a web page with a foreign origin.

If port 8788 is taken, the Station falls back to a free port and warns in the settings that the address only holds until the next launch. To set a different fixed port, add "port" to the mcp.json file in the app data folder.

From another computer

When remote access is running (with a licence), the MCP server is also reachable at its address, with the same token. Without HTTPS, the same applies as for remote access: only in your own network or behind a proxy with HTTPS.

Codemagic token for the server

The server uses the token from the keychain that you stored under Einstellungen › Codemagic (Settings › Codemagic).

Security

An assistant with access to this server can start builds, change files in the project and upload apps to stores. Keep an eye on your MCP client’s permissions and only let writing tools run after confirmation. What goes to the assistant’s provider beyond the tools, such as logs and code snippets, is governed by that provider’s terms.