Gangtise Ultra MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Gangtise Ultra MCP Server
标准化的港股/研报数据 MCP Server,基于 FastMCP 框架,使用 Streamable HTTP 传输协议。
特性
🚀 FastMCP 标准化 - 严格遵循 MCP 协议标准,使用 Pydantic V2 Literal 类型生成干净的 JSON Schema
📊 丰富的资源类型 - 支持券商研报、首席观点、公司公告等 8 种资源类型
🔍 智能搜索 - 支持单条搜索和批量搜索,Literal 类型严格约束参数
📝 预设提示词 - 内置每日简报、竞对分析、投资逻辑等场景模板
🔗 资源溯源 - 支持通过 URI 获取文档原文
⚡ 高性能 - 标准中间件栈(缓存/日志/错误处理)+ 并发控制 + 指数退避重试
Related MCP server: Stock SDK MCP Server
项目结构
gangtise_ultra/
├── main.py # 入口 + 中间件栈配置
├── config.py # 环境变量配置
├── ecosystem.config.js # PM2 配置
├── pyproject.toml # 项目依赖
├── core/
│ ├── auth.py # 认证(TokenVerifier + URL 签名)
│ ├── client.py # HTTP 客户端(重试 / 并发控制)
│ ├── utils.py # 时间解析 / 结果清洗 / URL 签名
│ └── exceptions.py # 异常定义
├── models/
│ ├── enums.py # 枚举类型(资源类型 / 知识库 / 时间范围)
│ └── api_schema.py # Pydantic 模型(内部使用)
├── features/
│ ├── tools.py # MCP Tools(Literal 类型 + ToolError)
│ ├── resources.py # MCP Resources
│ ├── prompts.py # MCP Prompts
│ └── http_routes.py # HTTP 代理路由
├── assets/
│ └── prompts.json # 提示词模板
└── logs/ # 日志目录快速开始
1. 配置环境变量
创建 .env 文件:
# Gangtise API 认证(二选一)
# 方式一:直接使用 accessToken
GANGTISE_API_KEY=your_access_token
# 方式二:使用 accessKey/secretAccessKey
GANGTISE_ACCESS_KEY=your_access_key
GANGTISE_SECRET_KEY=your_secret_key
# MCP Server 配置
FASTMCP_PORT=80092. 安装依赖
cd /home/gangtise_ultra
pip install -e .
# 或
pip install fastmcp pydantic pydantic-settings httpx python-dotenv3. 启动服务
直接运行
python main.py使用 PM2
pm2 start ecosystem.config.js
pm2 logs gangtise-ultraAPI 概览
Tools (工具)
工具名 | 描述 |
| 知识库搜索,支持资源类型、时间范围等筛选 |
| 批量搜索,一次最多 5 个查询 |
| 获取所有支持的资源类型 |
Resources (资源)
URI | 描述 |
| 获取文档原文/溯源链接 |
| 快速搜索 |
| 服务状态 |
| 使用帮助 |
| 工具 Schema |
Prompts (提示词)
提示词 | 描述 |
| 每日简报 - 行业最新动态 |
| 竞对分析 - 竞争格局分析 |
| 投资逻辑 - 投资框架整理 |
| 市场情绪 - 板块情绪分析 |
| 事件追踪 - 事件影响跟踪 |
| 报告总结 - 研报要点提取 |
| 知识分析 - 主题深度分析 |
| 系统上下文 - 输出规范设置 |
资源类型
名称 | 值 | 描述 | 可下载 |
| 10 | 券商研究报告 | ✅ |
| 20 | 内部研究报告 | ✅ |
| 40 | 首席分析师观点 | ❌ |
| 50 | 公司公告 | ✅ |
| 60 | 会议平台纪要 | ✅ |
| 70 | 调研纪要公告 | ✅ |
| 80 | 网络资源纪要 | ✅ |
| 90 | 产业公众号 | ✅ |
知识库类型
名称 | 值 | 描述 |
| system_knowledge_doc | 系统库(目前唯一可用) |
时间范围
值 | 描述 |
| 近 1 天 |
| 近 1 周 |
| 近 1 月(默认) |
| 近 1 季度 |
| 近 6 月 |
| 近 1 年 |
| 全部时间 |
使用示例
搜索比亚迪研报
{
"tool": "search_knowledge",
"arguments": {
"query": "比亚迪",
"resource_types": ["BROKER_REPORT"],
"time_range": "1m",
"top": 5
}
}批量查询多家公司
{
"tool": "batch_search",
"arguments": {
"queries": ["比亚迪", "宁德时代", "特斯拉"],
"resource_types": ["BROKER_REPORT", "ANALYST_OPINION"],
"top": 3
}
}使用每日简报提示词
{
"prompt": "daily_briefing",
"arguments": {
"industry": "新能源汽车",
"company": "比亚迪"
}
}参数标准化
本服务使用 Literal 类型 和 Pydantic Field 约束 生成严格、干净的 JSON Schema, 使 LLM 客户端能准确理解每个参数的类型和可选值:
参数 | 类型 | 约束 |
|
| 必填 |
|
| 范围 1-20,默认 10 |
|
| 可选,枚举值见下方资源类型表 |
|
| 枚举: 1d, 1w, 1m, 1q, 6m, 1y, all |
错误处理遵循 MCP 标准:
参数校验错误 → FastMCP/Pydantic 自动返回结构化验证错误
业务逻辑错误 → 通过
ToolError返回 MCP 标准错误响应未预期异常 → 框架自动捕获并返回安全的错误信息
PM2 常用命令
# 启动服务
pm2 start ecosystem.config.js
# 查看日志
pm2 logs gangtise-ultra
# 重启服务
pm2 restart gangtise-ultra
# 停止服务
pm2 stop gangtise-ultra
# 删除服务
pm2 delete gangtise-ultra
# 监控面板
pm2 monit
# 保存进程列表(开机自启)
pm2 save
pm2 startup配置说明
环境变量
变量名 | 默认值 | 描述 |
| - | 直接使用的 accessToken |
| - | 用于获取 token 的 accessKey |
| - | 用于获取 token 的 secretAccessKey |
| 8009 | 服务端口 |
| 0.0.0.0 | 监听地址 |
| 3 | API 并发限制 |
| 900 | 缓存 TTL(秒) |
| 20 | 请求超时(秒) |
| 3 | 最大重试次数 |
技术栈
FastMCP 2.5+ - MCP Server 框架(含标准中间件支持)
Pydantic V2 - 数据验证 + JSON Schema 生成
httpx - 异步 HTTP 客户端
uvicorn - ASGI 服务器
PM2 - 进程管理
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Access real-time and historical market data for China A-shares and Hong Kong stocks, along with ne…
- TradeFlags MCPDeprecatedcom.tradeflags
Authenticated market data for HK and US equities — breadth, signals, vol surfaces, and OTC pricing.
China A-share & equity research MCP server (回声投研) for market quotes, filings, financials, fund flows, concepts & sentiment.
Market data, financial statements, valuation, research, and news for investment workflows.
Related MCP Servers
- FlicenseDqualityDmaintenanceProvides real-time stock data and AI-powered analysis for A-shares, Hong Kong stocks, and US stocks. Features sentiment analysis of financial news, deep research reports, and comprehensive market data through multiple integrated data sources.22177-
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to query real-time and historical market data for A-shares, Hong Kong and US stocks, funds, futures, and options, including K-lines, technical indicators, sector data, and capital flows. It also supports composite workflows such as full-stock analysis, multi-stock comparison, conditional screening, and market overviews through tools, prompts, resources, and prebuilt skills.140 npmISC
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to query real-time and historical market data across A-share, Hong Kong, US, and fund markets, including quotes, K-line data, technical indicators, sector and futures/options data. It also supports batch market scans, composite stock analysis, condition-based screening, and built-in analyst prompts and skills for financial workflows.140 npmISC
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to access real-time and historical market data for A-shares, Hong Kong and US stocks, funds, futures, and options, calculate technical indicators, screen markets, and perform composite financial analysis through tools, prompts, resources, and skills.140 npmISC