Skip to main content
Glama
slb-cn

CyberQuant MCP Server

by slb-cn

CyberQuant MCP Server

Node.js >= 20 License: MIT MCP Protocol

CyberQuant 数据共享平台的 MCP (Model Context Protocol) 服务器,让 AI 助手(Claude Desktop、ChatGPT 等)能够直接查询和分析金融数据。

架构

┌─────────────────┐     stdio      ┌──────────────────┐     HTTPS     ┌──────────────┐
│  AI 客户端       │ ◄────────────► │  MCP Server      │ ◄───────────► │  API Gateway  │
│  Claude Desktop  │                │  (本项目)         │               │              │
└─────────────────┘                └──────────────────┘               └──────────────┘

MCP Server 作为 API Gateway 的智能客户端,通过 stdio 协议与 AI 客户端通信,将金融数据以 AI 友好的 CSV 格式返回。

Related MCP server: Financial Datasets MCP Server

功能特性

MCP Tools(3 个)

工具

说明

configure

配置 API Key,首次使用时调用

list_routes

列出当前用户可用的数据路由及参数 Schema

query_data

查询指定路由数据,返回 CSV 格式(节省 token)

MCP Resources(2 个)

资源 URI

说明

cyberquant://user/profile

当前用户信息(等级、市场权限、速率限制)

cyberquant://routes

当前用户可用的数据路由列表

设计亮点

  • CSV 输出:相比 JSON 节省 40-60% token,表格结构天然适合 AI 分析

  • 自然语言引导:数据返回附带智能提示,引导 AI 缩小查询范围

  • pageSize 上限保护:超过 1000 条自动拦截,避免 AI 处理超大数据集

  • 不自动翻页hasMore 时引导 AI 缩小参数范围,不暴露 cursor

  • 运行时配置:通过 configure 工具动态更新 API Key,无需重启

快速开始

环境要求

  • Node.js >= 20.0.0

  • pnpm(推荐)或 npm

安装

# 克隆项目
git clone <repo-url>
cd cyberquant-mcp-server

# 安装依赖
pnpm install

# 构建
pnpm build

配置

MCP Server 与 cyberquant-cli 共用配置文件 ~/.cyberquant/config.json

{
  "endpoint": "https://api.cyberspace2077.com",
  "apiKey": "sk_live_your_api_key_here",
  "mcp": {
    "pageSize": 200,
    "timeout": 30000
  }
}

💡 你也可以不手动编辑配置文件,启动后在 AI 对话中直接调用 configure 工具完成配置。

配置字段说明:

字段

类型

必填

默认值

说明

endpoint

string

API Gateway 地址

apiKey

string

API Key(sk_live_xxxsk_test_xxx

mcp.pageSize

number

200

单次查询返回条数,上限 1000

mcp.timeout

number

30000

请求超时时间(ms)

与 Claude Desktop 集成

编辑 Claude Desktop 配置文件:

  • macOS~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows%APPDATA%/Claude/claude_desktop_config.json

添加以下配置:

{
  "mcpServers": {
    "cyberquant": {
      "command": "node",
      "args": ["/absolute/path/to/cyberquant-mcp-server/packages/server/dist/index.js"]
    }
  }
}

保存后重启 Claude Desktop,即可在对话中使用 CyberQuant 数据查询功能。

📖 更多配置方式(npx、环境变量等)详见 examples/claude-desktop-config.md

开发

# 开发模式(tsx 直接运行 TypeScript)
pnpm dev

# 构建(tsup → packages/server/dist/)
pnpm build

项目结构

cyberquant-mcp-server/
├── packages/server/
│   ├── src/
│   │   ├── index.ts              # stdio 入口
│   │   ├── server.ts             # MCP 服务器(注册 Tools + Resources)
│   │   ├── tools/
│   │   │   ├── configure.ts      # configure — 配置 API Key
│   │   │   ├── list.ts           # list_routes — 列出可用路由
│   │   │   └── query.ts          # query_data — CSV 数据查询
│   │   ├── resources/
│   │   │   ├── user-profile.ts   # cyberquant://user/profile
│   │   │   └── route-list.ts     # cyberquant://routes
│   │   ├── lib/
│   │   │   ├── api-client.ts     # API Gateway HTTP 客户端(含重试+超时)
│   │   │   ├── config.ts         # 配置管理
│   │   │   ├── errors.ts         # 错误类型
│   │   │   └── state.ts          # 共享状态
│   │   └── types/
│   │       └── index.ts          # 类型定义
│   ├── package.json
│   ├── tsconfig.json
│   └── tsup.config.ts
├── docs/                         # 使用文档
├── examples/                     # 配置示例
├── package.json                  # workspace root
├── pnpm-workspace.yaml
└── tsconfig.base.json

技术栈

技术

用途

TypeScript (ESM)

主语言,target ES2022

Node.js >= 20

运行时(原生 fetch)

@modelcontextprotocol/sdk

MCP 协议实现

zod

Tool 参数校验

tsup

构建打包

pnpm workspace

monorepo 管理

文档

License

MIT

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/slb-cn/cyberquant-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server