SSyncDev

Pit Officer MCP Server

A self-hosted trading panel that runs every order through the OpenPit risk engine before it reaches a broker.

Local server

What is the Pit Officer MCP Server?

An agent that can place orders needs a hard stop somewhere outside the model. The Pit Officer MCP server puts that stop between the agent and the broker. It is a single binary with a web panel where you manage trading accounts, define risk limits and connect brokers; every order, whether typed into the panel or sent by an agent, is checked by the OpenPit risk engine before Officer forwards it through a trading connection.

Two ways an agent connects

Agents can reach it in two forms:

  • pit-officer serve runs the dashboard, a REST API and an HTTP MCP endpoint together.
  • pit-officer mcp runs a local stdio MCP server instead.

The binary also has dashboard, which opens a running instance, and healthcheck. Specific MCP tool names are not published, so we leave them out; what is clear is that agents act through the same risk checks as everything else.

Running it with Docker

The quickest route is the published container. With Docker installed, the release image runs on 127.0.0.1:8787 with a named volume called pit-officer-data holding your data, and the panel is then available in a browser on that port. Two tags exist:

Tag Use
latest The newest release, for real use
edge The development build, for quick tests only; its data is disposable

On first start, an edge container asks whether to copy the release data or begin empty, and it never modifies the release database. Back up before every upgrade from Service > Database > Database backup > Export in the panel.

Building from source

You need a C toolchain (the OpenPit Go binding uses cgo), Go, and Node with npm for the dashboard. Build the dashboard first so Go can embed it, then build with CGO_ENABLED=1. A locally built binary behaves like edge: its first serve asks which database to use, and you should make that choice before starting mcp. Optional Just recipes wrap the same steps.

What to keep in mind

This is infrastructure you host and operate yourself, and the limits only protect you as well as you configure them. Officer does not replace a broker account; it sits in front of one. Broker connectors and authorisation details are covered in its own configuration docs rather than here. If you want market data or a direct broker connector alongside it, look at the IBKR server or Zerodha, or browse all finance servers.

How to install the Pit Officer MCP Server

{
  "mcpServers": {
    "pit-officer": {
      "command": "/absolute/path/to/pit-officer",
      "args": [
        "mcp"
      ]
    }
  }
}

Build the pit-officer binary from source first, and choose its database with a first serve run before starting mcp.

Frequently asked questions

No. It forwards orders that you or a connected agent send, after the OpenPit risk engine checks each one against the limits you set for the account.