Skip to main content

MCP server for trading signal analysis, position monitoring, and market regime detection

Project description

oneqaz-trading-mcp

MCP server for trading signals, market regime detection, position monitoring, Fear & Greed index, and cross-market pattern analysis. Supports crypto, US stocks, and Korean stocks.

Keywords: MCP, trading, signals, market analysis, regime, portfolio, sentiment, technical analysis, crypto, stocks, Fear & Greed, cross-market, Claude, model context protocol

Features

  • 8 Resource categories: Global regime, market status, market structure, indicators (Fear & Greed), signals, external context (news/events), unified context, derived signals
  • 4 Tool types: Trade history, positions, signals, and trading decisions — all with filtering and sorting
  • Multi-market: Supports crypto, Korean stocks (KR), and US stocks
  • SQLite-based: No external database server required
  • Stateless HTTP: Compatible with any MCP client

Quick Start

Install

pip install oneqaz-trading-mcp

Initialize sample data

oneqaz-trading-mcp init

This creates sample SQLite databases with demo trading data so you can test immediately.

Start the server

oneqaz-trading-mcp serve

Server starts at http://localhost:8010 by default.

  • Swagger UI: http://localhost:8010/docs
  • MCP endpoint: http://localhost:8010/mcp

Connect from Claude

Add to your Claude MCP config:

{
  "mcpServers": {
    "oneqaz-trading": {
      "url": "http://localhost:8010/mcp"
    }
  }
}

Configuration

All configuration is via environment variables:

Variable Default Description
MCP_SERVER_PORT 8010 Server port
MCP_SERVER_HOST 0.0.0.0 Bind host
MCP_LOG_LEVEL INFO Log level
DATA_ROOT Auto-detect Root directory for all data
MCP_COIN_DATA_DIR {DATA_ROOT}/market/coin_market/data_storage Crypto data directory
MCP_KR_DATA_DIR {DATA_ROOT}/market/kr_market/data_storage KR stock data directory
MCP_US_DATA_DIR {DATA_ROOT}/market/us_market/data_storage US stock data directory
MCP_EXTERNAL_CONTEXT_DATA_DIR {DATA_ROOT}/external_context/data_storage External context directory
MCP_GLOBAL_REGIME_DATA_DIR {DATA_ROOT}/market/global_regime/data_storage Global regime directory

Resources

Resource URI Description
market://health Server health check
market://global/summary Global macro regime summary
market://global/category/{category} Per-category analysis (bonds, commodities, forex, vix, credit, liquidity, inflation)
market://global/categories Available categories list
market://structure/all All markets ETF/basket structure
market://{market_id}/structure Per-market structure analysis
market://{market_id}/status Market status (regime, positions, performance)
market://{market_id}/positions/snapshot Current positions snapshot
market://all/summary All markets combined summary
market://indicators/fear-greed Fear & Greed Index
market://indicators/context Combined market context
market://{market_id}/signals/summary Signal summary (24h aggregation)
market://{market_id}/signals/feedback Signal pattern feedback
market://{market_id}/signals/roles Role-based signal summary
market://{market_id}/external/summary External context (news, events, fundamentals)
market://{market_id}/external/symbol/{symbol} Per-symbol external context
market://{market_id}/unified/symbol/{symbol} Unified technical + external context
market://{market_id}/unified Market-level unified context
market://unified/cross-market Cross-market pattern analysis

Market IDs: crypto, kr_stock, us_stock (aliases: coin, kr, us)

Tools

Tool Parameters Description
get_trade_history market_id, limit, action_filter, min_pnl, max_pnl, hours_back Query trade history with filters
get_positions market_id, min_roi, max_roi, strategy, sort_by, sort_order, limit Query open positions
get_signals market_id, symbol, min_score, max_score, action_filter, interval Query trading signals
get_latest_decisions market_id, limit, decision_filter, hours_back Query recent trading decisions

Docker

docker build -t oneqaz-trading-mcp .
docker run -p 8010:8010 oneqaz-trading-mcp

Data Directory Structure

{DATA_ROOT}/
├── market/
│   ├── global_regime/data_storage/
│   │   ├── global_regime_summary.json
│   │   └── {bonds,commodities,forex,vix,...}_analysis.db
│   ├── coin_market/data_storage/
│   │   ├── trading_system.db
│   │   ├── signals/{symbol}_signal.db
│   │   └── regime/market_structure_summary.json
│   ├── kr_market/data_storage/  (same structure)
│   └── us_market/data_storage/  (same structure)
└── external_context/data_storage/
    ├── coin_market/external_context.db
    ├── kr_market/external_context.db
    └── us_market/external_context.db

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oneqaz_trading_mcp-0.1.0.tar.gz (58.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oneqaz_trading_mcp-0.1.0-py3-none-any.whl (70.1 kB view details)

Uploaded Python 3

File details

Details for the file oneqaz_trading_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: oneqaz_trading_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 58.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for oneqaz_trading_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d7a08554adb81be337662c77a8b58496e229376f9e67f2ba56d852fddd01fe62
MD5 c02364dfa7f4545f79e9b02d3cdb230e
BLAKE2b-256 6dc57a943298767797413a8e919a2044bd02719463d98534f5670d9e39eb7a52

See more details on using hashes here.

File details

Details for the file oneqaz_trading_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for oneqaz_trading_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 666696ebc10f55ecf435b8692afda6df959193edbd8337c9cce4f5f93979640b
MD5 9f184bcb35b53fd56489957bae008b88
BLAKE2b-256 24b941bb82288af67a59b3f4dc266076176f688ebb3d138115163dbc005e2e4c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page