omp
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., "@omp ask omp to review the changes in src/auth.py for security issues"
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.
agy-omp-mcp
零第三方依赖的 MCP (Model Context Protocol) stdio 桥接服务,让 Google Antigravity 直接调用本机的 omp (oh-my-pi) CLI。
特性
零第三方依赖:仅依赖 Python 3.11+ 标准库,克隆后可直接运行,无需
pip install。复用本机
omp环境:通过omp --mode json -p调用本机已配置的omp,直接沿用~/.omp/agent的登录凭据、模型角色配置与会话历史。当前模型透明提示:
流式解析
ompJSONL 事件中的实际provider/model(若单次执行中发生模型切换,会一并列出全部涉及的模型)。执行启动及识别到真实模型时发送 MCP
notifications/message通知;若宿主客户端提供了progressToken,同步调用还会发送notifications/progress通知。正常工具结果首行输出当前调用的模型名称(
omp_get_model展示本机默认配置模型;omp_start_task启动时先展示指定/默认模型并在运行中更新为实际模型),并在 MCPinstructions与工具描述中要求宿主 Agent 向用户汇报模型名称。
多轮会话续接:当
omp返回session事件时,结果中包含Session: <id>,传入session_id可通过omp --resume继续同一上下文。同步与异步双模式:支持只读问答/代码审查、同步任务执行,以及保存在当前服务进程内存中的后台任务启动、状态轮询与取消(Windows 上尝试终止进程树,其他平台终止子进程)。
Related MCP server: codex-executor
目录结构
agy-omp-mcp/
├── LICENSE # MIT 许可证
├── README.md
├── pyproject.toml # 项目元数据与可选安装入口(无第三方运行时依赖)
├── run_server.py # MCP stdio 入口脚本
├── omp_mcp/
│ ├── __init__.py
│ ├── __main__.py # 支持 `python -m omp_mcp` 启动
│ ├── omp_client.py # 本机 omp CLI 调用、JSONL 解析与后台任务管理
│ └── server.py # JSON-RPC 2.0 MCP stdio 服务与工具定义
├── examples/
│ ├── mcp_config.json # Antigravity 全局 MCP 配置示例
│ └── rules/
│ ├── omp-model-notice.md # 轻量规则:仅约束调用 omp 时提示模型名
│ └── omp-orchestrator.md # 完整编排规则:Orchestrator 分工、文档核对与模型提示
└── tests/
└── test_omp_mcp.py # 单元测试提供的 MCP 工具
工具 | 说明 | 默认超时 |
| 查看本机 | — |
| 只读问答、代码审查、架构诊断与文档核对;默认开启只读工具 | 300s(10–3600s) |
| 在指定 | 600s(10–7200s) |
| 在后台异步启动耗时任务并返回 | 900s(10–7200s) |
| 查询后台任务状态、当前识别到的模型、耗时、最近工具活动以及最终输出 | — |
| 取消运行中的后台任务并终止对应的本地 | — |
安全边界说明:
cwd仅作为工作目录传给omp,并非文件系统沙箱;另外本地桥接仍会通过本机omp调用所配置的远端/本地模型提供方,提示词与读取的代码内容将发送至对应模型。
前置要求
Python 3.11+
本机已安装并完成登录配置的
omp(oh-my-pi) CLI
配置方法
1. 注册到 Antigravity MCP 配置
编辑 ~/.gemini/config/mcp_config.json(Windows 为 C:\Users\<用户名>\.gemini\config\mcp_config.json),参考 examples/mcp_config.json 添加 omp 服务(将路径替换为本机仓库的绝对路径):
{
"mcpServers": {
"omp": {
"command": "python",
"args": ["/path/to/agy-omp-mcp/run_server.py"]
}
}
}如果 GUI 启动的 Antigravity 环境中 python 或 omp 不在默认 PATH 里,建议填绝对路径并通过 env.OMP_BIN 显式指定:
{
"mcpServers": {
"omp": {
"command": "C:/Path/To/Python/python.exe",
"args": ["C:/Path/To/agy-omp-mcp/run_server.py"],
"env": {
"OMP_BIN": "C:/Users/<用户名>/.bun/bin/omp.exe"
}
}
}
}也支持通过 python -m omp_mcp 启动,或执行 pip install -e . 后使用 agy-omp-mcp 命令启动。保存配置后,在 Antigravity 中刷新 MCP 服务或新开会话即可生效。
2. (推荐)启用 Antigravity 规则
从 examples/rules/ 中二选一复制到 ~/.gemini/config/rules/(全局生效)或具体仓库的 .agents/rules/(仅当前项目生效):
仅提示模型(轻量版):
examples/rules/omp-model-notice.md完整 Orchestrator 编排 + 模型提示:
examples/rules/omp-orchestrator.md明确 Antigravity(规划、小改动、文档/注释编写、最终验收)与
omp(多文件实现/重构、跨模型审查、核对文档与注释)的协作边界。已包含模型透明提示要求,启用此规则时无需同时保留轻量版。
开发与测试
运行单元测试(不发起真实网络请求):
python -m unittest discover -s tests -vAvailable Tools
6 toolsomp_askA
以只读模式调用本机 omp 进行问答、代码审查、架构建议或问题诊断(禁止修改文件与执行写入命令)。重要提示:调用本工具及向用户汇报结果时,必须明确告知用户当前通过 omp 调用的模型名称(以返回结果中的模型提示行为准)。
Inputs: prompt (required), cwd, model, thinking, +3 more.
omp_cancel_taskB
取消正在运行的后台 omp 任务并终止对应的本地 omp 进程。重要提示:调用本工具及向用户汇报结果时,必须明确告知用户当前通过 omp 调用的模型名称(以返回结果中的模型提示行为准)。
Inputs: task_id (required).
omp_get_modelA
查询本机 omp 当前默认配置的模型、各角色模型(default/smol/slow/plan)、预设与思考深度,也可按需列出或搜索本机可用模型列表。重要提示:调用本工具及向用户汇报结果时,必须明确告知用户当前通过 omp 调用的模型名称(以返回结果中的模型提示行为准)。
Inputs: filter, list_available.
omp_run_taskA
同步委托本机 omp 在指定项目目录中执行编码、重构、调试或验证任务(允许读写与命令执行,自动审批工具调用)。重要提示:调用本工具及向用户汇报结果时,必须明确告知用户当前通过 omp 调用的模型名称(以返回结果中的模型提示行为准)。
Inputs: cwd (required), prompt (required), model, tools, +3 more.
omp_start_taskA
在后台异步启动一个较耗时的本机 omp 任务,立即返回 task_id 与当前配置的模型,避免同步等待超时。后续配合 omp_task_status 轮询进度或 omp_cancel_task 取消。重要提示:调用本工具及向用户汇报结果时,必须明确告知用户当前通过 omp 调用的模型名称(以返回结果中的模型提示行为准)。
Inputs: cwd (required), prompt (required), model, tools, +4 more.
omp_task_statusB
查询由 omp_start_task 启动的后台 omp 任务状态、实时识别到的模型名称、工具活动以及最终输出。重要提示:调用本工具及向用户汇报结果时,必须明确告知用户当前通过 omp 调用的模型名称(以返回结果中的模型提示行为准)。
Inputs: task_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct role: read-only Q&A (omp_ask) vs. synchronous write-capable execution (omp_run_task) vs. asynchronous background execution (omp_start_task). The task lifecycle tools (start/status/cancel) and the model configuration query are cleanly separated with no meaningful overlap.
All tools share a consistent 'omp_' prefix and mostly follow a verb_noun pattern (get_model, ask, run_task, start_task, cancel_task). omp_task_status is the one deviation, using a noun_phrase rather than a verb-first form like get_task_status.
Six tools is well-scoped for a local omp delegation wrapper: one config query, one read-only query, one sync runner, and a three-tool async lifecycle. Every tool earns its place without redundancy.
The surface covers model inspection, read-only Q&A, synchronous execution, and full async task lifecycle (start/status/cancel). Minor gaps exist around session continuation or streaming live logs, but agents can work around these through polling and repeated calls.
Maintenance
Related MCP Connectors
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables MCP clients to use the local Antigravity CLI for natural-language queries, repository analysis, and agent execution, reusing the user's Antigravity subscription without exporting credentials.8MIT
- AlicenseNot gradedqualityBmaintenanceEnables Antigravity to delegate concrete local coding tasks to Codex CLI with durable sessions, background execution, native chat links, and event-driven receipts.MIT
- AlicenseNot gradedqualityBmaintenanceEnables Google Gemini on web or mobile to connect to a local Antigravity IDE/CLI workstation, letting users browse and manage coding sessions, inspect paused approvals, search and read repository files, audit git changes, send handoffs that resume the right project chat, and view ASCII usage telemetry or a live web dashboard.10AGPL 3.0
- AlicenseBqualityCmaintenanceEnables MCP clients such as Claude Code and Cursor to delegate long multi-step coding tasks to Google Antigravity CLI, generate read-only plans and code reviews, digest large codebases, and manage background sessions in isolated git worktrees.15152 npm2MIT