Skip to main content
Glama
fix-mcp

fix-mcp

by henryurlo

FIX-MCP

CI Tests Version License: MIT MCP Docker

AI agents can write FIX messages. They cannot recover a stuck session, validate a NewOrderSingle, or pause a TWAP that is behind schedule. FIX-MCP gives them the trading-ops brain to do all three through explicit MCP tools, approval gates, and auditable evidence.

FIX-MCP is an open-source professional demo for AI-assisted trading operations. It gives Claude, GPT, Gemini, and any MCP-capable agent a controlled tool surface for diagnosing and resolving realistic FIX, OMS, reference-data, venue, and algo incidents while a human operator stays responsible for approval and final control.

The demo runs against a simulated broker-dealer environment. The product thesis is broader: MCP is the right interface for letting LLMs work with real operational systems without giving them magic, unbounded access to the desk.

What It Includes

  • 22 MCP tools for session repair, order triage, reference-data updates, venue state, algo management, scenario scoring, and trace capture.

  • 14 real-world desk scenarios covering 02:05 ET pre-dawn startup through 16:32 ET after-hours dark-pool failures.

  • Human-led workflow: investigate, approve workbook, run approved recovery, then stress test only after the baseline path is understood.

  • Mission Control dashboard with case brief, workbook, operator rail, trace, FIX wire, terminal, manual runbook, and copilot panel.

  • Production-shaped stack: Python MCP server, REST API, Next.js console, PostgreSQL 16, Redis 7, Docker Compose, and async FIX TCP connector scaffolding.

Related MCP server: a2a-trustgate

AI Control Model

  • System prompt: src/fix_mcp/prompts/trading_ops.py is exposed to MCP clients as fix://prompts/trading-ops. The web console mirrors it in src/store/prompts.ts.

  • Model configuration: the Mission Control copilot currently calls openai/gpt-5.4 through OpenRouter, either through a server-side OPENROUTER_API_KEY or a user-provided key in the Copilot panel.

  • Agent framework: this repo does not use LangChain or LangGraph. The control boundary is MCP tools, MCP resources, MCP prompts, FastAPI, and the Next.js operator console.

  • Hallucination controls: scenario facts come from JSON fixtures and live engine state; actions go through typed MCP tools; production-like steps require human approval; every tool call is visible in Trace.

  • Demo boundary: the included environment is simulated. Do not connect a public demo to live FIX, OMS, reference-data, or monitoring systems.

See System Prompt, Model, and Guardrails for the demo-facing answer to model, prompt, LangChain/LangGraph, and grounding questions.

Who This Is For

You are...

FIX-MCP gives you...

Broker-dealer ops engineer

A working model for AI-assisted incident triage during market hours.

OMS / EMS vendor

A reference implementation for adding MCP to trading workflows.

AI builder

A domain-rich tool surface for agents that need to reason about trading operations.

VC / fintech evaluator

A concrete artifact showing where AI-in-trading infrastructure is heading.

The desk loads bats_startup_0200.

Incident: BATS Logon is rejected because the counterparty expects sequence 2450, while the session was reset to 1. Eight overnight GTC orders are blocked, two ETF symbols are missing from extended-hours reference data, and IEX is healthy as fallback.

The operator asks the copilot to investigate. The agent uses MCP tools:

list_scenarios       Scenario Loaded: bats_startup_0200
check_fix_sessions   BATS down; sequence mismatch detected
query_orders         ORDER QUERY — 14 order(s) found

The agent proposes a recovery workbook:

1. Check BATS session
2. Quantify blocked flow
3. Reconnect BATS
4. Reset BATS sequence if needed
5. Load missing ETF symbols
6. Validate orders released

The human approves the workbook. Agent Run executes only the approved path:

fix_session_issue    BATS reconnect released stuck orders
fix_session_issue    BATS reset_sequence accepted
load_ticker          BITO loaded
load_ticker          GBTC loaded
validate_orders      14 PASS, 0 FAIL

Then, and only then, the operator uses Stress Lab to inject a sequence-gap event and prove the system pauses, re-triages, recovers, resumes, and records the trace.

That is the operating pattern: baseline first, pressure test second, evidence always.

Quick Start

git clone https://github.com/henryurlo/fix-mcp.git
cd fix-mcp
docker compose up -d

Open http://localhost:3000.

Login with henry / henry, admin / admin, or click Demo Mode.

