
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 分