Lab build

Autonomous trading floor on MCP

Four autonomous trader agents research markets and manage simulated accounts through MCP servers on a schedule.

Role
Builder, end to end
Group
Agents and MCP
Services
AI & LLM systems

What it does

Four trader agents, each with its own researcher agent, run on the OpenAI Agents SDK and act through MCP servers: a home-grown FastMCP accounts server backed by SQLite, a push-notification server, Brave Search, Polygon market data and knowledge-graph memory. A scheduler starts all four traders together every 60 minutes with trade or rebalance instructions, and a user interface shows holdings, activity and traces.

What was built

  1. 01

    Custom accounts MCP server wraps SQLite-backed account logic and exposes tools plus account resources.

  2. 02

    Each trader calls a researcher agent that searches the web through the Brave Search MCP server.

  3. 03

    Market data comes from Polygon through the official MCP server or a lighter free-tier variant.

  4. 04

    Knowledge-graph memory MCP server stores entities and relations for the agents between runs.

  5. 05

    Scheduler launches all four traders every 60 minutes, alternating trading and rebalancing instructions.

The pipeline, layer by layer

Four layers, one pipeline.

  1. L1Schedule

    • 60-minute run loop
  2. L2Agents

    • Four trader agents
    • Researcher agents
  3. L3MCP servers

    • Accounts server
    • Brave Search
    • Polygon market data
    • Graph memory
    • Push server
  4. L4Interface

    • Trading floor UI

Stack

  • OpenAI Agents SDK
  • Model Context Protocol
  • FastMCP
  • SQLite
  • Brave Search API
  • Polygon.io
  • Pushover
  • Python

Next lab build · 31 / 46

Deep research agent

Plans web searches, runs them in parallel, writes a report and emails it from a Gradio app.

Previous: Real-time voice agent on LiveKit

Need a system like this in production? Tell us about it.