Repository navigation
Releases
TickDB MCP v0.2.4
TickDB MCP v0.2.4 hardens self-hosted HTTP defaults and shared API Key access while retaining the same 43 tools, optional OAuth, and Python/Docker deployment options.
This v0.2.4 release is reissued to include PyPI package metadata and an automatic publication workflow. Tool behavior and runtime dependencies are unchanged from the initial v0.2.4 release.
Release notes: English · 简体中文 · 繁體中文
PyPI: tickdb-mcp 0.2.4
Changes since v0.2.3.
Added
- Add a PyPI-specific README, MIT license metadata, and official project/documentation links.
- Add a release workflow that validates the fixed tagged commit, builds and checks the wheel and sdist, and publishes the validated artifacts using PyPI Trusted Publishing in the
pypienvironment without long-lived PyPI tokens. - Add security regressions for anonymous shared-Key access, valid and invalid Bearer tokens, caller-supplied Key isolation, OAuth coexistence, and stdio startup.
- Add an installed-package CI check that builds a wheel from the sdist, installs it in an isolated environment, and verifies the real
tickdb-mcpentry point and HTTP security behavior.
Fixed and Improved
- Bind Python HTTP to
127.0.0.1:8000by default instead of all network interfaces. - Block anonymous use of the server-wide
TICKDB_API_KEYon the legacy HTTP/mcpendpoint. When a shared server Key is configured withoutMCP_ACCESS_TOKEN, legacy requests without their ownX-TickDB-Keyreturn HTTP 401, including initialization, tool discovery, and tool calls. The rule also applies behind reverse proxies and alongside enabled OAuth. - Synchronize package/runtime versions, Docker examples, and installation, deployment, and client setup guides in Simplified Chinese, Traditional Chinese, and English.
Upgrade Notes
- If an HTTP deployment previously configured only
TICKDB_API_KEY, configure a strongMCP_ACCESS_TOKENand send its matchingAuthorization: Bearer <token>, or have clients supply their ownX-TickDB-Key. - When
MCP_ACCESS_TOKENis configured, every legacy HTTP client must send the correct Bearer token, including clients that supply their own TickDB Key. Without a configured access token, callers can continue using their ownX-TickDB-Key; requests cannot borrow the shared server Key. - Existing
.envfiles are not rewritten automatically. An explicitMCP_HOST=0.0.0.0remains effective; set127.0.0.1if only local access is needed. Docker examples retain container-internal0.0.0.0by adding-e MCP_HOST=0.0.0.0after--env-file .env, while publishing the host port on127.0.0.1. /oauthcontinues using the user's authorized Key binding and never falls back to the shared server Key. Enabling OAuth does not automatically protect the legacy/mcpendpoint. Preserve existing OAuth configuration, encryption keys, databases, and valid grants during upgrades. See OAuth self-hosting.- Local stdio continues using
TICKDB_API_KEYwithout an HTTP access token and does not start an HTTP listener. All 43 tool contracts remain unchanged.
Documentation
Full changelog: mcp/v0.2.3...mcp/v0.2.4
TickDB MCP v0.2.3
TickDB MCP v0.2.3 provides 43 tools for market data, company fundamentals, and API Key subscriptions, with optional OAuth and self-hosted Python/Docker deployment.
Release notes: English · 简体中文 · 繁體中文
Changes since v0.1.3.
Added
- Expand to 43 tools: 13 market data tools, 29 company financials and fundamentals tools, and 1 API Key subscription tool.
- Add company profiles, executives, financial statements, revenue segments, valuation, industry data, dividends, buybacks, shareholder and fund holdings, news, corporate events, and classified financial calendars.
- Add stock adjustment factors, K-line
adjust, dividend TTM, news detail, market status, andget_api_key_subscriptions; update CN/HK futures coverage. - Add optional web OAuth with S256 PKCE, dynamic client registration, refresh-token rotation and revocation; consent pages support Simplified Chinese, Traditional Chinese, and English.
- OAuth queries use the TickDB API Key verified and explicitly authorized by the user; Key bindings are encrypted in persistent SQLite.
- Provide deployment and client setup guides in three languages, plus offline tests for tools and HTTP transport.
Fixed and Improved
- Update REST endpoint and parameter mappings, batch limits, tick-by-tick trade limits, pagination, and timestamp handling.
- Preserve response envelopes, HTTP status, business errors, and
Retry-After; detect business failures on HTTP 200 and support gzip responses. - Improve OAuth CSRF protection, same-origin submissions, exact callback allowlisting, and issuer identification; consent pages show only the submitted Key's masked identity and subscription.
- Fix Python wheel packaging for the
tickdb-mcpentry module and Docker builds from source, enabling standalone installation and self-hosting. - Send logs to stderr to keep stdio JSON-RPC clean; configure the log directory through
LOG_DIRand continue logging to stderr if file writes are unavailable.
Upgrade Notes
- Refresh the client's tool list. Remove
get_kline_intervals,get_financial_fields, and the oldget_financial_calendar; use classified calendar tools instead. - Remove financial
fields, valuation-historymetric, and order-booklimitparameters; symbol-based fundamentals tools requiresymbol. See upgrade guide. - OAuth is disabled by default;
/mcpheader access and stdio remain available. Enable OAuth with the/oauthtool endpoint, public HTTPS, and persistent storage; retain encryption keys, databases, and valid grants during upgrades. See OAuth self-hosting. - Require MCP SDK
>=1.26.0,<2.0.0andcryptography>=46.0.0.
Documentation
Full changelog: mcp/v0.1.3...mcp/v0.2.3
TickDB MCP v0.1.3
A focused fix release for the TickDB MCP server — eliminates session memory growth observed in long-running deployments. No breaking changes; the hosted endpoint https://mcp.tickdb.ai/ already runs v0.1.3.
修复版本:解决长时间运行后服务端内存持续增长的问题。无破坏性变更,托管端点 https://mcp.tickdb.ai/ 已部署 v0.1.3。
Changes / 变更
- Stateless Streamable HTTP enabled by default — abandoned MCP sessions are no longer retained in memory; each request runs in its own short-lived transport. Controlled by
MCP_STATELESS_HTTP=true. - Bounded session lifecycle logging — the in-process
_known_sessionscache used for log correlation now has TTL + max-entry limits. - New configuration:
MCP_STATELESS_HTTP(defaulttrue),MCP_SESSION_LOG_TTL_SECONDS(default3600),MCP_SESSION_LOG_MAX_ENTRIES(default1000). - Unit tests covering bounded session cache behavior (TTL eviction, max-entries eviction, LRU touch).
启用无状态 Streamable HTTP,避免遗留 MCP session 占用内存;日志用的会话缓存改为 TTL + 上限有界结构。新增 3 个环境变量与对应单元测试。
Upgrade / 升级
No breaking changes. Existing AI client configs work as-is.
Hosted endpoint users: nothing to do. mcp.tickdb.ai already runs v0.1.3.
Self-hosted users:
git pull
docker build -t tickdb-mcp ./mcp
docker rm -f tickdb-mcp
docker run -d \
--network host \
--restart=always \
-v /var/log/tickdb-mcp:/app/logs \
--name tickdb-mcp \
tickdb-mcp无破坏性变更;现有 AI 客户端配置无需调整。托管用户无需操作;自部署用户拉取代码后重新构建 Docker 镜像即可。
Quick Start / 快速接入
Add to your AI client config:
{
"mcpServers": {
"tickdb": {
"type": "http",
"url": "https://mcp.tickdb.ai/",
"headers": {
"X-TickDB-Key": "YOUR_API_KEY"
}
}
}
}Get your API key at tickdb.ai · 前往 tickdb.ai 注册获取 API Key
MCP Tools / 工具列表
| Tool | Description |
|---|---|
get_ticker |
Real-time price snapshot · 实时行情快照 |
get_kline |
Historical K-line / Candlestick (OHLCV) · 历史 K 线 |
get_kline_latest |
Current live candle · 最新实时 K 线 |
get_order_book |
Order book / market depth · 买卖盘深度 |
get_recent_trades |
Recent trades · 最近成交明细 |
get_available_symbols |
Discover 37,527+ symbols · 查询可交易标的 |
get_kline_intervals |
Supported intervals · K 线周期列表 |
get_stock_info |
Stock fundamentals (EPS, BPS, dividend) · 股票基本信息 |
get_intraday |
Minute-level intraday data · 当日分时数据 |
get_trading_sessions |
Current trading session · 当前交易时段 |
get_trade_days |
Trading calendar · 交易日历 |
get_market_metrics |
PE, PB, market cap, capital flow · 市值、PE/PB、资金流 |
get_capital_flow |
Large/medium/small order flow · 大中小单资金流向 |
Documentation / 文档
| Link | |
|---|---|
| 客户端接入 · Client Setup | mcp/MCP_CLIENT_SETUP.md |
| 部署说明 · Deployment Guide | mcp/DEPLOYMENT.md |
| MCP 完整文档 · MCP README | mcp/README.md |
| 繁體中文 | mcp/docs/tw/README.md |
| English | mcp/docs/en/README.md |
| 更新记录 · Changelog | mcp/CHANGELOG.md |
| TickDB API Docs | docs.tickdb.ai |
Full Changelog: mcp/v0.1.2...mcp/v0.1.3
TickDB MCP v0.1.2
First open-source release of the TickDB MCP server — a Python implementation that connects AI assistants to real-time and historical market data via the TickDB Unified Market Data API. Now part of this repo at the mcp/ directory.
TickDB MCP 服务端首个开源发布版本,通过 Model Context Protocol (MCP) 将 TickDB 实时行情 API 接入 AI 助手。代码现整合至本仓库 mcp/ 目录。
What's included / 功能亮点
- 13 MCP tools covering real-time ticker, historical K-line, order book, recent trades, stock fundamentals, intraday data, capital flow, and more
- 7 markets · 37,527+ symbols: Forex/FX, Precious Metals, Indices, US Stocks (NASDAQ/NYSE), HK Stocks, A-shares/CN Stocks, Cryptocurrency
- Hosted endpoint
https://mcp.tickdb.ai/— no self-hosting required, runs the same code as inmcp/ - Self-hostable: full source in
mcp/— Python · Dockerfile · 46 unit tests · CI · MIT - Supported clients: Claude Code · Claude Desktop · Cursor · Kiro · Codex · Zed · Cherry Studio
- Dual transport: Streamable HTTP (remote) and stdio (local Claude Desktop)
- Auth middleware: Bearer token gate + per-request
X-TickDB-Keyinjection - Structured logging: full request lifecycle logging, API key masking, daily log rotation
Quick Start / 快速接入
Add to your AI client config:
{
"mcpServers": {
"tickdb": {
"type": "http",
"url": "https://mcp.tickdb.ai/",
"headers": {
"X-TickDB-Key": "YOUR_API_KEY"
}
}
}
}Get your API key at tickdb.ai · 前往 tickdb.ai 注册获取 API Key
MCP Tools / 工具列表
| Tool | Description |
|---|---|
get_ticker |
Real-time price snapshot · 实时行情快照 |
get_kline |
Historical K-line / Candlestick (OHLCV) · 历史 K 线 |
get_kline_latest |
Current live candle · 最新实时 K 线 |
get_order_book |
Order book / market depth · 买卖盘深度 |
get_recent_trades |
Recent trades · 最近成交明细 |
get_available_symbols |
Discover 37,527+ symbols · 查询可交易标的 |
get_kline_intervals |
Supported intervals · K 线周期列表 |
get_stock_info |
Stock fundamentals (EPS, BPS, dividend) · 股票基本信息 |
get_intraday |
Minute-level intraday data · 当日分时数据 |
get_trading_sessions |
Current trading session · 当前交易时段 |
get_trade_days |
Trading calendar · 交易日历 |
get_market_metrics |
PE, PB, market cap, capital flow · 市值、PE/PB、资金流 |
get_capital_flow |
Large/medium/small order flow · 大中小单资金流向 |
Documentation / 文档
| Link | |
|---|---|
| 客户端接入 · Client Setup | mcp/MCP_CLIENT_SETUP.md |
| 部署说明 · Deployment Guide | mcp/DEPLOYMENT.md |
| MCP 完整文档 · MCP README | mcp/README.md |
| 繁體中文 | mcp/docs/tw/README.md |
| English | mcp/docs/en/README.md |
| 更新记录 · Changelog | mcp/CHANGELOG.md |
| TickDB API Docs | docs.tickdb.ai |
About This Release / 关于本版本
The MCP server was previously hosted in a standalone tickdb-mcp repository. Starting from this release, it has been integrated into the tickdb-unified-realtime-marketdata-api repository as the mcp/ subdirectory, alongside the AI Skill, REST API documentation, and WebSocket reference — providing a single source of truth for all TickDB integrations.
MCP 服务端原本位于独立的 tickdb-mcp 仓库。从本版本起,已整合至 tickdb-unified-realtime-marketdata-api 主仓库的 mcp/ 子目录,与 AI Skill、REST API 文档、WebSocket 参考一同维护,为所有 TickDB 接入方式提供统一的源代码与文档入口。