GPT Harness
GPT Harness
一个自托管的 MCP 网关,让 ChatGPT Web 在你控制的服务器上运行 shell 命令。
[!WARNING] 这是一个个人实验,不是产品。它把完整的 shell 命令交给语言模型,并在你的服务器上执行。运行前请阅读关于安全模型。
为什么存在
ChatGPT Web 擅长推理代码。借助 GitHub 连接器,它可以读取和编辑仓库。但它无法运行任何东西,因为它自己的环境没有网络访问权限。它无法安装依赖或执行测试套件。
Codex 可以做到这两点,但代理式使用是单独计费和限制的,与聊天分开。聊天的配额用尽要晚得多,或者根本不会用尽。
网关弥补了这一差距。ChatGPT 决定做什么,你的服务器执行。你的消息配额成为限制,而不是代理配额。
@gpt-harness work this ticket
git clone, write code, npm ci, npm test, repeat until green
@gpt-harness review this PR <link>
gh pr checkout, run its tests, report backRelated MCP server: Personal AIVA MCP Bootstrap
它暴露了什么
四个工具:bash、bash_output、bash_kill 和 write_file。工具参考 记录了参数、结果和限制。
没有工作区工具,也没有工作区概念。项目是 HARNESS_ROOT 下的目录,ChatGPT 像其他人一样使用 ls 和 mkdir。
四个工具中有三个是因为一个约束而存在的。单个工具调用无法保持打开状态,以等待 npm ci 所需的几分钟,因此当命令超过 20 秒等待时,bash 返回一个句柄,bash_output 从游标读取,bash_kill 停止不会结束的命令。
命令不是交互式的。stdin 立即读取到文件末尾,因此 ChatGPT 必须传递诸如 npm ci 和 gh --yes 之类的标志。每个命令在自己的进程组中运行,因此停止一个命令会停止它启动的所有内容。
要求
一台带有 systemd、域名和 TLS 的 Linux 服务器
Node.js 24
一个 Auth0 租户
一个具有开发者模式可用的 ChatGPT 账户
本地运行
git clone https://github.com/salman-frs/gpt-harness.git
cd gpt-harness
npm ci
cp .env.example .env将 HARNESS_ROOT 指向一个可以丢弃的目录,从将 ChatGPT 连接到网关中填写 Auth0 值,然后启动它:
npm run dev
curl -fsS localhost:8787/healthz/healthz 不需要令牌。对 /mcp 的每个请求都需要为配置的所有者提供有效令牌,包括 initialize。
本地运行网关不会给你任何隔离。ProtectSystem=strict 和其他限制来自 systemd 单元,该单元仅适用于服务器。
证明它有效
npm run build && npm run provescripts/prove.mjs 仅从环境变量启动 dist/main.js 作为自己的进程。它提供一个真实的 HTTPS JWKS 端点,网关通过网络获取该端点,铸造一个真实的 RS256 令牌,并使用普通的 MCP 客户端驱动结果。它写入一个项目,从注册表安装依赖,运行测试,并检查杀死命令是否也杀死了该命令启动的进程。
脚本中没有导入 src/。
文档
将 ChatGPT 连接到网关 涵盖 Auth0、元数据端点和连接器。
在服务器上部署网关 涵盖 systemd 单元、反向代理、Git 凭据和更新。
工具参考 涵盖参数、结果、限制和错误代码。
关于安全模型 涵盖边界以及运行此项目所接受的内容。
许可证
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
An MCP server that gives your AI access to the source code and docs of all public github repos
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA self-hosted MCP server that gives ChatGPT a secure connection to your local machine, enabling it to read, edit, search, and run code in your projects.2,058MIT
- FlicenseNot gradedqualityBmaintenanceA self-hosted MCP server that gives ChatGPT controlled access to a user's Oracle Cloud Ubuntu VM through tools for shell commands, file operations, and personal skills.-
- FlicenseNot gradedqualityCmaintenanceAn unofficial self-hosted MCP server that enables ChatGPT to run commands on your computer through a secure tunnel, manage processes, and work within a specified project directory.1-
- AlicenseNot gradedqualityAmaintenanceAn MCP server that bridges ChatGPT Web Pro to local tools, enabling file read/write, shell command execution, git operations, and search within a specified project directory.21MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/salman-frs/gpt-harness'
If you have feedback or need assistance with the MCP directory API, please join our Discord server