Skip to main content
Glama
Zfinix

codemagic_mcp

by Zfinix

codemagic_mcp

用于 Codemagic CI/CD API 的 MCP 服务器。使用 Bun + TypeScript,采用 stdio 传输方式。

工具

应用 (Apps)

  • codemagic_get_all_applications

  • codemagic_get_application

  • codemagic_add_application

  • codemagic_add_application_private

构建 (Builds)

  • codemagic_start_build

  • codemagic_get_builds

  • codemagic_get_build_status

  • codemagic_cancel_build

制品 (Artifacts)

  • codemagic_get_artifact (返回元数据 + base64 预览;如需完整下载,请使用公共 URL 工具)

  • codemagic_create_public_artifact_url

缓存 (Caches)

  • codemagic_get_app_caches

  • codemagic_delete_all_app_caches

  • codemagic_delete_app_cache

团队 (Teams)

  • codemagic_invite_team_member

  • codemagic_delete_team_member

配置

环境变量:

变量

必需

默认值

说明

CODEMAGIC_API_KEY

从 Teams 设置 → Personal Account → API 获取

CODEMAGIC_BASE_URL

https://api.codemagic.io

用于自托管/测试环境的覆盖设置

CODEMAGIC_TIMEOUT_MS

30000

单次请求超时时间

CODEMAGIC_MAX_RETRIES

3

针对 408/425/429/5xx 及网络错误的重试次数(采用带抖动的指数退避算法,遵循 Retry-After

运行

bun install
CODEMAGIC_API_KEY=... bun run start

监视模式:

CODEMAGIC_API_KEY=... bun run dev

使用官方 MCP 检查器进行调试:

CODEMAGIC_API_KEY=... bun run inspect

Claude Code / Claude Desktop 配置

单行设置:

claude mcp add codemagic --scope user \
  -e CODEMAGIC_API_KEY=<your_key> \
  -- bunx codemagic_mcp

或在 claude_desktop_config.json 中手动配置:

{
  "mcpServers": {
    "codemagic": {
      "command": "bunx",
      "args": ["codemagic_mcp"],
      "env": { "CODEMAGIC_API_KEY": "..." }
    }
  }
}

安全说明

  • API 密钥仅从环境变量中读取。

  • 外发请求通过 x-auth-token 发送密钥;该密钥绝不会被记录到日志中。

  • 所有工具输出(文本和结构化数据)均经过脱敏处理,会屏蔽密钥值以及任何匹配 authorizationx-auth-tokenapi[-_]?keypasswordpassphrasessh[-_]?keysecrettoken 的对象键。

  • 错误被映射为类型化类(CodemagicAuthErrorCodemagicNotFoundErrorCodemagicValidationErrorCodemagicRateLimitErrorCodemagicServerErrorCodemagicNetworkError),并以可操作的消息形式呈现——内部堆栈跟踪不会暴露给客户端。

布局

src/
  index.ts          stdio entrypoint
  schemas.ts        Zod input schemas
  lib/
    config.ts       env loading + validation
    client.ts       fetch wrapper: timeouts, retries, status mapping
    errors.ts       typed error classes + user-facing formatter
    redact.ts       secret/string + key-pattern redaction
    response.ts     jsonResult / textResult / errorResult helpers
  tools/
    apps.ts builds.ts artifacts.ts caches.ts teams.ts
F
license - not found
-
quality - not tested
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Zfinix/codemagic_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server