linger-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@linger-mcp ask the bk agent to research recent MCP servers and summarize the results"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
linger-mcp
让 Codex Agent 通过 stdio MCP 无缝调度 Linger 全套角色,将长耗时异步任务与分级审批策略收口成安全可控的工具层。
简体中文 | English | 官方项目:simplexai-labs/linger
核心亮点 · 实测截图 · 图文海报 · 架构流程 · 审批策略 · 快速接入 · 工具清单 · 环境变量
核心亮点
维度 | 说明 |
留在 Codex 统一指挥 | 不用在 Antigravity 客户端多个角色对话间来回切窗口、手动搬运上下文,一句话查看并调度 Linger 在线团队。 |
长任务异步不阻塞 |
|
三级审批防越权 | 默认 |
凭据安全与透明留痕 | 支持 macOS 钥匙串托管密码、 |
Related MCP server: opencode-mcp
实际应用效果
1. 在 Codex 中一句话查看 Linger 在线角色与模型
直接询问「帮我看看 Linger 里有哪些在线角色」,通过 linger_list_agents 在 14 秒内列出全员类型、底层模型(如 gemini-4-hydrogen、gemini-4-neon、gemini-pro-orchestrator-neon、claude-opus-5-5)与空闲状态:
2. Codex 自动调度 Linger 角色跑重调研并交叉核验
输入「让 linger 中的 bk 查询 linger 项目相关的 mcp」,Codex 自动串联 linger_list_agents → linger_ask_agent → 异步轮询 → linger_read_room → 追问贴出全文,并独立联网核验 GitHub Issue #686 / PR #690 与同名误匹配项后输出结论:
3. Linger 侧 Codex Bridge 群聊全程透明留痕
默认 bridge 模式下,Codex 与 Linger 角色之间的派单、追问、在线文档卡片与结构化正文都会实时沉淀在 Codex Bridge 群聊中,人类可随时查看或直接接管:
项目图文海报
配套 6 张 3:4 图文海报(
2160 × 2880 px)已收入docs/posters/,点击任意一张可查看原图:
架构与流程
sequenceDiagram
participant C as Codex Agent
participant M as linger-mcp (stdio)
participant P as Approval Policy
participant T as TeamHub /v0 API
participant A as Linger Agent
C->>M: linger_ask_agent(agent, prompt)
M->>T: POST /v0/auth/login (缓存失效时, 0600 Cookie)
M->>T: 确保 Bridge Room / Direct Room + POST .../messages
T->>A: 唤醒 Agent Run
loop 轮询 GET /v0/rooms/{id}/events?after=seq
A->>T: 发送进度/回复或审批卡 (message.created)
M->>P: evaluateDecisionCard(card)
alt tiered 白名单只读工具或安全命令前缀
M->>T: POST /v0/decisions/{id} (approve + expected_version)
else 非白名单 runtime_permission / question
M-->>C: 返回 pending_approval 与卡片详情
C->>M: linger_decide_card(...)
M->>T: POST /v0/decisions/{id}
else 高风险或 Linger UI 独占卡
M-->>C: 返回 require_human (仅人在 Linger/OS 处理)
end
end
A->>T: agent_run.status_changed (completed / aborted)
opt 回复包含 Linger 文档卡片或附件
M->>T: GET /v0/documents/{id} & /downloads
T-->>M: 导出 Markdown/文本正文 (<=32K 字符自动内联)
end
M-->>C: 合并回复文本、内联文档正文与自动审批审计记录审批卡分级策略
默认使用 LINGER_APPROVAL_MODE=tiered,可通过环境变量切换为 relay(转发确认)或 manual(全人工模式):
分级 | 涵盖卡片类型 | 默认行为 | 说明与约束 |
自动放行 ( |
| 满足只读白名单或安全命令前缀时自动 | 拒绝 |
Codex 审阅 ( | 非白名单 | 返回 |
|
强制留给人 ( |
| 返回 | 后几类系统/OAuth 卡服务端仅允许在 Linger / OS 完成,接口仅支持 |
快速接入 Codex
1. 安装依赖并构建项目
npm ci
npm run build2. 可选:将 Linger 登录密码存入 macOS 钥匙串
避免在配置文件中写入明文密码:
security add-generic-password -U -s linger-mcp -a "you@example.com" -w "YOUR_PASSWORD"3. 在 ~/.codex/config.toml 中添加 MCP 配置
[mcp_servers.linger]
command = "node"
args = ["/path/to/linger-mcp/dist/src/index.js"]
tool_timeout_sec = 300
[mcp_servers.linger.env]
LINGER_URL = "http://localhost:8080"
LINGER_EMAIL = "you@example.com"
LINGER_KEYCHAIN_SERVICE = "linger-mcp"
LINGER_ROOM_MODE = "bridge"
LINGER_APPROVAL_MODE = "tiered"首次登录成功后会将teamhub_session Cookie 缓存在 ~/.config/linger-mcp/session.json(权限 0600),遇到 401 会自动重新登录并重试一次。
暴露的 MCP 工具
工具名 | 用途 |
| 列出 Linger 中的角色、描述、模型与在线状态 |
| 向指定角色发消息触发 Run(默认等待 |
| 轮询任务状态(支持 |
| 读取/分页查看指定 |
| 按策略校验并发起 |
| 查看当前可见的 Room 列表 |
| 读取指定 Room 的历史与最新消息上下文 |
| 取消运行中的 Linger Agent Run |
环境变量说明
变量 | 默认值 / 要求 | 说明 |
| 必填 | Linger TeamHub 服务地址(非回环地址必须使用 |
| 按认证方式配置 | 登录账号与密码(推荐优先使用 |
| 可选 | 本地安装时校验 |
|
| 会话房间模式: |
|
| 单次等待回复超时秒数(范围 |
|
| 是否自动内联回复中的文本/Markdown 文档卡片正文 |
|
| 单篇自动内联与 |
|
| 单文档下载大小上限(10 MiB) |
|
|
|
|
| 审批策略模式: |
| 预设只读工具 | 逗号分隔允许自动放行的只读工具名 |
| 预设安全前缀 | 逗号分隔允许自动放行的命令前缀 |
| 内置高危规则 | 额外禁止自动放行的正则(推荐 JSON 数组格式,如 |
|
| 是否允许白名单内的 GUI 操作自动审批 |
|
| 是否允许在带 |
|
| 并发任务上限,防止本地模型资源抢占 |
测试与许可
npm run typecheck
npm test本项目基于 MIT 协议开源。
Available Tools
8 toolslinger_ask_agentA
Send a task or question to a Linger agent (pass display_name or actor_id directly when known). Waits up to wait_seconds (default 60s) for completion and automatically inlines readable text/Markdown document cards returned in the reply under documents. Use linger_read_document for truncated/large docs or binary files instead of asking the agent to re-paste text in chat.
Inputs: agent (required), prompt (required), room_id, room_mode, +1 more.
linger_cancel_jobC
Request cancellation of the active Linger Agent Run associated with a job_id.
Inputs: job_id (required).
linger_decide_cardA
Submit a decision for a pending Linger card (runtime_permission approve/deny, question submit with answers, or human-confirmed relay decisions). High-risk and Linger-UI-only cards are guarded by policy.
Inputs: decision (required), decision_id (required), answers, comment, +4 more.
linger_get_replyA
Poll an active or pending-approval Linger job for new replies, auto-inlined documents, pending decision cards, or completion. Set wait_for_followup=true on a completed job when waiting for a follow-up async delivery from the agent.
Inputs: job_id (required), wait_seconds, wait_for_followup.
linger_list_agentsA
List available Linger agents in the workspace along with their description, model, and online availability.
Inputs: no named parameters.
linger_list_roomsA
List Linger rooms the authenticated user belongs to.
Inputs: limit.
linger_read_documentA
Read full or paginated UTF-8 content of a Linger document/file card (from snapshot.documents, reply segments, or linger_read_room), or save binary/large files locally via save_to_file=true. Prefer this over asking the Linger agent to paste full text into chat.
Inputs: document_id (required), offset, max_chars, save_to_file, +1 more.
linger_read_roomA
Read recent messages, document references, and any decision cards from a Linger room. To read the full content of a referenced document_id, call linger_read_document.
Inputs: room_id (required), limit, cursor.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool maps to a distinct step in the agent-job lifecycle (list, ask, poll, decide, cancel) plus room/document reading. The main risk is overlap between linger_ask_agent and linger_get_reply, but the descriptions clarify that ask blocks for a first reply while get_reply polls an existing job, and read_document is explicitly positioned as the fallback for truncated content.
All eight tools use the same linger_ prefix followed by a clear verb_noun pattern (list_agents, ask_agent, get_reply, decide_card, read_room, cancel_job). No mixing of casing or verb styles.
Eight tools is a well-scoped set for an agent-orchestration server, with each tool covering a distinct operation (discovery, messaging, polling, decisions, rooms, documents, cancellation). Nothing appears redundant or padding.
The core loop of discovering agents, dispatching work, polling replies, resolving decision cards, and cancelling jobs is fully covered, and room/document reading is present. Gaps exist around writing — no tool to post a message directly into a room, create a room, or write/save a document back to Linger.
Maintenance
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Coordination hub for AI coding agents: message teammates, ask humans, audit every event.
- aXDeprecatedio.github.ax-platform
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceMCP server for stage-aware, evidence-backed model routing in Codex. It assigns planning, design, development, review, and verification stages to explicit roles while preserving root-agent accountability and live model evidence.MIT
- AlicenseAqualityCmaintenanceA stdio MCP server that lets Claude Code delegate coding tasks to an OpenCode instance (optionally attached to an internal LLM gateway), with follow-up replies, status polling, output/diff retrieval, cancellation, and cleanup handled in a single session. It supports managed or attach modes, sandbox and approval policies, parallel fan-out delegations, and read-only review workflows.7MIT
- AlicenseAqualityBmaintenanceEnables Claude Code or any MCP client to delegate hands-on coding work to OpenAI Codex over a persistent app-server process, keeping long-lived threads with follow-ups, async polling, approvals, steering, and interrupts. Supports native code review, resuming existing sessions, structured output, and parallel worktree-isolated tasks.1024 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients such as Claude Code and Codex to delegate persistent review or isolated write-mode implementation tasks to locally installed Claude Code or Codex runtimes, then inspect progress, approve or deny individual permission requests, and continue the same native conversation. It also lists live model catalogues, lets callers follow up on saved conversations, and can run independently via its bundled CLI.2MIT