magpie-bridge
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CLAUDE_BIN | No | 可选显式指定 Claude Code CLI 路径(默认自动探测)— Optional explicit path to the Claude Code CLI | |
| MAGPIE_API_KEY | No | 可选鉴权密钥(自动脱敏,不泄露至日志/报错)— Optional authentication key, automatically redacted from logs/errors | |
| MAGPIE_BASE_URL | No | Magpie 网关基础地址 (Magpie gateway base URL) | http://127.0.0.1:3425 |
| MAGPIE_PROTOCOL | No | 网关协议(openai / anthropic)— Gateway protocol | openai |
| MAGPIE_TIMEOUT_MS | No | 单次网关 HTTP 请求超时(默认 10 分钟)— Per-request gateway HTTP timeout in milliseconds | 600000 |
| MAGPIE_SESSIONS_FILE | No | 可选覆写托管会话索引路径(同目录自动落盘 .claude-tasks.json)— Optional override for the managed sessions index file path | ../.sessions.json |
| MAGPIE_SWARM_STATE_FILE | No | 可选覆写 Swarm 状态落盘路径 — Optional override for the Swarm state file path | ../.swarm-state.json |
| CLAUDE_DEFAULT_PERMISSION_MODE | No | 可选无头默认权限模式(如 acceptEdits / bypassPermissions)— Optional default headless permission mode |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| magpie_list_modelsA | 查询本机 Magpie 网关当前可用的模型与路由列表。 |
| magpie_askB | 向 Magpie 网关上的指定模型发送提示词,可选附带本地文本文件内容作为上下文(自动限制单文件与总大小)。 |
| magpie_review_filesB | 面向代码评审与文档复核的快捷工具:自动读取指定本地文本文件并组装结构化评审提示词发送给目标模型。 |
| claude_runB | 以无头模式(claude -p)调用 Claude Code CLI 在指定工作目录执行多步编码、测试或浏览器验证任务,并持久化会话 ID。 |
| claude_resumeA | 按 session_id 续跑已有的无头 Claude Code CLI 会话(--resume),保持同一上下文继续修改或核查。 |
| claude_task_statusA | 查询后台或历史 Claude 任务状态、实时活动、最近工具/改动文件,以及完成后的完整未截断回复、退出码、耗时与费用;也可传 action="cancel" 主动安全暂停(终止进程树)指定或全部运行中任务并保留 session_id 与断点以便随时续跑。 |
| claude_list_sessionsB | 查询本地已托管的 Claude Code CLI 会话记录列表,可选按 cwd 或 session_id 过滤,并支持拉取完整末次回复。 |
| magpie_swarm_boardC | 打开并读取 Magpie 跨 Harness 多模型协同 Swarm 调度看板(支持按项目目录 cwd 分仓展示概览、任务看板、成员名册与交互式关系拓扑图)。 |
| magpie_swarm_planC | 由总控协调者更新 Swarm 调度看板的总目标(goal)、工作线程分组(threads)、手动登记/更新任务卡(task),以及管理项目级 Magpie 协同激活态(cwd/active/mode/roles)。 |
| magpie_swarm_stateC | 供前端 MCP App 内部调用的 Swarm 状态刷新、成员归档与清空工具(不对模型暴露)。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Magpie Swarm 调度台 | 仿 Swarm 风格的跨 Harness 多模型协同调度面板(概览、任务看板、成员名册、关系拓扑图)。 |
TDQS
Scored across 10 tools
The Magpie-side and Claude-side families are broadly distinguishable, but within them boundaries blur: magpie_review_files is a specialization of magpie_ask, and magpie_swarm_board / magpie_swarm_plan / magpie_swarm_state all operate on the same board with only read/write/internal distinctions. claude_task_status also bundles a destructive cancel action with status querying, and magpie_swarm_state is explicitly 'not exposed to models', which is confusing to have in a model-facing tool list.
Names are uniformly snake_case with clear magpie_ / claude_ resource prefixes, which gives a predictable grouping. Minor deviations: magpie_ask is a bare verb with no object, and magpie_swarm_board is a noun phrase while siblings use verb_noun forms.
Ten tools is a well-scoped set for a bridge covering model queries, prompt dispatch, code review, headless CLI execution, session management, and swarm board coordination. Each tool maps to a distinct workflow step rather than padding the surface.
The lifecycle is largely covered: model discovery, asking, review wrapper, run, resume, status/cancel, list sessions, and swarm plan/board read. Minor gaps remain, such as no batch/multi-file review orchestration, no task-card deletion or session cleanup, and no model health/route diagnostics beyond listing.