Skip to main content
Glama
openpitkit

Pit Officer

Official
by openpitkit

Pit Officer

CI Release Go version Module License

Pit Officer is a control plane for the embeddable OpenPit pre-trade risk engine. It runs one engine in a local process over a local SQLite database and exposes it to operators through a web dashboard, to programs through a REST API, and to AI agents through an MCP server. The engine alone evaluates orders.

Capabilities

  • One local engine over one local store - a single node built from SQLite at startup.

  • A reusable framework: the importable Go packages - go.openpit.dev/officer with its web, httpapi, mcptools, engine, signing, and framework/... packages - and web/src/framework/ in React. This application is one composition of them; a program can build its own.

  • A REST API over the control plane - see the API notes.

  • An MCP server over stdio or streamable HTTP, with mutating tools off until an operator enables them by name.

  • An operator dashboard, an embedded single-page app driven by the same API.

  • Signed order approvals - an Ed25519 approval envelope for every order that passes pre-trade.

  • An append-only audit trail of every control-plane action.

  • Market data through pluggable connectors, configured and toggled at runtime.

  • Optional at-rest encryption of stored secrets under an operator-supplied master key.

Related MCP server: AgentGuard MCP Server

Run

Pit Officer is a single binary with four subcommands: serve, mcp, dashboard, healthcheck. With Just:

just run-serve   # build the SPA and the binary, then serve
just dashboard   # print the running instance's URLs and open the browser
just run-mcp     # local stdio MCP server

In a container, build the image with just docker-build and start it with docker compose up; docker-compose.yml pins the port, the database volume, and a read-only root filesystem.

The subcommands, the environment variables and flags, and the authorization model are in the configuration reference.

Build

Prerequisites: a C toolchain with cgo enabled, which the OpenPit Go binding requires; Go; Node and npm, for the dashboard bundle; Python 3, which the recipes use to drive Go, the linters, and Semgrep; golangci-lint; and Just. Tool versions are pinned in .github/ci-versions.env.

just frontend-ci-install  # npm ci in web/ from the committed lockfile
just build                # build the SPA, then the pit-officer binary
just check                # format checks, linters, Semgrep, tests, frontend bundles

Composing your own Officer from the importable packages, building against a local Pit checkout, building without Just, and the debug variants are covered in the development notes.

License

Apache License 2.0. See LICENSE.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to securely call MCP tools with risk scoring, checkpoints, rollback, and approval workflows.
    1 npm
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Provides a secure MCP boundary for AI agents, intercepting and validating tool calls, redacting secrets, and requiring human approval for sensitive actions with a tamper-evident audit trail.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    MCP server that provides a security gateway for AI agents, enforcing allow/confirm/deny policies on tool calls and requiring human approval for risky operations, with full audit logging.
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP-compatible AI agents to safely act on business backends by enforcing per-agent permissions, autonomy thresholds, human approval with review-and-edit, and full audit trails.
    MIT