TickTest MCP Server
让 AI Agent(Claude Code、Cursor、Windsurf 等)通过 MCP 协议直接调用 TickTest A 股量化回测 API。
安装
pip install ticktest-mcp
配置
Claude Code
在 .claude/mcp.json 或项目根目录 .mcp.json 中添加:
{
"mcpServers": {
"ticktest": {
"command": "python",
"args": ["-m", "ticktest_mcp"],
"env": {
"TICKTEST_API_URL": "https://api.ticktest.cn",
"TICKTEST_API_KEY": "tt_your_api_key_here"
}
}
}
}
Cursor / Windsurf
在 MCP 配置中添加:
{
"mcpServers": {
"ticktest": {
"command": "ticktest-mcp",
"env": {
"TICKTEST_API_URL": "https://api.ticktest.cn",
"TICKTEST_API_KEY": "tt_your_api_key_here"
}
}
}
}
获取 API Key
无需离开对话,Agent 会帮你完成注册:
- Agent 询问你的邮箱
- Agent 调用
send-code→ 你收到 6 位验证码 - 告诉 Agent 验证码 → 注册成功,拿到 API Key + 500 信用点
- Agent 配置 Key,开始回测
Tools
| Tool | 认证 | 说明 |
|---|---|---|
get_capabilities |
公开 | 获取策略、因子、定价、注册流程 |
health_check |
公开 | 检查 API 服务状态 |
search_symbols |
公开 | 搜索 A 股股票代码 |
validate_strategy |
需 Key | 免费验证策略参数 |
run_backtest |
需 Key | 运行回测,¥0.50/次 |
create_payment |
需 Key | 生成三卡支付页:¥0.50 单次 / ¥1 体验卡 / ¥19 月卡 |
快速体验
海龟交易策略永久免费,无需付费:
Agent: 帮我回测中际旭创,海龟交易
→ 自动搜索 sz300308 → 回测 → 返回收益率/夏普/回撤/胜率
定价
- 单次回测:¥0.50(25 信用点)
- 畅测体验卡:¥1(24 小时回测不限次,新人限购 1 次)
- 畅测月卡:¥19(30 天回测不限次,真·不限次仅并发≤2)
- 注册送 500 信用点(≈ 20 次)
- 海龟交易:永久免费
环境变量
| 变量 | 必填 | 说明 |
|---|---|---|
TICKTEST_API_URL |
否 | API 地址,默认 https://api.ticktest.cn |
TICKTEST_API_KEY |
否 | API Key,不配则只能调公开 Tool |
TICKTEST_BACKTEST_TIMEOUT |
否 | 回测超时秒数,默认 90 |
License
MIT
Metadata
Release files for ticktest-mcp 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ticktest_mcp-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / ticktest_mcp-0.4.1-py3-none-any.whl
| Download URL | ticktest_mcp-0.4.1-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d78202ae1befccfcd389cb9cba1b4c0642ecd33216af1fc817ca479c3fbb12f
|
|
BLAKE2b-256 checksum How to use checksums |
73c7b19cd25c4eed9cb9dfb1601727bb4d8c56818a42432df9dbb44468ef1a9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Security for ticktest-mcp 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.