Service

URL

Purpose

Mission Control

http://localhost:3000

Trading-ops dashboard and guided demo workflow

REST API

http://localhost:8000

MCP tool dispatch, scenarios, system status

MCP stdio

docker compose run --rm mcp-server

Direct MCP protocol entry point

No Node or Python is required on your host for the Docker demo.

Python Development

python -m pip install -e ".[dev]"
python -m fix_mcp.api

In another terminal:

npm install
npm run dev

The Next.js console reads BACKEND_URL, defaulting to http://127.0.0.1:8000.

MCP Client Configuration

For a local MCP client that can launch the Python entry point:

{
  "mcpServers": {
    "fix-mcp": {
      "command": "fix-mcp"
    }
  }
}

For an HTTP-capable MCP client/proxy:

{
  "mcpServers": {
    "fix-mcp": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-remote@latest"],
      "env": {
        "MCP_URL": "http://localhost:8000/mcp"
      }
    }
  }
}

Demo vs Production

Component

Demo

Production / Consulting Engagement

FIX sessions

Simulated Python objects

Real FIX engine logs and session controls

OMS

In-memory order state

OMS database/API integration

Reference data

Preloaded JSON

Vendor feeds, DTCC data, internal symbology

Monitoring

Scenario engine preloads incidents

Datadog, Splunk, Grafana, or internal event streams

Execution

Updates simulated state

Sends approved FIX messages or calls approved OMS APIs

MCP tools

Same tool surface

Same interface, production adapters

Domain intelligence

Same prompts and logic

Tuned to client workflows, venues, and controls

The professional work is the integration layer: wire the same MCP interface and trading-ops knowledge into a firm's real logs, OMS, reference data, monitoring, and approval workflow.

Documentation

Contact

henryurlo@gmail.com

License

MIT. See LICENSE.

Available Tools

38 tools
advance_timeC

Advance the simulated market clock by N minutes. Auto-pauses on triggers.

Inputs: minutes (required).

approve_actionB

Submit a structured approval payload for an action. Enforces idempotency and risk-flagged audit trail.

Inputs: action (required), order_ids (required), approved_by (required), risk_flag, +2 more.

cancel_algoA

Cancel an active algo and send OrderCancelRequest for all open child slices.

Inputs: algo_id (required), reason.

cancel_replaceC

Cancel or replace an existing order via FIX 35=F or 35=G.

Inputs: order_id (required), action (required), new_venue, new_quantity, +2 more.

check_algo_statusB

Check status of algo orders: schedule deviation, execution quality, IS shortfall, over-participation, and child order health.

Inputs: algo_id, symbol, status.

check_fix_sessionsA

Check FIX session health: status, sequence numbers, heartbeat age, latency.

Inputs: venue.

check_market_data_stalenessA

Report per-symbol market-data staleness in ms. Flags symbols whose last quote exceeds a 500ms advisory threshold. Pass 'symbol' to filter.

Inputs: symbol.

check_pending_acksA

List all orders in pending_ack status with pending age, venue ACK delay, and a duplicate-risk flag (true when pending age > 30 s). Pass 'venue' to filter to a single venue.

Inputs: venue.

check_tickerA

Look up a symbol or CUSIP. Returns full record, pending corporate actions, and affected open order count.

Inputs: symbol, cusip.

clear_market_data_delayA

Clear any simulated feed delay for a venue and report what delay was removed. Returns NOOP when no delay was set.

Inputs: venue (required).

diff_snapshotB

Compare a saved snapshot against current state. Returns structured diff.

Inputs: snapshot_id (required).

dump_session_stateB

Return full session diagnostics for a venue including sequence numbers, latency, heartbeat age, and associated orders.

Inputs: venue (required).

fix_session_issueC

Resolve a FIX session issue: resend_request (gap recovery), reset_sequence, or reconnect.

Inputs: venue (required), action (required).

get_manual_runbookA

Get the manual commands equivalent to MCP tools. Filter by tool name.

Inputs: tool.

get_traceC

Get the tool execution trace log with optional filters.

Inputs: limit, tool, status, source.

get_trace_statsA

Get summary statistics for the current trace.

Inputs: no named parameters.

grep_logsA

Search log files for a pattern and return matching lines.

Inputs: pattern (required), file (required).

inject_eventB

