Create an API key and choose a local stdio or hosted Streamable HTTP connection.创建 API key,并选择本地 stdio 或托管 Streamable HTTP 连接。
Market Data MCP Server for AI Agents面向 AI Agent 的市场数据 MCP 服务器
Learn how to connect AI agents to quotes, trades, OHLCV bars, order books, sessions, and corporate actions—with explicit freshness, feed entitlements, validation, and an auditable QVeris workflow.了解如何让 AI Agent 访问报价、成交、OHLCV K 线、订单簿、交易时段和公司行动,并保留明确的时效、行情授权、验证与可审计的 QVeris 工作流。
Who should use this market data MCP guide?谁应该使用这份市场数据 MCP 指南?
This guide is for engineers building market-monitoring agents, research copilots, alerting workflows, portfolio dashboards, or data-quality assistants that need provider-backed market data through MCP.本指南适合构建市场监控智能体、研究助手、告警工作流、投资组合看板或数据质量助手,并需要通过 MCP 使用供应商市场数据的工程团队。
It assumes the goal is research, monitoring, or controlled downstream automation—not autonomous order placement. Trading authorization, suitability, risk limits, and human approval remain separate systems.本指南假设目标是研究、监控或受控的下游自动化,而不是自主下单。交易授权、适当性、风险限制与人工批准仍属于独立系统。
AI application and agent engineers integrating MCP clients.集成 MCP 客户端的 AI 应用与智能体工程师。
Data teams normalizing quotes, trades, bars, books, and sessions.规范化报价、成交、K 线、订单簿与时段的数据团队。
Platform teams comparing direct APIs, custom MCP, and QVeris.比较直接 API、自建 MCP 与 QVeris 的平台团队。
Security and operations teams responsible for entitlements, cost, and audit.负责授权、成本与审计的安全及运维团队。
A market data MCP server is a tool boundary—not a promise of real-time data市场数据 MCP 服务器是工具边界,而不是“实时数据”承诺
A market data MCP server exposes quotes, trades, OHLCV bars, order-book snapshots, session calendars, and corporate actions as schema-defined tools an AI application can discover and call. It keeps provider credentials and feed-specific execution outside the model context.市场数据 MCP 服务器把报价、成交、OHLCV K 线、订单簿快照、交易日历和公司行动封装为 AI 应用可发现、可调用的结构化工具,并把供应商凭据和行情源执行逻辑留在模型上下文之外。
MCP standardizes access. The underlying provider still determines coverage, venue, entitlement, delay, corrections, adjustment policy, and redistribution rights. A production agent must receive those facts with every result.MCP 规范访问方式;底层供应商仍决定覆盖范围、交易场所、授权、延迟、纠错、复权规则和再分发权。生产级智能体必须在每个结果中获得这些事实。
Which market-data operations belong behind MCP.哪些市场数据操作适合放在 MCP 后面。
Which timestamps and feed labels make results safe to use.哪些时间戳与行情源标签能让结果可安全使用。
When snapshots, polling, streaming, or a hybrid architecture fit.何时适合快照、轮询、流式或混合架构。
How to validate providers before an agent explains or acts.如何在智能体解释或行动前验证供应商。
Define data scope and controls before connecting an agent连接智能体前先定义数据范围与控制
Use a client that can load tools, preserve tool results, and expose execution approval when needed.使用能够加载工具、保留结果并在需要时提供执行批准的客户端。
Specify asset class, stable identifiers, venues, currencies, sessions, and geographic coverage.明确资产类别、稳定标识、交易场所、币种、交易时段与地域覆盖。
Decide whether each operation needs real-time, delayed, end-of-day, historical, or cached data.决定每项操作需要实时、延迟、日终、历史还是缓存数据。
Confirm display, non-display, storage, attribution, and redistribution permissions for every feed.确认每个行情源的展示、非展示、存储、归属和再分发权限。
Prepare known instruments, sessions, corporate actions, gaps, and expected outputs before rollout.上线前准备已知证券、交易时段、公司行动、数据缺口与预期输出。
“Price” is ambiguous. A last trade, midpoint, closing auction, delayed quote, and adjusted close can all be valid but answer different questions.“价格”本身含义模糊。最新成交价、买卖中间价、收盘竞价价、延迟报价和复权收盘价都可能正确,却回答不同问题。
| Operation操作 | Required fields必备字段 | Common agent mistake常见智能体错误 |
|---|---|---|
| Quote报价 | Bid/ask price and size, venue, event time, feed买卖价与数量、交易场所、事件时间、行情源 | Calling midpoint the executable price把中间价当作可成交价格 |
| Trade成交 | Price, size, venue, conditions, sequence, correction state价格、数量、场所、成交条件、序号、纠错状态 | Ignoring late or corrected prints忽略迟报或更正成交 |
| OHLCV barOHLCV K 线 | Interval, timezone, session, adjustment, completeness周期、时区、交易时段、复权、完整性 | Comparing differently adjusted bars比较复权口径不同的 K 线 |
| Order book订单簿 | Depth, side, price, size, venue, sequence, snapshot time深度、方向、价格、数量、场所、序号、快照时间 | Treating one venue as the whole market把单一场所当成整个市场 |
| Session/calendar交易时段/日历 | Exchange, timezone, regular/extended state, holiday schedule交易所、时区、常规/盘前盘后状态、节假日安排 | Labeling a closed market as stale data把休市误判为数据陈旧 |
| Corporate action公司行动 | Action type, ex-date, effective date, factor, source行动类型、除权日、生效日、调整因子、来源 | Explaining a split as a price crash把拆股解释为价格暴跌 |
Filings, fundamentals, earnings, macro series, and research context belong in the related financial data MCP server guide. This page stays focused on observable market events and their delivery semantics.监管文件、基本面、财报、宏观序列和研究上下文请参考相关的金融数据 MCP 服务器指南。本页专注可观察的市场事件及其传递语义。
Diagnose the contract before blaming the model先诊断数据契约,再归因于模型
When a market answer looks wrong, inspect the raw tool result and execution evidence first. Most defects come from identity, entitlement, session, timestamp, adjustment, provider, or partial-response mismatches.当市场答案看起来不对时,应先检查原始工具结果与执行证据。多数缺陷来自身份、授权、交易时段、时间戳、复权、供应商或部分响应不匹配。
Reproduce the same call outside the agent, compare it with a golden source, and change one variable at a time. Do not “fix” a suspicious number by prompting the model to reinterpret it.在智能体之外复现同一调用,与基准来源比较,并一次只改变一个变量。不要通过提示模型重新解释来“修复”可疑数字。
Price is old: compare event time and receive time; check feed tier, market session, cache age, and entitlement.价格陈旧:比较事件与接收时间;检查行情层级、交易时段、缓存年龄与授权。
Bars disagree: align interval boundaries, timezone, regular versus extended hours, and corporate-action adjustment.K 线不一致:对齐周期边界、时区、常规与盘前盘后时段以及公司行动复权。
Empty result: distinguish closed market and no record from invalid symbol, permission denial, timeout, rate limit, or provider failure.空结果:区分休市、无记录、无效代码、权限拒绝、超时、限流与供应商故障。
Duplicate or missing events: inspect sequence IDs, reconnect boundaries, pagination, corrections, and retry behavior.事件重复或缺失:检查序号、重连边界、分页、纠错与重试行为。
Separate agent reasoning from feed-specific execution把智能体推理与行情源执行分离
The model should see narrow tools and explicit result contracts—not exchange credentials, provider SDKs, or unbounded tick streams.模型应看到范围明确的工具与显式结果契约,而不是交易所凭据、供应商 SDK 或无限逐笔流。
The AI application connects locally over stdio or remotely over Streamable HTTP and exposes only approved tools to the model.AI 应用通过本地 stdio 或远程 Streamable HTTP 连接,并只向模型暴露已批准工具。
Resolve the requested operation, asset class, venue coverage, freshness, budget, entitlement, and provider.解析所需操作、资产类别、场所覆盖、时效、预算、授权和供应商。
Translate stable tool inputs into provider parameters and normalize typed errors without hiding source semantics.把稳定工具输入转换为供应商参数,并规范化类型错误,同时保留来源语义。
Check identity, session, timestamps, gaps, adjustments, and cache age before returning data.返回数据前检查证券身份、交易时段、时间戳、缺口、复权与缓存年龄。
Return data with source, feed, venue, freshness, event and receive time, adjustment policy, warnings, and execution ID.返回数据时携带来源、行情源、场所、时效、事件与接收时间、复权规则、警告和执行 ID。
Record selected capability, parameters, latency, outcome, billing, and the evidence used in the agent response.记录所选能力、参数、延迟、结果、计费以及智能体回答引用的证据。
Implement one bounded market-data workflow end to end端到端实施一个有明确边界的市场数据工作流
Start with one observable question such as “return the latest eligible quote for this instrument.” Prove the entire path before adding movers, news, or autonomous follow-up actions.先从一个可观察问题开始,例如“返回该证券最新且符合授权的报价”。在增加涨跌榜、新闻或自动后续行动前,先验证完整链路。
State instrument, venue, event type, session, freshness, currency, adjustment policy, and response size.声明证券、场所、事件类型、交易时段、时效、币种、复权规则与响应大小。
Use discover with the actual capability and constraints. Keep the returned search ID and candidate tool IDs.用真实能力与约束调用 discover,保留搜索 ID 与候选工具 ID。
Review schemas and provider metadata, then validate parameters and obtain a quote before execution.检查参数结构与供应商元数据,再在执行前验证参数并取得报价。
Call the selected tool with bounded lookback, symbols, depth, retries, and response projection. Preserve the execution ID.使用有界的回看期、证券数、深度、重试与响应投影调用所选工具,并保留执行 ID。
Check identity, venue, event and receive times, feed tier, session, adjustment, continuity, and warnings.检查身份、场所、事件与接收时间、行情层级、交易时段、复权、连续性与警告。
Reconcile usage and settlement, compare the golden result, then add the next operation only after the first path passes.核对使用记录与结算,比较基准结果;第一条链路通过后再增加下一项操作。
Connect locally or through hosted Streamable HTTP通过本地进程或托管 Streamable HTTP 连接
Choose one transport, keep credentials outside the HTML and model context, validate the client configuration, and confirm the expected tools are visible before running market-data calls.选择一种传输方式,把凭据留在 HTML 与模型上下文之外,验证客户端配置,并在运行市场数据调用前确认预期工具可见。
| Control point控制点 | Market-data question市场数据问题 | Evidence to keep应保留证据 |
|---|---|---|
discover | Which capability covers the asset, event, venue, and freshness?哪个能力覆盖目标资产、事件、场所与时效? | Search ID and candidate tool IDs搜索 ID 与候选工具 ID |
inspect | What inputs, output shape, provider stats, and examples apply?输入、输出结构、供应商统计和示例是什么? | Tool schema and provider metadata工具结构与供应商元数据 |
probe | Are the parameters valid and what will execution cost?参数是否有效,执行成本是多少? | Schema result, quote, and unknown checks结构校验、报价与未知检查项 |
call | Can the selected capability return the requested market event?所选能力能否返回目标市场事件? | Execution ID, result, latency, warnings执行 ID、结果、延迟与警告 |
usage_history | Did the call succeed, fail, or charge?调用成功、失败还是产生费用? | Outcome and pre-settlement billing结果与预结算计费 |
credits_ledger | What was the final credit outcome?最终积分结果是什么? | Final settlement entry最终结算条目 |
Use the maintained local package when the MCP host launches child processes. Store the API key in the environment, validate the client configuration, then confirm the four execution tools are visible.当 MCP Host 能启动子进程时使用维护中的本地包。把 API key 存入环境变量,验证客户端配置,再确认四个执行工具可见。
qveris mcp setup --target cursor
qveris mcp validate --target cursor --probe
Use the hosted endpoint when the client supports remote MCP. Send the key as a Bearer token, never commit it, and reconnect after rotating credentials.客户端支持远程 MCP 时使用托管端点。通过 Bearer token 发送 key,绝不能提交到代码仓库,轮换凭据后重新连接。
claude mcp add --transport http qveris \
https://mcp.qveris.ai/mcp --scope user \
--header "Authorization: Bearer YOUR_QVERIS_API_KEY"
Discover, inspect, probe, call, validate, and audit发现、检查、探测、调用、验证与审计
Use QVeris as the provider-capability discovery and execution layer, then apply your own market-data contract before the result reaches the agent. Preserve provider-specific facts instead of flattening them into a bare number.把 QVeris 用作供应商能力发现与执行层,再在结果进入智能体前应用自己的市场数据契约。应保留供应商事实,而不是把它们压扁成一个数字。
Fail closed: if symbol identity, venue, entitlement, session, adjustment, or timestamps are unknown, return a typed warning or error. Do not let the model silently guess.默认拒绝:当证券身份、场所、授权、交易时段、复权或时间戳未知时,返回类型明确的警告或错误,不能让模型静默猜测。
{
"instrument": {"symbol": "XYZ", "venue": "XNAS"},
"data_type": "quote",
"data": {"bid": 101.20, "ask": 101.24},
"currency": "USD",
"event_time": "2026-07-30T14:31:02.418Z",
"received_time": "2026-07-30T14:31:02.612Z",
"freshness": "real_time",
"feed": "consolidated",
"session": "regular",
"adjustment": "not_applicable",
"source": {"provider": "example", "request_id": "req_..."},
"warnings": [],
"execution_id": "exec_..."
}
A useful agent separates observable price behavior from possible explanations. It should first prove the move, then collect context, and label every causal claim as evidence or hypothesis.可靠的智能体会把可观察价格行为与可能解释分开:先证明异动,再收集上下文,并把每个因果判断标记为证据或假设。
Resolve the instrument and venue. State regular or extended session, comparison window, currency, and target freshness.解析证券与场所,声明常规或盘前盘后时段、比较窗口、币种和目标时效。
Fetch quote, trades, and bars; check gaps, corrections, volume, corporate actions, and a benchmark using the same session and adjustment policy.获取报价、成交和 K 线;在相同交易时段与复权口径下检查缺口、纠错、成交量、公司行动和基准。
Retrieve relevant news or events only after the market move is measured. Preserve publisher, publication time, URL, and source rights.只有在量化异动后才检索相关新闻或事件,并保留发布者、发布时间、URL 和来源权利。
Report observed facts separately from plausible drivers. Never claim that the nearest headline caused the move without evidence.把已观察事实与可能驱动因素分开报告。没有证据时,不得声称时间最近的新闻导致异动。
Keep tool IDs, search and execution IDs, provider request IDs, timestamps, feed labels, warnings, and calculation inputs.保留工具 ID、搜索与执行 ID、供应商请求 ID、时间戳、行情源标签、警告与计算输入。
Do not turn a research result into an autonomous order. Trading authorization, suitability, risk, and human approval require separate controls.不能把研究结果直接转成自主订单。交易授权、适当性、风险与人工批准需要独立控制。
Test market meaning, not only HTTP success验证市场含义,而不只是 HTTP 成功
Build a golden set across liquid and illiquid instruments, multiple venues, a holiday, a split, a symbol change, a halted security, and a known correction. Compare representative outputs with an authoritative source.建立覆盖高低流动性证券、多场所、节假日、拆股、代码变更、停牌和已知纠错的基准集,并把代表性输出与权威来源比较。
| Check检查项 | Pass condition通过条件 | Failure to catch需要捕获的失败 |
|---|---|---|
| Identity身份 | Stable instrument ID, symbol, asset class, venue, currency稳定证券 ID、代码、资产类别、场所、币种一致 | Reused ticker or wrong listing代码复用或错误上市地 |
| Calendar日历 | Holiday, early close, regular and extended sessions match节假日、提前收市、常规与盘前盘后时段一致 | False stale alert outside session休市时产生错误陈旧告警 |
| Time时间 | Event, receive, query, and timezone semantics are explicit事件、接收、查询时间与时区语义明确 | Future data or timezone shift未来数据或时区偏移 |
| Price and size价格与数量 | Decimal precision, scale, currency, lot and side match小数精度、缩放、币种、手数与方向一致 | 100× price or size error价格或数量放大 100 倍 |
| Bars and actionsK 线与公司行动 | Interval boundaries, session and adjustment policy match周期边界、交易时段与复权规则一致 | Split presented as return把拆股当成收益率 |
| Continuity连续性 | Duplicates, gaps, sequence resets and corrections are handled重复、缺口、序号重置与纠错均被处理 | Silent partial dataset静默返回残缺数据集 |
| Entitlement授权 | Feed tier and user rights match requested use行情层级与用户权利符合使用目的 | Unauthorized display or redistribution未授权展示或再分发 |
| Errors错误 | No data, closed market, timeout, rate limit, and denial are distinct无数据、休市、超时、限流与拒绝能明确区分 | Empty array that looks valid看似有效的空数组 |
Enforce security, budget, and freshness before every call在每次调用前执行安全、预算与时效控制
Market-data terms can distinguish personal and commercial use, display and non-display use, real-time and delayed access, venue coverage, storage, attribution, and redistribution. MCP does not change those obligations.市场数据条款可能区分个人与商业用途、展示与非展示用途、实时与延迟访问、场所覆盖、存储、归属与再分发。MCP 不会改变这些义务。
Bind entitlements to the authenticated user or service, enforce them before provider execution, and carry the resulting feed tier into the response. Apply cache TTL by data class, not one global value.应把授权绑定到已认证用户或服务,在调用供应商前执行,并把最终行情层级带入响应。缓存 TTL 应按数据类别设置,而不是使用一个全局值。
Secrets: keep provider keys server-side and redact logs.密钥:供应商 key 留在服务端并对日志脱敏。
Budgets: bound symbols, lookback, interval, depth, response size, and retries.预算:限制证券数量、回看期、周期、深度、响应大小与重试。
Fallback: switch providers only when venue, feed, adjustment, session, timestamps, and rights are equivalent.回退:只有场所、行情源、复权、时段、时间戳与权利等价时才能切换供应商。
Human review: require separate approval before any trading or high-impact action.人工复核:任何交易或高影响行动前都需要独立批准。
Cost: inspect and probe before execution, cap per-call and daily credits, and reconcile final settlement.成本:执行前 inspect 与 probe,限制单次和每日积分,并核对最终结算。
Latency: define separate budgets for provider, network, validation, and agent reasoning; reject results outside the workflow’s freshness SLO.延迟:分别设置供应商、网络、验证和智能体推理预算;拒绝超出工作流时效 SLO 的结果。
Avoid the shortcuts that make market agents confidently wrong避免让市场智能体“自信地犯错”的捷径
It hides quote, trade, close, session, venue, and adjustment semantics. Expose narrow operations instead.它会隐藏报价、成交、收盘、时段、场所和复权语义,应改用范围明确的操作。
A cached or delayed record may have a recent processing time. Return feed tier and freshness class explicitly.缓存或延迟记录也可能拥有最近的处理时间,必须显式返回行情层级与时效类别。
Symbols can change, collide across venues, or be reused. Resolve stable identifiers and listings first.代码会变化、跨场所冲突或被复用,应先解析稳定标识与上市地。
A replacement feed may differ in coverage, latency, adjustments, or rights. Prove equivalence and disclose the switch.替代行情源可能在覆盖、延迟、复权或权利上不同,必须证明等价并披露切换。
Fast polling does not guarantee ordered, lossless events. Use a dedicated stream when sequence continuity matters.高频轮询不能保证事件有序且无损;序列连续性重要时应使用专用流。
Temporal proximity is not causality. Separate observed movement, verified event facts, and hypotheses.时间接近不等于因果,应分开报告已观察异动、已验证事件事实与假设。
Market data MCP server questions市场数据 MCP 服务器常见问题
What is a market data MCP server?什么是市场数据 MCP 服务器?
Does MCP make market data real time?MCP 会让市场数据自动变成实时吗?
Can QVeris replace a streaming market data feed?QVeris 能替代流式市场数据源吗?
What metadata should every market data result include?每个市场数据结果应包含哪些元数据?
How should an agent validate market data?智能体应如何验证市场数据?
When should I use QVeris instead of a direct market data API?什么时候应使用 QVeris,而不是直接市场数据 API?
Is market data the same as financial data?市场数据与金融数据相同吗?
Verify protocol behavior, feed semantics, and implementation details核对协议行为、行情语义与实施细节
Model Context Protocol architectureModel Context Protocol 架构
MCP server concepts: tools, resources, and promptsMCP 服务器概念:tools、resources 与 prompts
Alpaca market data: HTTP, WebSocket, coverage, and subscriptionsAlpaca 市场数据:HTTP、WebSocket、覆盖与订阅
Databento market-data fields, timestamps, and conventionsDatabento 市场数据字段、时间戳与约定
QVeris MCP Server documentationQVeris MCP 服务器文档
Hosted MCP endpoint and client configuration托管 MCP 端点与客户端配置
How to use QVeris MCP Server如何使用 QVeris MCP 服务器
Financial data MCP server guide金融数据 MCP 服务器指南
Financial data API selection for AI agents面向 AI Agent 的金融数据 API 选型
Connect one market workflow, then prove it先连接一个市场工作流,再验证它
Configure QVeris MCP, discover one quote or bar capability, inspect and probe it, run a golden instrument and time window, then preserve the complete execution record before expanding.配置 QVeris MCP,发现一个报价或 K 线能力,完成 inspect 与 probe,用基准证券和时间窗口验证,再在扩展前保留完整执行记录。
