idatafield-mcp · 星罗数场数据分析 MCP Server
针对 www.idatafield.com(星罗数场·可信数据流通平台)的 MCP 数据分析服务 + 智能体技能。 封装平台公开门户数据与登录态个人数据,内置运营分析报告生成(离线 HTML 交互图表 + Excel),可安装到 Codex、Claude Code、Cursor、Claude Desktop 等支持 MCP 的智能体工具,也可托管部署到 ModelScope MCP 广场。
服务配置(MCP Server Config)
STDIO 类型,使用 PyPI 包 idatafield-mcp,通过 uvx 运行(无需凭据即可使用全部公开数据分析与运营报告能力):
{
"mcpServers": {
"idatafield": {
"command": "uvx",
"args": ["idatafield-mcp@latest"]
}
}
}
个人订单/用量/交易等登录态数据需在自托管时通过
env注入账号密码,见下文「个人数据(需登录)」。
功能特性
公开数据(无需登录)
- 数据产品检索/详情(370+ 产品,支持行业/供方/定价/数据主体/地域/时间/排序筛选)
- 数据空间列表与分类统计、应用场景、数据需求、数据资源、全局搜索、行业资讯
登录态个人数据(配置账号密码后)
- 个人资料、我的订单(申请/供应)、交易概览(本月/上月订单额、分成额、订单数)
- 用量明细、账户开票/支付信息、我加入/管理的空间、消息中心、需求响应
分析与报告
analyze_operations:全量运营指标聚合(行业/供方/主体/定价分布、上架趋势、热度排行、空间生态、自动洞察)generate_operations_report:生成单文件离线 HTML 报告(内联 ECharts 交互图表)+ Excel 工作簿(含原生图表)export_data:任意实体导出 CSV/XLSX
工具清单
| 类别 | 工具 |
|---|---|
| 公开数据 | search_products get_product_detail list_data_spaces list_demands get_demand_detail list_scenes list_resources global_search list_news |
| 个人数据(需登录) | get_my_profile list_my_orders get_transaction_summary get_usage_details get_account_summary list_my_spaces get_my_messages |
| 分析报告 | analyze_operations generate_operations_report export_data |
快速开始(本地)
需要 uv:
uvx idatafield-mcp@latest # 直接从 PyPI 运行
# 或从源码
git clone https://github.com/zhsheng26/idatafield-mcp.git
cd idatafield-mcp && uv sync && uv run idatafield-mcp
任意 MCP 客户端使用上面的「服务配置」即可接入。
个人数据(需登录)
平台登录走 Keycloak SSO,本服务支持账号密码自动登录 + token 缓存 + 过期自动重登。 在自托管环境下设置环境变量后重启服务:
| 变量 | 说明 |
|---|---|
IDATAFIELD_USERNAME |
平台登录手机号/用户名 |
IDATAFIELD_PASSWORD |
登录密码 |
IDATAFIELD_CACHE_DIR |
可选,token 缓存目录(默认 ~/.idatafield-mcp) |
{
"mcpServers": {
"idatafield": {
"command": "uvx",
"args": ["idatafield-mcp@latest"],
"env": {
"IDATAFIELD_USERNAME": "你的手机号",
"IDATAFIELD_PASSWORD": "你的密码"
}
}
}
}
托管部署(如 ModelScope)场景下不建议写入个人凭据;公开数据分析与运营报告无需登录即可使用。
各智能体接入
- Codex:见
examples/codex-config.toml - Claude Code:见
examples/claude-code.mcp.json - Cursor:见
examples/cursor.mcp.json - Claude Desktop:见
examples/claude-desktop.json
技能安装(可选,指导智能体组合工具产出报告):将 skills/idatafield-analysis/ 复制到 ~/.codex/skills/ 或 ~/.claude/skills/。
部署到 ModelScope MCP 广场
- 本仓库根目录 README 已包含可被自动解析的 STDIO 服务配置(上文
mcpServers块)。 - 包已发布到 PyPI(
idatafield-mcp),ModelScope 通过uvx下载安装并调用list_tools完成部署检测。 - 在 ModelScope MCP 创建页 填入本仓库地址
https://github.com/zhsheng26/idatafield-mcp,托管类型选「可托管部署」。 - 检测通过后即获得
可部署/hosted标签,社区用户可一键连接。
开发
uv sync
uv run pytest # 单元测试(20 项)
uv run python scripts/smoke_live.py # 只读冒烟测试 + 生成样例报告
说明
- 只读:不含下单、加入空间、发布等写操作。
- 公开接口已实测验证;个人数据接口需账号有相应业务数据方有内容。
- 托管环境下
generate_operations_report生成的文件位于服务端容器内,社区用户建议以自托管方式获取报告文件;数据分析类工具(analyze_operations/检索类)在托管环境可直接使用。
Metadata
Release files for idatafield-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| idatafield_mcp-0.1.0.tar.gz | 363.4 kB | Without provenance | Details for idatafield_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| idatafield_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for idatafield_mcp-0.1.0-py3-none-any.whl |
Total release size: 726.4 kB
Release files / idatafield_mcp-0.1.0.tar.gz
| Download URL | idatafield_mcp-0.1.0.tar.gz |
|---|---|
| Size | 363.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72252f1acf3e6224f256618d818e65d1cafe81836023971ae5e441269323b9f8
|
|
BLAKE2b-256 checksum How to use checksums |
5b2363fb423ae0a77b458c33484b00cf122570692a5375d261c16d3812df15b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / idatafield_mcp-0.1.0-py3-none-any.whl
| Download URL | idatafield_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 363.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8288186fd30858836ac83b6fce4162ea8dbc02e90c7c681722c8c66c5844b4c
|
|
BLAKE2b-256 checksum How to use checksums |
4bf63db191c660d4721dec37543fa50a1a1cf24ebb04b353fd8d0757b87a7e67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for idatafield-mcp 0.1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.