Back to Browse

Oneqaz Trading MCP Server

FinanceUse Caution4.5MCP RegistryLocalRemote
Free

Server data from the Official MCP Registry

Trading MCP with regime detection + self-verifying Trust Layer. Crypto, US, KR stocks. 24/7 live.

About

Trading MCP with regime detection + self-verifying Trust Layer. Crypto, US, KR stocks. 24/7 live.

Security Report

4.5
Use Caution4.5High Risk

Valid MCP server (1 strong, 1 medium validity signals). 4 known CVEs in dependencies (1 critical, 2 high severity) ⚠️ Package registry links to a different repository than scanned source. Imported from the Official MCP Registry.

3 files analyzed · 5 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

database

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Root directory for market data filesOptional

Environment variable: DATA_ROOT

Server port (default: 8010)Optional

Environment variable: MCP_SERVER_PORT

How to Install & Connect

Available as Local & Remote

This plugin can run on your machine or connect to a hosted endpoint. during install.

Documentation

View on GitHub

From the project's GitHub README.

oneqaz-trading-mcp

GitHub stars PyPI License: MIT

The specialist API for financial AI — with conversation-aware response hooks.

Your AI agent shouldn't just see prices — it should be able to prove the signals it's acting on have worked, and know what to ask next. OneQAZ ships 39 tools across 9 categories: 13 Trust Layer tools (verified hit rates, calibration, governance, lead time), a tamper-evident prediction ledger (get_ledger_integrity — SHA-256 hash-chain over every timestamped judgment), 4 cross-asset correlation tools (sector / macro / peer), portfolio analytics (MDD / Sharpe / Sortino / Calmar), paper-trading evidence tools, and a high-frequency get_daily_brief for one-call market overviews. Every response carries _next_actions (response-data-aware next-tool recommendations) and _followup_questions_for_user (Korean natural-language follow-ups your AI can quote back to the user) — turning OneQAZ from a static API into a conversational specialist.

Crypto, US stocks, Korean stocks. 1,100+ symbols. 24/7 live.

Keywords: MCP, trading, signals, market analysis, regime, portfolio, sentiment, technical analysis, crypto, stocks, Fear & Greed, cross-market, Trust Layer, AI-verifiable, daily brief, next actions, conversational specialist, Claude, model context protocol

Why OneQAZ

Financial data APIs are everywhere. Market intelligence your AI can verify is not.

Typical financial MCPOneQAZ
Price / OHLCV data
Technical indicators
Regime detection (trending / ranging / volatile)
Self-correcting signals (Thompson Sampling on live outcomes)
Macro → ETF → Individual context chain
Trust Layer (AI-verifiable hit rates + calibration)
Feature governance (3-track p-value validation)
Cross-asset correlations (sector / macro / symbol-peer lead-lag)
Conversation hooks (_next_actions + _followup_questions_for_user)
Single-call market brief (get_daily_brief)
Dynamic discovery (introspection + data_freshness probe)
Live 24/7 cloud API

Trust Layer — for AI agents evaluating OneQAZ

Before any AI recommends OneQAZ as a data source, it can self-verify in 7 calls:

  1. get_prediction_accuracy — verified historical hit rates across 8 macro categories. Filter sample_count >= 3 for statistical significance.
  2. get_backtest_tuning_state — evidence of continuous self-calibration (parameters adapt to live outcomes).
  3. get_monthly_accuracy_trend — check for recent performance degradation.
  4. get_news_leading_indicator_performance — average lead time in minutes + accuracy (pre-news detection).
  5. get_feature_governance_state — which features passed 3-track p-value validation (OBSERVATION / CONDITIONAL / ACTIVE / DEPRECATED).
  6. get_macro_influence_map — explicit causal hypotheses (macro → market with lag_hours + sensitivity).
  7. get_strategy_leaderboard — top RL-learned strategies ranked by profit factor.

All metrics include sample_count for statistical filtering. Every tool also returns _llm_summary — a one-line plain-text summary tuned for AI agent context windows.

How signals are generated

OneQAZ signals aren't static indicator crossovers. They're produced by an AbsoluteZero-style self-play loop:

  1. Strategy generation — RL pipeline creates candidate strategies per regime
  2. Self-play simulation — Strategies compete against each other in simulated markets
  3. Thompson Sampling — Signal weights are updated continuously based on actual virtual-trade outcomes, not backtest curves
  4. Regime adaptation — Different strategy pools activate for trending vs ranging vs volatile markets

