trading-platform-mcp-server
Provides tools for interacting with Binance exchange, including market data streaming, order execution (paper and live), account management, risk validation, strategy evaluation, and audit logging.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Trading Platform v2 — Binance Intelligence & Execution
Binance-only trading intelligence and execution platform with Claude connected through MCP. Production-grade Python monorepo.
Architecture
Claude (reasoning layer)
│ MCP bounded tool interface
▼
mcp-server ─────────────────────────────────────────────────
│
gateway-api (REST + WebSocket, web/mobile clients) │
│ │
▼ ▼
strategy-service ──► execution (paper / live orders)
│ │
│ private user stream
▼ │
analytics ◄────────────────┘
│
▼
normalizer
│
▼
binance-ingest (WebSocket streams + REST polling)
│
▼
Redis Streams + Redis hot state
│
▼
Postgres (persistent history + all business records)Related MCP server: Binance MCP Server
Services
Service | Port | Purpose |
gateway-api | 8000 | REST + WebSocket API |
binance-ingest | 8001 | Raw stream ingest |
normalizer | 8002 | Payload normalization + hot state |
analytics | 8003 | Derived metrics + decision snapshots |
strategy-service | 8004 | Strategy CRUD, eval, intents |
execution | 8005 | Risk validation + order routing |
mcp-server | 8006 | Claude MCP tool interface |
Phase Status
Phase | Description | Status |
1 | Shared foundation (schemas, Redis, DB, utils, infra) | ✅ Complete |
2 | Binance ingest (all stream types + private user stream) | 🔲 Next |
3 | Normalizer (all event types + hot state) | 🔲 |
4 | Analytics (10 engines + decision snapshot builder) | 🔲 |
5 | Strategy service (CRUD, versioning, eval, simulation) | 🔲 |
6 | Execution — paper mode (validation + risk engine) | 🔲 |
7 | Execution — live (Binance orders + fill reconciliation) | 🔲 |
8 | MCP server (25 bounded tools + OAuth + audit) | 🔲 |
9 | Gateway API (all REST + WebSocket routes) | 🔲 |
10 | Hardening (tests, observability, incident workflows) | 🔲 |
Quick Start (local dev)
Prerequisites
Python 3.12
Docker + Docker Compose
1. Install shared package
cd C:\Users\ahsan\trading-platform-v2
pip install -e .2. Copy and configure env
Copy-Item .env.example .env
# Edit .env with your Binance keys and secrets3. Start infrastructure
docker compose -f infra/docker-compose.yml up postgres redis -d4. Run migrations
$env:PYTHONPATH = "C:\Users\ahsan\trading-platform-v2"
alembic -c migrations/alembic.ini upgrade head5. Start a service (example: gateway-api)
$env:PYTHONPATH = "C:\Users\ahsan\trading-platform-v2"
python -m uvicorn services.gateway_api.main:app --host 0.0.0.0 --port 8000 --reload6. Run tests
$env:PYTHONPATH = "C:\Users\ahsan\trading-platform-v2"
python -m pytest tests/unit/ -vKey Design Principles
Claude is the controller — never the direct execution layer
Strategy ≠ Execution — TradeIntent objects cross the boundary, never raw orders
Execution is the only Binance caller — no other service may place orders
Private user streams are truth — fills, balances, positions come from there
Raw ≠ Derived — never mixed in the same API field
MCP is bounded — approval levels and symbol policies enforced on every tool call
Paper = Live pipeline — same validation, different execution path
Everything is auditable — audit_log, mcp_tool_calls, execution_events for every action
Idempotent jobs — job_id + deterministic client_order_id prevent duplicate execution
Redis Key Domains
All keys are built via shared.redis.keys.RedisKeys — never inline strings.
market:{type}:{symbol}:*— hot market stateanalytics:{type}:{symbol}:*— derived analyticsaccount:{user_id}:*— account staterisk:{user_id}:*— risk state and limitsstrategy:{id}:*— active strategy stateapproval:{user_id}:level— current approval levelkill_switch:{account_id}— global kill switch flagpause:user:{account_id}— per-user trading pausepause:symbol:{account_id}:{symbol}— per-symbol pausecooldown:{account_id}:{symbol}— post-loss cooldownjob:lock:{job_id}— execution job idempotency lock
Redis Streams
stream:binance:raw— raw Binance payloadsstream:binance:normalized— canonical NormalizedEvent recordsstream:analytics:derived— analytics engine outputsstream:strategy:intents— TradeIntent objectsstream:execution:events— execution lifecycle eventsstream:mcp:audit— MCP tool call audit trail
Database
28 tables across 5 domains:
Market: symbols, candles, trade_history, funding_history, oi_history, liquidation_events, wall_events, market_snapshots
Account: users, exchange_accounts, api_credentials_ref, balances, positions, orders, fills
Execution: execution_jobs, execution_events, risk_policies, approval_levels
Strategy: strategies, strategy_versions, strategy_runs, strategy_evaluations, strategy_actions, strategy_rollbacks
Audit: mcp_sessions, mcp_tool_calls, audit_log, incident_log, account_update_reasons
Approval Levels
Level | Value | Can Do |
L0 | l0_readonly | Read data only |
L1 | l1_simulation | Run simulations |
L2 | l2_paper | Paper trading |
L3 | l3_assisted_live | Live with confirmation |
L4 | l4_bounded_auto | Bounded auto-execution |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Create and manage trading strategies, bots, webhooks and signals from any MCP client.
Warden MCP lets AI agents find tokens, quote swaps and trade onchain on Base, BNB Chain, Robinhood Chain, Arc and Solana, within limits you set. Market tools need no credential: list_chains, search_tokens, trending_tokens, price_history, quote_swap and swap_status. Search by name, ticker or contract address, read USD price candles, and price a swap before committing to it, including cross-chain swaps. Wallet tools act for the wallet whose owner connected the agent, by OAuth sign-in or a wk_ key. agent_permissions shows what the agent may do and its daily limits. prepare_swap builds a trade and hands the owner a review link to sign. With request_session the owner turns on hands-free trading in one tap, and execute_swap then trades within the limits they set. swap_status tracks gasless and cross-chain trades. get_wallet shows holdings on every chain. Gasless trading is available on Base, BNB Chain and Robinhood Chain. Built by Warden Protocol, the team behind Warden Token Terminal.
AI Visibility and Content Intelligence tools for Claude and MCP-compatible agents.
Trade Papertrade BTC and ETH perps from Claude, ChatGPT, Codex, Cursor and any MCP client.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides comprehensive Binance trading capabilities through Claude Desktop, including account management, spot and futures trading, market data, and advanced analysis tools.35366 npm10MIT
- AlicenseAqualityCmaintenanceEnables Claude to query Binance Spot market data, account balances, and execute trades via natural language, with withdrawals disabled by default for security.11MIT
- AlicenseNot gradedqualityBmaintenanceEnables risk-gated AI trading on Binance by researching market data, enforcing policy checks, and building executable MCP order requests that require user confirmation before the official Binance MCP server executes them.MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to trade on Binance through a governed MCP proxy that enforces configurable policies, requires a recorded rationale before orders, detects prompt injection, logs all actions in a tamper-evident audit trail, and blocks execution until a human approves.-