Inject a simulated market event into the current scenario for training. Supported: venue_outage, luld, reject_spike, client_message, seq_gap, sla_breach.

Inputs: event_type (required), target, delay_sec, details.

list_scenariosB

List all available trading scenarios or load one into the runtime. Use action='list' to see all scenarios with their context summaries. Use action='load' with scenario_name to switch the active scenario.

Inputs: action, scenario_name.

list_snapshotsA

List all saved state snapshots for the current scenario.

Inputs: no named parameters.

load_tickerC

Load a new symbol into the reference store and release orders pending that symbol.

Inputs: symbol (required), cusip (required), name (required), listing_exchange (required), +2 more.

modify_algoA

Modify an active algo: pause, resume, or update POV participation rate.

Inputs: algo_id (required), action (required), new_pov_rate.

query_ordersA

Query OMS orders with optional filters. Returns order details including notional value and SLA countdowns for institutional orders.

Inputs: client_name, symbol, status, venue, +1 more.

release_stuck_ordersA

Release stuck orders, re-checking blockers. Optional reason_filter limits scope (e.g., 'stale_md', 'venue_down').

Inputs: reason_filter.

reset_sequenceB

Reset FIX sequence numbers for a venue session.

Inputs: venue (required).

resume_simulationB

Resume a paused simulation after reviewing the trigger.

Inputs: notes.

rollback_to_snapshotC

Restore OMS state from a previously saved snapshot.

Inputs: snapshot_id (required).

run_premarket_checkB

Flagship pre-market health check: sessions, corp actions, stuck orders, SLA deadlines, validation summary.

Inputs: no named parameters.

save_snapshotA

Save a deep-copy snapshot of the current OMS + session state. Use before irreversible actions.

Inputs: label (required).

score_scenarioA

Compute and return the full KPI score report for the current scenario.

Inputs: no named parameters.

send_algo_orderA

Submit a new algorithmic order (TWAP, VWAP, POV, IS, DARK_AGG, ICEBERG). Creates a parent algo order with execution schedule and initial child slices.

Inputs: symbol (required), side (required), quantity (required), algo_type (required), +6 more.

send_orderB

Send a new order via FIX NewOrderSingle. Validates symbol, checks corp actions, auto-routes if no venue supplied.

Inputs: symbol (required), side (required), quantity (required), order_type (required), +3 more.

session_heartbeatC

Send a heartbeat and return the heartbeat status for a specific venue session.

Inputs: venue (required).

tail_logsB

Return the last N lines of a log file.

Inputs: file (required), lines.

time_statusA

Return current simulated time, pause state, and trigger history.

Inputs: no named parameters.

update_tickerA

Rename a symbol and bulk-update all open orders. Flags stop orders for manual review.

Inputs: old_symbol (required), new_symbol (required), reason (required).

update_venue_statusA

Change venue status (active/degraded/down). Use fix_session_issue to recover a degraded/down venue.

Inputs: venue (required), status (required).

validate_ordersC

Validate a set of orders: check symbol validity, venue status, duplicate ClOrdIDs, and client status.

Inputs: order_ids, symbol, status.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 38 tools

    Disambiguation5/5

    Each tool targets a distinct action or resource, from order management to session health and scenario controls. No two tools have overlapping purposes; even similar actions like cancel_algo and cancel_replace are clearly different (algo vs. single order).

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case, e.g., advance_time, approve_action, check_algo_status, diff_snapshot, fix_session_issue. The naming is predictable and easy to understand.

    Tool Count2/5

    38 tools is significantly above the typical 3-15 range for a well-scoped MCP server. While the domain of trading simulation is complex, the count feels excessive and may overwhelm an agent, reducing coherence.

    Completeness4/5

    The tool surface covers the core workflows: order lifecycle (send, cancel, replace, modify), algo orders, session management, scenario simulation, logging, and validation. Minor gaps exist (e.g., no direct market data subscription tool), but most essential operations are present.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      A production-grade MCP server for FIX protocol trading operations that enables order management, session repair, and algorithmic execution. It provides specialized tools for monitoring session health, managing ticker reference data, and executing complex trading scenarios.
      22
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server for AI agent compliance that screens actions before execution and records decisions in an immutable, SIEM-ready audit trail.
      88 npm
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server for CPZAI platform, enabling AI agents to manage trading strategies, run backtests, route orders across brokers, and access portfolios, risk analytics, and market data through natural language.
      1
      MIT