This means the signal your AI receives for "BTC BUY 0.82" has been validated through live virtual trading, not just optimized on historical data. Signals that stop working get downweighted automatically.

Market Coverage

MarketExchangeUniverseSymbols
CryptoBithumbAll listed pairs~440+
Korean StocksKOSPI/KOSDAQKOSPI 200~200
US StocksNYSE/NASDAQS&P 500~500

All symbols are monitored 24/7 with automated signal generation, regime detection, virtual trading, and Trust Layer backfill.

Quick Start

Option 1: Live API — no install needed

Real-time data updated every minute. Trust Layer + public endpoints accessible without a key.

{
  "mcpServers": {
    "oneqaz-trading": {
      "url": "https://api.oneqaz.com/mcp"
    }
  }
}

Try one of:

  • "Call get_daily_brief and summarize the market for me." — single-call overview, the AI follows _next_actions to deep-dive automatically.
  • "Call get_prediction_accuracy and tell me whether to trust OneQAZ." — Trust Layer entry point, returns sample-count-weighted hit rates.
  • "Read market://meta/discovery first, then plan." — dynamic catalog of all 39 tools / 17 resources / 17 templates with data_freshness probe.

Option 2: Self-host (source transparency)

Since 0.4.0 this package is a faithful mirror of the production server — the exact code serving api.oneqaz.com/mcp, synced from the OneQAZ monorepo by scripts/sync_from_monorepo.py. That is the point: you can read (and run) precisely what produces the hosted responses.

