
Pit Officer
io.github.openpitkitPublished by GitHub account openpitkitv0.1.0Updated Oct 30, 2026
Pre-trade risk limits for AI trading agents: every order is checked before it reaches your broker.
Overview
Pit Officer is a local pre-trade risk gateway that checks every order against your limits before it reaches your broker, usable from AI agents via MCP.
- What you can do
- Manage trading accounts, risk limits and broker connections from a web panel
- Send orders through a trading connection only after the OpenPit risk engine approves them
- Run as a local stdio MCP server so trading software or AI agents can use the same checks
- Serve a dashboard, REST API and HTTP MCP from one binary, with a healthcheck subcommand
- Back up and restore the local database from the panel
- When to use it
- Use it when an AI agent or trading tool should place broker orders but must be constrained by pre-trade risk limits, and you want those limits enforced locally before anything is sent.
- Requirements
- Runs locally on a desktop. The documented path is a Docker container published on 127.0.0.1:8787 with a persistent data volume; building from source needs a C toolchain, Go, Node and npm. Broker connections and accounts are configured in the panel. No environment variables or headers are declared.
Installation
In SourceWeft
- Open Pit Officer in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: README.md at commit 633b0b9
Tools
0Version history
1- v0.1.0LatestOct 29, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts