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.

VerifiedSTDIODesktop onlyFinanceSecurity & Monitoring

Overview

AI-generated 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.
Before you install
It connects to brokers and can send real orders, so misconfigured limits or an agent with access can move money. The panel and API are reachable on a local port; the README points to a configuration reference for the authorization model. Back up the database before upgrades, and treat the edge build as disposable.

Installation

In SourceWeft

  1. Open Pit Officer in the dashboard and add it to a workspace.
  2. 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

[CI] [Release] [License]

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:

sh
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:

sh
docker stop pit-officerdocker 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:

bash
npm --prefix web cinpm --prefix web run buildCGO_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:

bash
./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:

bash
. ./.github/ci-versions.envdocker 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.

bash
just frontend-ci-install  # npm ci in web/ from the committed lockfilejust build                # build the SPA, then the pit-officer binaryjust run-serve            # build and servejust dashboard            # open the running instance in the browserjust run-mcp              # build and run a local stdio MCP serverjust docker-build         # build the pit-officer:local container imagejust 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.

Source: README.md at commit 633b0b9

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  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