Pit Officer MCP server
Commit Nov 10, 2026Enforces pre-trade risk limits for AI trading agents by checking every order before it reaches a broker.
Also known as openpitkit/officer, officer
- Stars
- 3
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- 0.1.0
- Last commit
- Nov 10, 2026
- License
- Apache-2.0
What is Pit Officer MCP?
Pit Officer enforces pre-trade risk limits for AI trading agents by checking every order before it reaches a broker.
Summary generated from the project's README
About Pit Officer MCP server
Pit Officer acts as a risk management layer for automated trading. It functions by intercepting orders through the OpenPit risk engine to ensure they comply with established limits before they reach a broker. This system is designed for developers using trading software or AI agents who need to manage multiple trading accounts and enforce strict safety parameters on every transaction.
Users can deploy the server using Docker or run it as a single binary with specific subcommands like serve, mcp, or dashboard. It supports both HTTP MCP connections and local stdio MCP servers. The setup includes a web panel for managing accounts and setting risk limits, while the backend handles the actual connections to brokers. Developers can choose between a stable release or an edge development build for testing purposes.
What you can do with it
- 1Manage multiple trading accountsA developer can use the web interface to organize and oversee various brokerage accounts.
- 2Run a local MCP serverYou can integrate the server into your local development environment using the stdio protocol.
Written from the project's README. Every use case is checked against a quote from it.
Configuration
CGO_ENABLED
| Name | Description | |
|---|---|---|
| CGO_ENABLED | — |
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachableopenpitkit/officer is public and reachablegithub.com/openpitkit/officer ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-10github.com/openpitkit/officer ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubPit Officer
Website: officer.openpit.dev
Contact: info@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:
docker run -d --name pit-officer --restart unless-stopped -p 127.0.0.1:8787:8787 -v pit-officer-data:/data ghcr.io/openpitkit/officer:latest
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:
docker stop pit-officer
docker run -d --name pit-officer-edge --restart unless-stopped -p 127.0.0.1:8787:8787 -v pit-officer-data:/data ghcr.io/openpitkit/officer:edge
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:
npm --prefix web ci
npm --prefix web run build
CGO_ENABLED=1 go build -ldflags "-X go.openpit.dev/officer/framework/backend.buildCommit=$(git rev-parse HEAD)" -o pit-officer ./cmd/pit-officer
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:
./pit-officer serve # serve the dashboard, REST API, and HTTP MCP
./pit-officer dashboard # in another terminal, open the running instance
./pit-officer mcp # alternatively, run a local stdio MCP server
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:
. ./.github/ci-versions.env
docker build --build-arg GO_VERSION="$CI_GO" --build-arg OFFICER_COMMIT="$(git rev-parse HEAD)" -t pit-officer:local .
docker compose up
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.
just frontend-ci-install # npm ci in web/ from the committed lockfile
just build # build the SPA, then the pit-officer binary
just run-serve # build and serve
just dashboard # open the running instance in the browser
just run-mcp # build and run a local stdio MCP server
just docker-build # build the pit-officer:local container image
just check # format checks, linters, Semgrep, tests, frontend bundles
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.
Pit Officer MCP questions
How can I run Pit Officer as an MCP server?
You can run a local stdio MCP server using the mcp subcommand: ./pit-officer mcp.
How do I back up my trading data?
You can perform regular backups from the web panel by navigating to Service > Database > Database backup > Export.
Can I use Pit Officer with AI agents?
Yes, the platform is designed to be used by trading software or AI agents.