itick-mcp-server
Exposes iTick REST API as MCP tools, providing market data for stocks, crypto, forex, indices, futures, and funds including tick, quote, depth, and kline.
README
itick-mcp-server
面向 Model Context Protocol (MCP) 的 Python 服务,将 iTick REST API 暴露为工具:基础数据、股票(含信息 / IPO / 复权因子),以及 Crypto / Forex / Indices / Future / Fund 各产品线的单笔与批量 Tick / Quote / Depth / Kline。
关于 iTick
iTick 提供涵盖 FIX、REST 与 Websocket 的 API 套件,面向机构与专业场景;数据覆盖主流市场股票(美国、香港、中国、新加坡、日本等)、全球外汇、指数与加密货币的实时与历史行情。详见 英文文档、组织内 英文文档站仓库 / 中文文档仓库 / 繁体文档仓库。
- 官网:https://itick.org
- GitHub 组织:https://github.com/itick-org(含各语言 SDK 等)
特点(摘自官方介绍)
- 开发者友好:标准易用接口、简明文档与丰富示例,便于快速接入。
- 产品线丰富:多市场股票、外汇、指数、加密货币等实时与历史数据。
- 多场景适用:量化团队、金融科技与专业分析等场景。
- 服务与基础设施:专业数据源、多地区加速与链路热备份,侧重实时与稳定。
- 定制化:机构与专业用户可洽谈定制数据方案。
iTick API 类型与本项目范围
| 类型 | 说明 | 本 MCP |
|---|---|---|
| REST | 通过市场数据端点获取报价、K 线等;请求需按文档携带 token 等鉴权信息。 | 已实现(仅 HTTP GET 覆盖的 REST 能力) |
| Websocket | 发布/订阅,推送订单、成交、行情等,减少轮询。 | 未实现 |
| FIX | 高吞吐、机构级连接;当前主要面向机构客户。 | 未实现(非 REST) |
FIX 仅机构开放时,可联系官方客服:Telegram @iticksupport、WhatsApp +852 59046663。
技术支持(摘要)
- 邮件:support@itick.org(建议主题中注明环境、身份与问题描述)
- 营业时间:周一至周五 9:00–18:00(香港时间);紧急生产问题以官方说明为准。
- 非办公时间:可登录 itick.org 通过站内即时消息联系在线客服。
部署
uv build + upx(唯一推荐方式)
使用 uv 构建,并用 upx 压缩,生成轻量、可分发的 MCP stdio 可执行文件。
# 安装 uv(若未安装)
curl -LsSf https://astral.sh/uv/install.sh | sh
# 安装 upx(若未安装)
# macOS: brew install upx
# Linux: sudo apt install upx
# 构建 + 压缩
uv build
构建产物位于 dist/ 目录,可直接用于 MCP stdio 模式(Cursor / Claude Desktop / OpenCode):
快速配置
支持配置的平台:
- ✨ Cursor
- ✨ Claude Desktop
- ✨ OpenCode
手动配置环境变量
| 变量 | 说明 |
|---|---|
ITICK_TOKEN |
必填(实际调用时):请求头 token,见 REST 文档 |
ITICK_API_BASE |
可选,默认 https://api.itick.org(与文档示例一致)。若你环境使用 https://api.itick.io,可设为该地址 |
export ITICK_TOKEN="your_token"
# export ITICK_API_BASE="https://api.itick.io"
Run (stdio)
itick-mcp
# 或
# http方式启动
python3 -m itick_mcp_server --transport http
# sse方式启动
python3 -m itick_mcp_server --transport sse
# stdio方式启动
python3 -m itick_mcp_server
Cursor / Claude Desktop
{
"mcpServers": {
"itick": {
"command": "uvx",
"args": [
"itick-mcp"
],
"env": {
"ITICK_TOKEN": "your_token"
}
}
}
}
OpenCode
OpenCode 使用 opencode.json / opencode.jsonc 的 mcp 键,本地服务需将 type 设为 "local",command 为字符串数组,环境变量放在 environment 中(与 Cursor 的 mcpServers / env 不同)。最小示例:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"itick": {
"type": "local",
"enabled": true,
"command": ["uvx", "itick-mcp"],
"environment": {
"ITICK_TOKEN": "your_token"
}
}
}
}
MCP 工具一览(53)
与 REST 文档 路径对应:
基础
symbolList→GET /symbol/listsymbolHolidays→GET /symbol/v2/holidays
股票(额外)
stockInfo→GET /stock/infostockIpo→GET /stock/ipostockSplit→GET /stock/split
各产品线(stock / crypto / forex / indices / future / fund)
| 工具名 | REST |
|---|---|
{prefix}Tick |
GET /{prefix}/tick |
{prefix}Quote |
GET /{prefix}/quote |
{prefix}Depth |
GET /{prefix}/depth |
{prefix}Kline |
GET /{prefix}/kline |
{prefix}Ticks |
GET /{prefix}/ticks |
{prefix}Quotes |
GET /{prefix}/quotes |
{prefix}Depths |
GET /{prefix}/depths |
{prefix}Klines |
GET /{prefix}/klines |
批量接口中 codes 为英文逗号分隔。K 线参数在工具中为 k_type,请求中会编码为 kType;可选 et(毫秒时间戳)、limit。
与早期 Java 示例一致的股票单笔 K 线工具名仍为 stockKline。
相关资源
- 官方 Python SDK(含 REST / WebSocket 等):itick-org/python-sdk
- 其他语言 SDK 见 github.com/itick-org 组织仓库列表
代码结构
client.py— HTTP GET、ITICK_API_BASE/ITICK_TOKENtools_register.py— 注册全部 REST 工具server.py— FastMCP 入口
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.