
Pit Officer
io.github.openpitkit由 GitHub 账号 openpitkit 发布v0.1.0更新于 Oct 30, 2026
Pre-trade risk limits for AI trading agents: every order is checked before it reaches your broker.
概览
Pit Officer 是一个本地交易前置风控网关,每笔订单在到达券商前都会按你设定的限额检查,AI 代理可通过 MCP 使用。
- 可以做什么
- 在网页面板中管理交易账户、风控限额和券商连接
- 订单经 OpenPit 风控引擎审核后才通过交易连接发出
- 以本地 stdio MCP 服务器运行,供交易软件或 AI 代理调用同一套检查
- 单个二进制同时提供面板、REST API 和 HTTP MCP,另有健康检查子命令
- 在面板中备份和恢复本地数据库
- 适用场景
- 当 AI 代理或交易工具需要向券商下单,但必须先受交易前风控限额约束,并希望这些限额在本地发送前强制执行时使用。
- 运行要求
- 在桌面本地运行。文档给出的方式是 Docker 容器,监听 127.0.0.1:8787 并挂载持久数据卷;从源码构建需要 C 工具链、Go、Node 和 npm。券商连接与账户在面板中配置。未声明任何环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 Pit Officer,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Pit Officer
Website: officer.openpit.dev
Pit Officer lets you manage trading accounts, set risk limits, connect to brokers, and send orders from a web panel. The OpenPit risk engine checks each order before Officer sends it through a trading connection. You can also use Officer from trading software or AI agents.
Run
Watch the video guide or follow the steps below. The quickstart covers stopping, ports and troubleshooting.
Install Docker, then run:
Open http://127.0.0.1:8787. latest is the newest release; your data stays
in the pit-officer-data volume. Back up before every upgrade, and regularly,
from Service > Database > Database backup > Export in the panel.
To upgrade an installed Officer, see Upgrade Officer.
edge is the current development build, for quick tests only. Its data is
disposable. Stop the release container first, then use the same volume:
On its first start, the panel asks whether to copy the release data or start empty. It never changes the release database. See Trying the development build.
Build
Prerequisites: a C toolchain, which the OpenPit Go binding requires through
cgo; Go; and Node and npm for the dashboard bundle. Tool versions are pinned in
.github/ci-versions.env; just ensure-node installs the pinned Node into
.tmp/node.
From the repository root, build the dashboard before the binary so Go embeds the compiled assets:
On Windows with PowerShell, set CGO_ENABLED=1 in your shell, build with
go build -ldflags "-X go.openpit.dev/officer/framework/backend.buildCommit=$(git rev-parse HEAD)" -o pit-officer.exe ./cmd/pit-officer, and run ./pit-officer.exe.
Run from source
A locally built binary behaves like edge: its first serve asks which
database to use, and it never changes the release database. Make that
choice before running mcp.
Pit Officer is a single binary with four subcommands: serve, mcp,
dashboard, healthcheck. After building it, run from the repository root:
The subcommands, environment variables, flags, and authorization model are in the configuration reference. See the API notes for REST and MCP integration.
Local container build
To build and run a local container image with the settings in
docker-compose.yml:
Optional Just shortcuts
Just provides a quicker alternative to the manual steps above. The recipes also require Python 3; the full check additionally uses golangci-lint and Semgrep, as described in the development notes.
Composing your own Officer from the importable packages, building against a local Pit checkout, and the debug variants are covered in the development notes.
License
Apache License 2.0. See LICENSE.
来源:README.md,提交 633b0b9
工具
0版本历史
1- v0.1.0最新Oct 29, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分