
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@tushare/tmcp
Advanced tools
Tushare Model Context Protocol 服务器 - 为 AI 工具提供 100+ 金融数据接口
sdk.call(通用调用)、sdk.schema(参数查询)、sdk.search(接口搜索)sdk:apis(接口列表)、sdk:api/<name>(详细说明)minimal/basic/full 三档预设,减少数据传输@tushare/sdk,严格类型检查,零 any# 在 monorepo 中
pnpm install
# 构建
pnpm build
设置 Tushare API Token:
export TUSHARE_TOKEN="your_tushare_token_here"
# 开发模式
pnpm dev
# 生产模式
tushare-mcp --stdio
在 ~/.codeium/windsurf/mcp_config.json 中添加:
{
"mcpServers": {
"tushare": {
"command": "tushare-mcp",
"args": ["--stdio"],
"env": {
"TUSHARE_TOKEN": "your_token_here"
}
}
}
}
{
"name": "sdk.search",
"arguments": {
"q": "股票日线数据",
"limit": 5
}
}
{
"name": "sdk.schema",
"arguments": {
"api_name": "daily"
}
}
{
"name": "sdk.call",
"arguments": {
"api_name": "daily",
"params": {
"ts_code": "000001.SZ",
"start_date": "20240101",
"end_date": "20240331"
},
"fields_preset": "basic"
}
}
| 变量 | 默认值 | 说明 |
|---|---|---|
TUSHARE_TOKEN | - | 必填 Tushare API Token |
TUSHARE_MCP_POPULAR_TOOLS | 20 | 热门工具数量(0=关闭) |
TUSHARE_MCP_MAX_CONCURRENCY | 1 | 最大并发数 |
TUSHARE_MCP_TIMEOUT_MS | 30000 | 请求超时(毫秒) |
TUSHARE_MCP_RETRY | 3 | 最大重试次数 |
TUSHARE_MCP_VERBOSE | false | 详细日志 |
fields| 分类 | API | 说明 |
|---|---|---|
| 股票 | stock_basic | 股票基础信息 |
| 股票 | daily | 日线数据 |
| 股票 | daily_basic | 每日基本面 |
| 基金 | fund_basic | 基金基础信息 |
| 基金 | fund_nav | 基金净值 |
| 财务 | income | 利润表 |
| 财务 | balancesheet | 资产负债表 |
| 指数 | index_daily | 指数日线 |
src/
├── cli.ts # CLI 入口
├── server.ts # MCP 服务器
├── env.ts # 配置管理
├── types.ts # 类型定义
├── errors.ts # 错误处理
├── caller.ts # SDK 调用器
├── schema.ts # Schema 管理
├── search.ts # 搜索引擎
├── resources.ts # 资源处理
├── presets.ts # 字段预设
├── rateLimit.ts # 限流重试
└── tools/ # 工具实现
├── call.ts # sdk.call
├── schema.ts # sdk.schema
└── search.ts # sdk.search
# 类型检查
pnpm typecheck
# 测试
pnpm test
# 构建
pnpm build
# 清理
pnpm clean
MIT - 详见 LICENSE
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.