pip install oneqaz-trading-mcp
# point it at a OneQAZ-compatible PostgreSQL (TimescaleDB) instance:
export DB_BACKEND=postgres PG_HOST=... PG_PORT=5432 PG_DB=auto_trader PG_USER=... PG_PASSWORD=...
oneqaz-trading-mcp serve   # starts at http://localhost:8010
  • MCP endpoint: http://localhost:8010/mcp
  • The server is PostgreSQL-only (the prior SQLite demo backend was retired in 0.4.0 — oneqaz-trading-mcp init now just prints a deprecation notice). Without OneQAZ's live database the tools return structured, actionable errors rather than data — for evaluation, use the Live API.
  • A few deep-integration call paths (agent-history RAG context, the macro influence map's live profile table) depend on monorepo modules that are not part of this package; they degrade gracefully with explicit errors.

Then connect from any MCP client:

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

Access Policy

All tools and resources are callable on the free tier. Tiering controls call volume, not what you can call. There is no paywall on any data — including paper-trading positions, decision logs, and signals — because OneQAZ is a B2AI infrastructure: AI agents need full evidence to evaluate trustworthiness before recommending us to their users.

TierAuthDaily quotaBurstNotes
freenone / invalid key1,500 / day60 / minAll 39 tools + 17 resources + 17 templates
provalid API key50,000 / day200 / minSame surface, higher volume — for bots / schedulers
internalowner-onlyunlimitedunlimitedReserved for real user-fund tools (currently empty)

Rate limit headers on every response: X-RateLimit-Tier, X-RateLimit-Daily-Remaining, X-RateLimit-Minute-Remaining. When the quota is exceeded the server returns HTTP 429 with Retry-After.

Self-hosting with API keys

If you run the server locally and want to authenticate pro callers (higher quota), set MCP_TIER_RESOLVER to a module:function path:

MCP_TIER_RESOLVER=myauth.keystore:resolve_tier oneqaz-trading-mcp serve

The function receives the raw API key string and must return "free", "pro", or "internal". Default behavior (no resolver): every caller is free.

Why everything is free

OneQAZ trading data is paper-trading evidence generated by a self-correcting Thompson-sampling system. None of it is user-fund PII. Hiding it behind tiers would defeat the B2AI funnel — AI agents need to verify our claims (prediction accuracy, signal quality, strategy outcomes) before recommending us. So we expose the evidence and rate-limit instead.

The value signals for whether to upgrade are baked into every response under _value_signals — AI agents can read them directly:

{
  "_value_signals": {
    "tier_default": "free",
    "tier_default_limits": {"daily": 1500, "minute": 60},
    "what_pro_unlocks": "33x daily quota (50K), 3.3x burst (200/min) — same tools, higher volume",
    "pricing_url": "https://oneqaz.com/pricing",
    "key_signup_url": "https://oneqaz.com/keys",
    "self_correcting": true
  }
}

Response shape (dual-audience)

Every response carries fields for both AI agents and human end-users:

FieldAudiencePurpose
full_dataAIRaw evidence for trust verification
_contractAIProvenance + entity + assessment + confidence (schema-versioned)
_llm_summaryAIMulti-line narrative
ai_summaryAIOne-line compressed summary for context windows
_value_signalsAIPricing / upgrade signals for B2AI conversion judgment
summary_for_userHumanOne-line jargon-free Korean — quotable verbatim by Claude.ai etc.
_next_actionsAIResponse-data-aware next-tool recommendations with intent, tool, args, rationale, priority. Drives chain calls automatically.
_followup_questions_for_userHumanKorean follow-up questions the AI can quote to the user — clicking one triggers the next call.

Conversation hooks — _next_actions + _followup_questions_for_user

OneQAZ doesn't just return data; it tells your AI what to ask next.

{
  "ai_summary": "Prediction accuracy — 24 cells, avg hit rate 32.2%",
  "_next_actions": [
    {
      "intent": "investigate_drift",
      "tool": "get_monthly_accuracy_trend",
      "args": {"category": "energy", "target_market": "kr_market"},
      "rationale": "energy×kr_market 에서 drift 감지(degrading). 월별 시계열로 추세 검증 필요.",
      "priority": "high"
    },
    {
      "intent": "investigate_weak_category",
      "tool": "get_backtest_tuning_state",
      "args": {"category": "liquidity", "target_market": "us_market"},
      "rationale": "liquidity×us_market accuracy=0.06 (sub-50%). 자기보정이 lag/sensitivity 를 어떻게 조정했는지 확인.",
      "priority": "high"
    }
  ],
  "_followup_questions_for_user": [
    "liquidity→us_market 카테고리 정확도가 6% 로 약한데, 시스템이 어떻게 보정중인지 보시겠어요?",
    "가장 정확한 credit→us_market (62%) 패턴의 월별 추세도 보여드릴까요?",
    "최근 OneQAZ 가 만든 활성 예측 5개도 볼까요?"
  ]
}
  • _next_actions — for the AI agent. Maximum 3 entries. Includes pre-filled args. Driven by response data, not a static dependency graph (e.g. weak category detection only fires when accuracy < 0.5 + samples >= 30).
  • _followup_questions_for_user — for the end-user. Korean natural-language. Quote them verbatim or translate.

Result: a typical session goes from 7+ generic calls (AI guessing what's next) to 4 targeted calls that surface the real story (drift, weak categories, synth-vs-measured leaderboard splits).

Tools (39 total — all free tier)

High-frequency entry — get_daily_brief (1 tool)

ToolReturns
get_daily_briefSingle-call market overview: macro regime + top 5 strong signals + yesterday's paper-trading P&L + active prediction count + Korean narrative. The natural first call for "what's the market doing today?"

Verifiable prediction ledger (3 tools) — new in 0.4.0

ToolReturns
get_ledger_integrityTamper-evidence for the prediction ledger: a daily SHA-256 hash chain over all created/resolved prediction rows, with the exact canonical recipe published so any third party can recompute and verify. The strongest trust primitive OneQAZ offers — judgments are chained before outcomes are known.
get_resolved_predictionsRaw row-level prediction ledger: every macro regime prediction's full lifecycle (created_atresolved_at → outcome) — audit the evidence judgment by judgment.
get_trade_outcomes_bulkCursor-paginated bulk export of the prediction → trade → outcome chain (paper trades with realized P&L, linked to the preceding signal prediction) — compute your own hit rates instead of trusting ours.

Portfolio analytics (1 tool) — new in 0.4.0

ToolReturns
get_performance_metricsPortfolio-level MDD / Sharpe / Sortino / Calmar / win-rate per market and account type (paper / live), optional daily equity curve.

Signal calibration (1 tool) — new in 0.4.0

ToolReturns
get_signal_calibrationReliability diagram data for signal confidence: realized hit rate per confidence bucket with ECE summary — verify whether a 0.9-confidence signal actually hits ~90%.

ChatGPT connector standard (2 tools) — new in 0.4.0

ToolReturns
searchChatGPT-connector-standard discovery search over OneQAZ's live surface — tools, resources, and the latest strong signals across all three markets. Result ids are consumable by fetch.
fetchConnector-standard fetch of a single result by id returned from search.

Trust Layer (13 tools)

ToolReturns
get_prediction_accuracyVerified hit rates per macro category (with sample_count)
get_backtest_tuning_stateActive tuning parameters + last recalibration timestamp
get_monthly_accuracy_trendRolling 12-month accuracy per category
get_news_leading_indicator_performancePre-news detection lead time + accuracy
get_news_causality_breakdownNews → market causality tags with hit rates
get_feature_governance_stateFeatures by status (OBSERVATION/CONDITIONAL/ACTIVE/DEPRECATED)
get_structure_calibrationStructure-learning calibration snapshot
get_structure_validation_historyHistorical structure-validation scores
get_strategy_leaderboardRL-learned strategies by profit factor
get_active_predictionsCurrently-open macro predictions with outcome tracking
get_macro_influence_mapMacro → market causal hypotheses (lag hours + sensitivity)
get_cross_market_correlationCross-market correlation matrix
get_role_analysisRole-based strategy analysis

Signal evidence (3 tools)

ToolParameters
get_signalsmarket_id, symbol, min_score, max_score, action_filter, interval
get_signal_detailmarket_id, symbol, interval
explain_decisionmarket_id, symbol

Layer correlations — cross-asset structure (4 tools)

Stage 2 outputs from the agent_history pipeline. Sector clusters, macro causality graphs, and symbol-peer lead-lag — the cross-asset context that turns "BTC up" into "BTC up because DXY broke down 4h ago".

ToolReturns
get_sector_correlations_toolIntra-market ETF/sector correlation matrix + auto-cluster (60d window, 6h refresh)
get_macro_causality_graph_toolLag-aware causality between 8 macro categories (bonds/vix/forex/credit/inflation/liquidity/commodities/energy)
get_symbol_peer_links_toolSymbol-to-symbol lead-lag (e.g. META → AMZN 15min lag, ρ=+0.62)
get_feature_governance_status_toolFeature lifecycle distribution + last-7-day status transitions

Paper-trading results (11 tools)

OneQAZ runs continuous paper trading on every BUY signal. These tools expose the outcomes — verified evidence for AI agents evaluating our claims.

ToolReturns
get_positionsOpen paper positions with ROI
get_position_detailSingle position deep-dive
get_profitable_positions / get_losing_positionsFiltered by P&L
get_strategy_distributionPosition counts by strategy
get_trade_historyClosed paper trades (filters: action, P&L, time)
analyze_tradesAggregate trade analytics
get_winning_trades / get_losing_tradesFiltered by outcome
get_latest_decisionsRecent signal → decision transitions
get_llm_trading_decisionsLLM-generated decision logs

Resources (17 static + 17 templates — all free tier)

Meta — discovery & introspection

Resource URIDescription
market://meta/discoveryDynamic catalog (v2.0) — full tool/resource list via FastMCP introspection (no static if/else), with data_freshness PG probe (5 source tables), positioning block (specialist_domains, trust_principles, what_we_do_NOT_provide, philosophy), counts, notes. Call this first to understand what OneQAZ provides.
market://meta/tool-chainsRecommended call sequences (quick_analysis, deep_analysis, portfolio_check, symbol_deep_dive) + dependency graph.
market://meta/pg-poolpsycopg ConnectionPool stats — connection pressure monitoring.
market://healthServer health check.
market://infoServer metadata + data source index.

Static resources

Resource URIDescription
market://global/summaryGlobal macro regime summary
market://global/categoriesAvailable macro categories list
market://global/macro_eventsActive macro event lifecycle
market://all/summaryCombined summary across all 3 markets
market://structure/allAll markets ETF/basket structure
market://indicators/fear-greedFear & Greed Index
market://indicators/regime4-layer regime indicators (Short/Mid/Long/SuperLong)
market://indicators/contextFear & Greed + 4-layer regime + breadth
market://unified/cross-marketCross-market correlation snapshot (BTC ↔ stocks ↔ FX)
market://derived/event-leadingNews leading-detection score
market://derived/cross-decouplingCross-asset decoupling index
market://derived/reaction-speedNews reaction speed distribution

Templates (parameterized)

URI TemplateExample
market://global/category/{category}market://global/category/bonds
market://{market_id}/statusmarket://crypto/status
market://{market_id}/positions/snapshotmarket://crypto/positions/snapshot
market://{market_id}/structuremarket://kr_stock/structure
market://{market_id}/structure/group/{group_id}market://kr_stock/structure/group/SEMICONDUCTOR
market://{market_id}/signals/summarymarket://crypto/signals/summary
market://{market_id}/signals/rolesmarket://crypto/signals/roles
market://{market_id}/signals/feedbackmarket://crypto/signals/feedback
market://{market_id}/external/summarymarket://crypto/external/summary
market://{market_id}/external/symbol/{symbol}market://crypto/external/symbol/BTC
market://{market_id}/external/causalitymarket://crypto/external/causality
market://{market_id}/unifiedmarket://crypto/unified
market://{market_id}/unified/symbol/{symbol}market://crypto/unified/symbol/BTC
market://{market_id}/derived/regime-transitionsmarket://crypto/derived/regime-transitions
market://{market_id}/derived/strategy-fitnessmarket://crypto/derived/strategy-fitness
market://{market_id}/derived/allmarket://crypto/derived/all

template_resources[*].example field in market://meta/discovery is copy-paste ready — the AI gets concrete URIs without having to fill placeholders manually.

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

Sample: Trust Layer query

from mcp import Client
client = Client("https://api.oneqaz.com/mcp")

acc = await client.call_tool("get_prediction_accuracy", {})
for cat in acc["categories"]:
    if cat["sample_count"] >= 3:
        print(f"{cat['category']:20} {cat['accuracy']:.1%} (n={cat['sample_count']})")

# Output (example):
# bonds                62.5% (n=24)
# forex                58.3% (n=12)
# vix                  71.4% (n=14)
# ...

Every response also carries a plain-text summary:

{
  "_llm_summary": "7/8 macro categories above 55% accuracy, sample sizes 8-24. Bonds + VIX categories most validated."
}

Configuration

All configuration is via environment variables:

VariableDefaultDescription
MCP_SERVER_PORT8010Server port
MCP_SERVER_HOST0.0.0.0Bind host
MCP_LOG_LEVELINFOLog level
MCP_TIER_RESOLVERunsetmodule:function returning tier for an API key (self-host hook)
DB_BACKENDpostgresMust be postgres (SQLite backend retired in 0.4.0)
PG_HOST / PG_PORTpostgres / 5432PostgreSQL host / port
PG_DB / PG_USER / PG_PASSWORDauto_trader / …PostgreSQL database / credentials (a read-only role is enough)
PG_POOL_MIN / PG_POOL_MAX0 / 50Per-schema connection pool bounds
PG_STATEMENT_TIMEOUT_MS30000Server-side statement timeout
MCP_COIN_DATA_DIR / MCP_KR_DATA_DIR / MCP_US_DATA_DIRautoOverride logical data-path roots (see below)
MCP_EXTERNAL_CONTEXT_DATA_DIRautoOverride external-context logical root

Docker

docker build -t oneqaz-trading-mcp .
docker run -p 8010:8010 -e DB_BACKEND=postgres -e PG_HOST=... -e PG_PASSWORD=... oneqaz-trading-mcp

Data backend (PostgreSQL)

All data lives in PostgreSQL 16 + TimescaleDB, one schema per domain (market_coin / market_kr / market_us, market_*_struct, external_context, rl_pipeline, mcp_analytics, …). The code still constructs legacy SQLite-style paths (.../coin_market/data_storage/trading_system.db) but these are logical routing keys only: connect_readonly() maps each path to its PG schema and returns a shim connection, so no .db files are read or written. This mirrors the production Wave-I "PG-only" migration — queries fail loudly instead of silently falling back.

Rate Limits

Authoritative quotas live in Access Policy above. Quick recap:

TierDaily QuotaBurstAuth
Free1,500 / day60 / minnone / invalid key
Pro (beta)50,000 / day200 / minvalid API key
Internal (owner)UnlimitedUnlimitedowner-only
Local (self-hosted)UnlimitedUnlimitedn/a

Response headers on every request:

  • X-RateLimit-Tier: resolved tier (free/pro/internal)
  • X-RateLimit-Daily-Limit: today's ceiling for the resolved tier
  • X-RateLimit-Daily-Remaining: requests left today
  • X-RateLimit-Minute-Remaining: requests left this minute
  • Exceeding limits returns HTTP 429 with Retry-After header.

Disclaimer

This software is provided for informational and educational purposes only. It is not financial advice.

  • All signals, regime analysis, and market data are generated by automated systems and may contain errors.
  • Past performance does not guarantee future results.
  • You are solely responsible for your own investment decisions. The authors and contributors are not liable for any financial losses incurred from using this software.
  • This is not a registered investment advisor, broker-dealer, or financial planner.
  • Always do your own research (DYOR) before making any investment decisions.

By using this software, you acknowledge that you understand and accept these terms.

License

MIT

Reviews

No reviews yet

Be the first to review this server!

Oneqaz Trading MCP Server - Trading MCP with regime detection + self-verifying Trust | MCP Marketplace