PitBridge MCP server
✓ 인증됨로컬 데몬과 결정론적 리스크 가드레일을 통해 AI agent를 NinjaTrader 8 선물 계좌에 연결합니다.
다른 이름 ToolstackVault/pitbridge
- 스타
- 1
- Tools
- —
- 다운로드, 30일
- 240
- 최신 버전
- 0.2.2
- 마지막 커밋
- 2026년 7월 16일
- 라이선스
- Apache-2.0
PitBridge MCP란?
PitBridge은(는) MCP server입니다. 로컬 데몬과 결정론적 리스크 가드레일을 통해 AI agent를 NinjaTrader 8 선물 계좌에 연결합니다.
프로젝트 README에서 생성된 요약
PitBridge MCP server 정보
PitBridge는 AI agent를 NinjaTrader 8 선물 계좌에 연결하기 위한 로컬 우선 인프라를 제공합니다. 이 시스템은 macOS, Linux 또는 Windows를 지원하며 사용자의 로컬 머신에서 실행되는 데몬으로 작동합니다. Python 기반 데몬을 사용하여 Claude Desktop 또는 Claude Code와 같은 AI 클라이언트와 MCP를 통해 stdio 또는 streamable HTTP로 통신합니다. 또한 통합을 위한 REST API와 WebSocket 이벤트 피드도 제공합니다.
안전성은 agent와 브로커 사이에 위치한 결정론적 가드레일 엔진을 통해 관리됩니다. 이 엔진은 일일 손실 중단, 포지션 제한, 거래 시간 설정 등의 규칙을 강제합니다. 이러한 가드레일은 LLM 프롬프트의 일부가 아니라 하드코딩되어 있으므로, agent가 이를 우회하거나 리스크 제한을 수정할 수 없습니다. 실제 주문 라우팅은 C# NinjaTrader 8 AddOn이 공식 Account API를 통해 처리합니다. 전체 주문 경로는 사용자의 하드웨어 내 로컬에서 유지되므로 API 키와 포지션 정보가 외부 서버로 전송되지 않습니다.
활용 사례
- 1엄격한 리스크 관리 강제AI agent가 거래를 시도하더라도, 시스템이 사전에 정의된 계약 수량 제한이나 일일 손실 임계값을 초과하는 모든 주문을 자동으로 차단합니다.
- 2agent 거래 결정 감사개발자는 변조 방지 로그를 검토하여 특정 주문이 시스템에 의해 왜 허용되었는지 또는 거부되었는지 정확히 파악할 수 있습니다.
- 3안전한 거래 로직 테스트Windows 머신이나 실시간 시장 데이터 없이도, Mac에서 가짜 AddOn 시뮬레이터를 사용하여 데몬을 실행하고 다양한 주문 시나리오에 대한 가드레일의 반응을 관찰할 수 있습니다.
- 4수동 킬 스위치 구현사람 운영자가 CLI를 통해 모든 거래 활동을 즉시 중단하여 AI가 추가 주문을 실행하는 것을 방지할 수 있습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
PitBridge MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 PitBridge MCP 설치
$ claude mcp add pitbridge -- uvx pitbridgeCursor에 PitBridge MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"pitbridge": {
"command": "uvx",
"args": [
"pitbridge"
]
}
}
}VS Code에 PitBridge MCP 설치
.vscode/mcp.json
{
"servers": {
"pitbridge": {
"type": "stdio",
"command": "uvx",
"args": [
"pitbridge"
]
}
}
}VS Code CLI에 PitBridge MCP 설치
$ code --add-mcp '{"name":"pitbridge","type":"stdio","command":"uvx","args":["pitbridge"]}'Claude Desktop에 PitBridge MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"pitbridge": {
"command": "uvx",
"args": [
"pitbridge"
]
}
}
}Codex에 PitBridge MCP 설치
$ codex mcp add pitbridge -- uvx pitbridgeCodex config.toml에 PitBridge MCP 설치
~/.codex/config.toml
[mcp_servers.pitbridge] command = "uvx" args = ["pitbridge"]
Gemini CLI에 PitBridge MCP 설치
$ gemini mcp add -s user pitbridge uvx -- pitbridgeGemini settings.json에 PitBridge MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"pitbridge": {
"command": "uvx",
"args": [
"pitbridge"
]
}
}
}자동 검사
2026년 11월 15일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능toolstackvault/pitbridge is public and reachablegithub.com/toolstackvault/pitbridge ↗통과
- 패키지가 이 저장소를 소스로 명시pitbridge names toolstackvault/pitbridge as sourcepypi.org/project/pitbridge/ ↗통과
- 빌드 출처(Sigstore 증명)No build attestation published for this release검사되지 않음
- 오픈 소스 라이선스 (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-07-16github.com/toolstackvault/pitbridge ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from pitbridge통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음42 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기PitBridge
A local-first MCP bridge for NinjaTrader 8, with hard risk limits your AI cannot bypass.
PitBridge connects an AI agent (Claude Code, Claude Desktop, or your own script) to a NinjaTrader 8 futures account through a daemon that runs on your own machine. Every order the agent asks for passes through a deterministic guardrail engine first. The guardrails are default-on, they live in code rather than in prompts, and the agent has no tool to weaken them, unlock live trading, or release the kill switch.
We build rails, not alpha. PitBridge does not tell you what to trade.
What it is
- A local-first daemon (Python 3.12) that speaks MCP (stdio and streamable HTTP), a REST API, and a WebSocket event feed. It runs on macOS, Linux, or Windows.
- A deterministic guardrail engine: pure, synchronous checks (daily-loss halt, position caps, trading windows, rate limits, a kill switch, and more) that every order must pass before it can reach the broker.
- A thin NinjaTrader 8 AddOn (C#) that connects out to the daemon and places
orders through the official
NinjaTrader.CbiAccount API. The AddOn is deliberately dumb: all safety lives in the daemon. - An append-only, hash-chained audit log that records every request, decision, and outcome, and can tell you exactly why any order was allowed or blocked.
What it is NOT
Read this section before anything else.
- Not a broker or an exchange. PitBridge routes orders you (or your agent) create to your existing NinjaTrader account. It holds no funds and executes nothing itself.
- Not signals, strategies, or alpha. PitBridge ships no trading logic. It will not tell you what, when, or how much to trade. That is your job, or your agent's.
- Not financial or investment advice. It is trading infrastructure.
- Not a guarantee of prop-firm compliance. You configure the limits that match your firm's rules. PitBridge helps you encode and enforce them locally, but you remain responsible for staying within your firm's terms. We make no compliance guarantee.
- Not a cloud order relay. Orders, keys, and positions never touch our servers. There is no PitBridge account in the order path.
- Not autonomous. Enabling live execution is an operator-only ritual at the command line. The agent cannot arm live trading, and it cannot lift a kill.
Architecture
The entire order path is local. PitBridge's own cloud (the marketing site, the docs, software updates) is never in it.
AI agent (Claude Code / Claude Desktop / your own script)
│
│ MCP (stdio or HTTP) REST /v1/* WS events
▼
PitBridge daemon ← runs on YOUR machine
│
│ frozen pipeline (no code path skips it):
│ schema → permission → GUARDRAILS → confirm → submit → audit
▼
Guardrail engine (deterministic, default-on, not reconfigurable by the agent)
│
│ WebSocket on :8873 (the AddOn dials OUT; the NT8 box never listens)
▼
NT8 AddOn (C#, .NET 4.8, next to NinjaTrader 8 on Windows)
│
│ NinjaTrader.Cbi Account API (close / flatten are strictly reduce-only)
▼
NinjaTrader 8 → your broker / prop account (CQG, Rithmic, ...)
PitBridge's own cloud is NOT on this path.
Orders, keys, and positions never leave your machine(s).
Two run modes:
- Localhost (default): the daemon and NinjaTrader run on the same Windows
machine, bound to
127.0.0.1. - Paired: the daemon runs on, for example, your Mac, and the NinjaTrader AddOn connects out to it over your own private network (Tailscale / LAN). This is the "runs on your Mac, your Windows box, or both" setup. Non-localhost binds are refused unless paired mode is explicitly enabled and a pairing token is configured.
Safety model in short
- Deterministic guardrails. The engine is a set of pure functions with no
I/O and no LLM in the loop:
check(request, state, now)returns Allow, Block (with a typed reason code), or RequireConfirm. Given the same inputs it always returns the same decision, and that decision is testable. - A frozen pipeline. Every order takes exactly one path: schema validation, then permission (read-only / paper / live), then the guardrail chain, then an optional human-confirm gate, then submit, then an audit append. There is no route from the agent surface to the broker that skips it. A structural test in CI fails the build if any code tries.
- The agent cannot reconfigure safety. Limits live in an on-disk config that is checksum-verified. No MCP tool can edit config, raise a limit, un-kill, or arm live trading. Those controls exist only at the operator's command line.
- Local-first. The daemon runs on your machine(s). Orders, keys, and positions never reach a PitBridge server.
- Kill switch. A file, the CLI, or a REST call can engage it instantly. Only the CLI (a human at the keyboard) can release it. De-risking (cancel, close, flatten) is deliberately still allowed under a kill, so you can always get flat.
- Tamper-evident audit log. Append-only, hash-chained JSONL with an
out-of-file anchor.
pitbridge audit why <id>explains any order;pitbridge audit verifyproves the chain is intact and catches edits, truncation, or a wiped tail.
The guardrails
Twelve v0 guardrails, each its own module, all table-tested. The chain runs in a frozen order: the kill switch is checked first, the human-confirm gate last.
- Kill switch: file, CLI, or REST engages it; release is CLI-only, never an agent tool.
- Daily-loss halt: per-account day ledger with New-York rollover; can latch sticky for the rest of the day once breached.
- Profit lock: stop trading for the day after a configured profit.
- Max contracts per order: reject any single order above the cap.
- Max position per instrument and account: cap net exposure, and refuse an over-cap position flipping to an equally over-cap opposite side.
- Instrument allowlist: only configured contracts may be traded.
- Trading windows and holiday calendar: per-account timezone, holiday and early-close aware.
- Cooldown: a minimum spacing after a loss and/or after an order.
- Order rate limits: caps per minute, per hour, and per day.
- Duplicate-order protection: same account, instrument, side, and quantity within N seconds is rejected.
- Link-down block: if the heartbeat to the AddOn goes stale, new orders hard-reject rather than queue against a dead link.
- Human-confirm gate: parks an order as PENDING_CONFIRM, pings a notifier,
and waits for
pitbridge confirm <id>(or a REST approval); auto-rejects after 60 seconds.
Open-core boundary
PitBridge is open-core. The safety kernel is open so it can be read and trusted. Live execution and the operational suite for running many accounts are the paid tier.
| Open source (free) | Pro (paid) |
|---|---|
| The daemon and the full guardrail engine | Live-execution unlock (the private LiveExecutionProvider plugin) |
| The MCP, REST, and WebSocket agent surface | The advanced guardrail suite and prop-firm rule packs |
| Read-only tools and paper trading (against the fake AddOn / simulation) | Multi-account fan-out (one tool call, N accounts) |
| The CLI and the hash-chained audit log | The human-confirm UI and audit export |
This is licensing-gating, not DRM. The core is fully functional for read-only
and paper use on its own. Live trading requires the Pro plugin plus a deliberate,
operator-only arm-live step.
Quickstart
You can run the complete daemon on a Mac today, with no NinjaTrader install, no Windows box, and no market data. A fake AddOn simulator stands in for the real C# AddOn, so you can watch the guardrails pass good orders, block bad ones with a typed reason, stop everything with the kill switch, and explain every decision from the audit log.
cd daemon
uv sync --extra dev
uv run pitbridge run --config ./config.toml # terminal A
uv run python ../tools/fake_addon.py \ # terminal B
--host 127.0.0.1 --port 8873 --token pb_pair_demo --account Sim101
Then place a paper order over REST or wire up Claude as the MCP client and ask it in plain language. The full walkthrough, a ready-to-paste config, the Claude Desktop / Claude Code MCP setup block, five test scenarios, and a "try to break it" section are in docs/testing-on-mac.md.
Everything in the quickstart is paper / simulation. See that guide's "What this does and does not prove" for the honest boundary.
Status and roadmap
PitBridge is early and pre-launch. We are honest about what exists versus what is planned.
Built and tested today (paper / simulation only):
- the daemon core, the full guardrail engine (all twelve guardrails), the day ledger, and the hash-chained audit log;
- the MCP server (nine tools), the REST API, the WebSocket event feed, and the CLI;
- a scripted fake AddOn for end-to-end and chaos testing;
- a table-driven test suite (300+ tests) that runs on macOS, Linux, and Windows in CI, including prompt-injection and no-bypass tests.
In progress:
- the real C# NinjaTrader 8 AddOn (order routing on a Sim101 account), with close and flatten implemented as strictly reduce-only.
Planned:
- shadow-mode validation, running PitBridge in parallel with our own live prop-trading operation to prove order-intent parity before it ever routes a live order;
- a supervised, operator-gated live migration;
- the open-core public launch, the website, and full docs;
- additional platforms (Tradovate, ProjectX / TopstepX) via thin adapters.
No live account has been traded through PitBridge yet. Live routing sits behind an operator-only ritual and is not part of the current build.
Documentation
- docs/architecture.md: the binding architecture and safety spec.
- docs/testing-on-mac.md: run and test the daemon on a Mac against the fake AddOn.
- SECURITY.md: how to report a vulnerability.
- CONTRIBUTING.md: how to contribute, and the rules for safety-critical changes.
Disclaimers
Trademarks. NinjaTrader is a registered trademark of NinjaTrader Group, LLC. CQG, Rithmic, and any prop-firm names are trademarks of their respective owners. PitBridge is an independent project and is not affiliated with, endorsed by, or sponsored by NinjaTrader Group, LLC, any data or clearing provider, or any prop firm. Platform names are used nominatively, only to describe compatibility.
Not financial advice. PitBridge is trading infrastructure, not financial, investment, or trading advice. It provides no signals, strategies, or recommendations.
Risk. Trading futures involves substantial risk of loss and is not suitable for every investor. You are solely responsible for your own trading decisions and for staying within the terms of any broker or prop firm you use.
CFTC Rule 4.41 (hypothetical and simulated performance). Any results, examples, or simulated data shown for PitBridge are hypothetical or simulation-based. Simulated performance has inherent limitations: unlike a live record, simulated results do not represent actual trading, and because the trades were not actually executed, they may under- or over-compensate for factors such as lack of liquidity. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown.
PitBridge MCP 질문
PitBridge MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add pitbridge -- uvx pitbridge를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
PitBridge MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
AI agent가 리스크 제한을 우회할 수 있나요?
아니요, 가드레일은 프롬프트가 아닌 코드에 구현된 결정론적 방식이며, agent는 이를 약화하거나 실거래를 활성화할 수 있는 도구를 가지고 있지 않습니다.