engineering-bridge

engineering-bridge

A local STDIO MCP server that bridges MCP clients to the Codex CLI by sending instructions to a configured workspace, exposing task run, status, and result tools with a read-only sandbox and no remote transport.

Category
访问服务器

README

Engineering Bridge

Engineering Bridge 0.2.0-alpha is a small local STDIO MCP server. It sends an instruction to the locally installed Codex CLI in a configured workspace and returns Codex's final text to the MCP client. It can also apply a narrowly validated patch after explicit review and confirmation.

This is alpha software. Run it only on a machine you control, and have a trusted local operator maintain the workspace configuration.

简体中文

In plain English

Engineering Bridge connects ChatGPT's Chat or Work entry point to the Codex CLI on your computer, replacing the need to copy prompts and answers by hand. Through Engineering Bridge, ChatGPT can give the local Codex CLI a task in a workspace that a trusted operator has already registered, check its progress, and bring the final answer back. Engineering Bridge also works with other apps that support local STDIO MCP tool calls.

Before and after

Before: in Chat or Work, you describe the task; then you open the local Codex CLI, restate the task, wait, and bring the answer back to the conversation.

After: you describe the task once in Chat or Work. Engineering Bridge sends it to the local Codex CLI, checks its status, and brings the answer back to the current conversation.

What you can ask today

The current bridge is useful for read-only questions such as:

  • “Summarize the code changes in this workspace.”
  • “Find where this behavior is implemented and explain it.”
  • “Review this code for risks without changing anything.”

One complete conversation

  1. You ask in ChatGPT's Chat or Work entry point: “Where is login handled, and what should I know before changing it?”
  2. ChatGPT sends the task through Engineering Bridge to the local Codex CLI for one registered workspace.
  3. Engineering Bridge starts the local Codex CLI with read-only access.
  4. ChatGPT checks the task status while Codex examines the workspace.
  5. When the task finishes, ChatGPT retrieves Codex's final answer through Engineering Bridge and shows it to you.

Current limits

Read-only tasks remain available in every registered workspace. Controlled writes are disabled by default and can only modify existing tracked regular text files in explicitly enabled Git workspaces. The bridge never automatically runs tests, stages, commits, or pushes changes.

There is no HTTP service, UI, or account system. Tasks and answers are not persisted, and running tasks cannot be cancelled and have no timeout.

Requirements

  • Node.js 22 or newer
  • The Codex CLI installed, available as codex, and authenticated

Install and check

npm install
npm run typecheck
npm run build
npm test

Configure and start

Copy the example configuration and edit it:

cp config/workspaces.example.json workspaces.json

Each entry maps a caller-visible ID to a workspace root. root must be an absolute, normalized path (for example, /home/alice/projects/example, not a relative path or a path containing ..). Optional allow_write defaults to false; set it to true only for a workspace where controlled patch application is intended. The file is trusted local configuration; MCP callers cannot register workspace roots.

After building, start the STDIO server with either command:

node dist/src/mcp-stdio.js /absolute/path/to/workspaces.json
# or
npm run mcp:stdio -- /absolute/path/to/workspaces.json

Connect that process to an MCP client as a local STDIO server. There is no HTTP or remote transport.

Workspace access and controlled writes

The bridge can access only workspaces that a trusted local operator has registered in workspaces.json before startup. An MCP caller selects a registered workspace_id; it cannot register or supply a new path dynamically. UNKNOWN_WORKSPACE means that the requested ID is not registered, so the access boundary is working—it does not grant automatic access to the host.

For example, this configuration provides one read-only workspace and one Git workspace with controlled writes enabled:

[
  {
    "id": "docs",
    "root": "/absolute/path/to/docs"
  },
  {
    "id": "example-app",
    "root": "/absolute/path/to/example-app",
    "allow_write": true
  }
]

allow_write is granted per workspace and defaults to false. When it is explicitly enabled, the bridge can generate and apply a controlled patch only if the workspace is clean, its configured root is the Git top-level, and every target is an existing tracked regular text file. generate_controlled_patch produces a diff for review but does not modify the workspace. apply_controlled_patch runs only after the caller supplies the exact confirmation APPLY, then rechecks HEAD, the worktree, and the patch before applying it. The bridge does not automatically run tests, stage, commit, or push.

If a request returns UNKNOWN_WORKSPACE, check the workspace ID spelling, confirm that Bridge was started with the intended configuration file, verify that root is an absolute path, and restart Bridge after changing workspaces.json.

Tools and task flow

The server exposes exactly five tools:

  1. run_task accepts workspace_id and instruction, queues the work, and returns a task_id.
  2. task_status accepts the task_id; poll it until the state is completed or failed.
  3. task_result accepts the task_id and returns the final Codex text or a safe error after the task reaches a terminal state.
  4. generate_controlled_patch accepts only workspace_id and change_request. For a write-enabled, clean Git worktree at its repository root, it records HEAD, starts the same read-only Codex executor, and returns task_id and base_head. Use task_status and task_result to poll and review the textual diff.
  5. apply_controlled_patch accepts only that patch_task_id and exact confirmation APPLY. It rechecks the root, HEAD, and clean tracked state, validates the reviewed patch, and applies it once with fixed git apply --check and git apply calls.

Tasks and results exist only in process memory and disappear when the server restarts.

Enforced execution boundary

For every task, the bridge launches local Codex with a fixed read-only sandbox, approval set to never, an ephemeral session, and network access disabled. It does not invoke a shell, and the child process receives only a small allowlist of inherited environment fields. The instruction is sent on standard input rather than placed in caller-controlled arguments.

The current public release provides only local STDIO transport and local Codex workspace capabilities. It has no HTTP server, SSH or remote-server access, container upgrades, service restarts, arbitrary shell execution, database, persistence, UI, accounts, automatic tests, staging, commits, or pushes. A registered local code workspace is not a remote deployment-maintenance capability; remote operations require a separately implemented, restricted execution entry point and cannot be enabled by registering an ordinary workspace. Controlled patch generation verifies that an enabled root is exactly its Git top-level; ordinary read-only tasks do not require a Git repository. The bridge does not resolve real paths to enforce symlink containment. There is no task cancellation or timeout. See SECURITY.md before use.

Acknowledgements

Engineering Bridge was conceived and directed by wudy29 and developed in close collaboration with ChatGPT-Demu, with Codex assisting implementation and verification. Special thanks to Demu for helping turn an idea into a real open-source project—and for leaving a tangible trace in our shared world.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选