AI agents (MCP)
The API is also exposed through the Model Context Protocol at
https://data.cyberun.cloud/v2/mcp (streamable HTTP, stateless, JSON answers).
An agent uses the same key, permissions and limits as your own code.
Authorization: Bearer vmk_...
Give an agent its own key so it can be revoked without affecting anyone else.
Tools
| Tool | Use |
|---|---|
search_instruments | Search the catalog by symbol or name, venue, product, kind and status |
get_instrument | One instrument's specification, datasets and coverage |
get_calendar | Trading days and UTC sessions for a venue, optionally one product |
get_bars | K-lines, including continuous contracts with diff or ratio |
get_data | Book snapshots for several symbols and days, or instants |
create_export | Start a bulk export of book snapshots into Parquet or CSV |
get_export | An export's status, files and partition versions |
The tools call the same /v2 routes as HTTP, so responses have the same fields.
Row caps per tool, and the wait for days being prepared, are in
Limits. Continue with cursor, or use create_export for more.
If an answer would be too large, the tool returns
{"code":"resource_exhausted"} and asks for fewer rows or an export.
Claude Code
claude mcp add --transport http veinmesh https://data.cyberun.cloud/v2/mcp \
--header "Authorization: Bearer $VEINMESH_API_KEY"
Cursor, Windsurf and other remote MCP clients
Add a remote server in the client's MCP settings:
{
"mcpServers": {
"veinmesh": {
"url": "https://data.cyberun.cloud/v2/mcp",
"headers": {"Authorization": "Bearer vmk_..."}
}
}
}
Clients that only support local servers
Use mcp-remote as a bridge (for example Claude Desktop):
{
"mcpServers": {
"veinmesh": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://data.cyberun.cloud/v2/mcp",
"--header",
"Authorization: Bearer vmk_..."
]
}
}
}
Example prompts
- "Which rebar futures contracts are listed on SHFE, and when does the main contract expire?"
- "Give me 18-minute bars for SHFE.rb2701 for 2026-10-19 and 2026-10-20, and explain the biggest volume bar."
- "Compare the last five trading days of SHFE.rb.main and SHFE.rb.c1 on daily closes."
- "Export book snapshots for these five contracts for September 2026 as Parquet."
Errors and waiting
A failed tool call returns the problem JSON as text with isError: true; the
codes are the same as HTTP. A tool waits for trading days that are being
prepared, then returns data_pending; ask the agent to retry. See
Errors.
The v1 tools are not exposed; only the seven tools above exist.