概述Overview
SMM Data-pro MCP 是上海有色网(SMM)面向 AI 客户端的标准化数据接入服务,提供中文、英文两个服务端点,各端点均支持两种传输协议,按客户端能力任选其一。 SMM Data-pro MCP is Shanghai Metals Market's standardized data access service for AI clients. It is served from two endpoints — Chinese and English — each supporting two transport protocols; pick whichever your client supports.
api_key 请求头完成鉴权;仅支持本地 stdio 的客户端(如多数版本的 Claude Desktop)可经本地 mcp-remote 桥接接入。
SMM data flows into your AI client's tool calls through the standardized MCP protocol, authenticated end-to-end by the api_key header. Clients that only support local stdio servers (like most Claude Desktop versions) connect through a local mcp-remote bridge.
| 服务版本Service | 端点域名Endpoint Domain | 说明Notes |
|---|---|---|
| 中文版Chinese | datapromcp.smm.cn |
工具说明、指标名称与返回数据均为中文Tool descriptions, indicator names and returned data in Chinese |
| 英文版English | datapromcp.metal.com |
工具说明、指标名称与返回数据均为英文Tool descriptions, indicator names and returned data in English |
| 传输协议Transport | 端点路径Path | 适用客户端Supported Clients | 建议Advice |
|---|---|---|---|
| Streamable HTTP | /mcp |
Cursor、Claude Code 等支持 MCP Streamable HTTP 的客户端;Claude Desktop 需经 mcp-remote 桥接(见第五部分)Cursor, Claude Code, and any client supporting MCP Streamable HTTP; Claude Desktop connects via the mcp-remote bridge (see Part 05) | 推荐Recommended |
| SSE | /sse + /message |
仅支持 SSE 传输的旧客户端Older clients that only support MCP SSE transport | 兼容旧版Legacy |
快速开始Quick Start
三步完成接入。 Three simple steps, end to end.
- 获取 API KeyGet your API Key 向 SMM 客户经理或商务联系人申请 Data-pro MCP 服务的 API Key;尚无对接人时,可通过 metal.com / smm.cn 官网的联系渠道申请。 Request a Data-pro MCP API Key from your SMM account manager or business contact. If you don't have one yet, reach out via the contact channels on metal.com / smm.cn.
- 复制对应配置Copy the matching configuration 在常用客户端配置中找到您的客户端,点击配置块右上角的「复制配置」按钮,按卡片说明粘贴到对应位置。协议与端点参数详见 Streamable HTTP(推荐)与 SSE(兼容旧版)。 Find your client in the Client Setup Guide, click the "Copy config" button in the top-right corner of the config block, and paste it where the card says. Protocol and endpoint details are in Streamable HTTP (recommended) and SSE (legacy).
-
替换 Key 并重启客户端Replace the key and restart your client
将配置中的
your-api-key替换为您的真实 API Key,保存后重启客户端。在客户端的 MCP 服务器/工具列表中看到smm-datapro即表示接入成功;随后可发一条测试提问验证数据链路,例如「查询 SMM 1# 电解铜最新均价」。 Replaceyour-api-keywith your real API Key, save, and restart the client. Whensmm-dataproappears in your client's MCP server/tool list, you're connected. Then send a test question to verify the data link, e.g. "What is the latest SMM 1# copper cathode average price?"
方式一 · Streamable HTTPOption 1 · Streamable HTTP 推荐Recommended
适用客户端:Cursor、Claude Code 等任何支持 MCP Streamable HTTP 的客户端;Claude Desktop 多数版本需经 mcp-remote 桥接(见第五部分)。所有请求与响应均通过单一端点完成。 Supported clients: Cursor, Claude Code, and any client supporting MCP Streamable HTTP; most Claude Desktop versions connect via the mcp-remote bridge (see Part 05). All requests and responses go through a single endpoint.
客户端配置Client Configuration
{ "mcpServers": { "smm-datapro": { "transport": "http", "url": "https://datapromcp.smm.cn/mcp", "headers": { "api_key": "your-api-key" } } } }
{ "mcpServers": { "smm-datapro": { "transport": "http", "url": "https://datapromcp.metal.com/mcp", "headers": { "api_key": "your-api-key" } } } }
将 your-api-key 替换为您的真实 API Key。各客户端实际配置的字段名略有差异,请以第五部分对应客户端的写法为准。 Replace your-api-key with your real API Key. Field names vary slightly between clients — follow the exact syntax on your client's card in Part 05.
方式二 · SSEOption 2 · SSE 兼容旧版Legacy
SSE(Server-Sent Events)是面向仅支持 SSE 传输的旧客户端的兼容方案。连接与消息分别使用两个端点;新接入建议优先使用 Streamable HTTP。 SSE (Server-Sent Events) is the compatibility option for older clients that only support SSE transport. Connection and messages use two separate endpoints; new integrations should prefer Streamable HTTP.
客户端配置Client Configuration
{ "mcpServers": { "smm-datapro": { "transport": "sse", "url": "https://datapromcp.smm.cn/sse", "headers": { "api_key": "your-api-key" } } } }
{ "mcpServers": { "smm-datapro": { "transport": "sse", "url": "https://datapromcp.metal.com/sse", "headers": { "api_key": "your-api-key" } } } }
将 your-api-key 替换为您的真实 API Key。各客户端实际配置的字段名略有差异,请以第五部分对应客户端的写法为准。 Replace your-api-key with your real API Key. Field names vary slightly between clients — follow the exact syntax on your client's card in Part 05.
常用客户端配置Client Setup Guide
以下按客户端类型分组,给出主流 AI 客户端的具体接入方法。所有客户端指向同一服务:端点 URL 与 api_key 请求头完全一致,仅配置文件的字段名因客户端而异——请使用对应卡片的写法,勿在客户端之间互抄字段。
The guides below are grouped by client type. Every client connects to the same service — identical endpoint URL and api_key header; only the config field names differ per client. Use the exact syntax on each card and do not copy field names across clients.
桌面应用Desktop Apps
多数版本的配置文件仅支持本地(stdio)服务器,推荐通过 mcp-remote 桥接接入(需已安装 Node.js)。若您的新版客户端已支持直接添加远程 MCP 服务器,可改用第三部分的端点参数。
Most versions of the config file only support local (stdio) servers, so we recommend bridging via mcp-remote (requires Node.js). If your up-to-date client supports adding remote MCP servers directly, use the endpoint parameters from Part 03 instead.
文件不存在时新建即可,或从「设置 → 开发者 → 编辑配置」打开。未安装 Node.js 可从 nodejs.org 下载 LTS 版(终端运行 node -v 验证);首次运行 npx 需联网拉取 mcp-remote,稍等片刻属正常。
If the file doesn't exist, just create it, or open it via Settings → Developer → Edit Config. If Node.js isn't installed, get the LTS build from nodejs.org (verify with node -v in a terminal); the first npx run downloads mcp-remote over the network, so a short wait is normal.
{ "mcpServers": { "smm-datapro": { "command": "npx", "args": [ "-y", "mcp-remote", "https://datapromcp.smm.cn/mcp", "--header", "api_key:your-api-key" ] } } }
{ "mcpServers": { "smm-datapro": { "command": "npx", "args": [ "-y", "mcp-remote", "https://datapromcp.metal.com/mcp", "--header", "api_key:your-api-key" ] } } }
smm-datapro;试问 「查询 SMM 1# 电解铜最新均价」。
Verify: after restarting, smm-datapro appears in the tool list; try asking “What is the latest SMM 1# copper cathode average price?”
通过图形界面添加,无需编辑配置文件: Added entirely through the UI — no config file editing needed:
- 打开「设置 → MCP 服务器 → 添加服务器」Open Settings → MCP Servers → Add Server
- 类型选择「可流式传输的HTTP(streamableHttp)」Choose type “Streamable HTTP (streamableHttp)”
- URL 填
https://datapromcp.smm.cn/mcpSet URL tohttps://datapromcp.metal.com/mcp - 在「请求头」中添加一条:键为
api_key,值为您的 API KeyAdd a header with keyapi_keyand your API Key as the value
IDE
将配置写入 mcp.json 即可,Cursor 会根据 url 自动识别传输方式;也可在「Settings → MCP」中通过界面添加。
Just write the config into mcp.json — Cursor infers the transport from the url. You can also add it via Settings → MCP.
{ "mcpServers": { "smm-datapro": { "url": "https://datapromcp.smm.cn/mcp", "headers": { "api_key": "your-api-key" } } } }
{ "mcpServers": { "smm-datapro": { "url": "https://datapromcp.metal.com/mcp", "headers": { "api_key": "your-api-key" } } } }
通过 MCP 面板添加:「MCP → 添加 → 手动配置」,将下方 JSON 粘贴到弹窗中确认即可。 Add via the MCP panel: MCP → Add → Manual configuration, then paste the JSON below into the dialog and confirm.
{ "mcpServers": { "smm-datapro": { "url": "https://datapromcp.smm.cn/mcp", "headers": { "api_key": "your-api-key" } } } }
{ "mcpServers": { "smm-datapro": { "url": "https://datapromcp.metal.com/mcp", "headers": { "api_key": "your-api-key" } } } }
smm-datapro;试问 「查询 SMM 1# 电解铜最新均价」。
Verify: smm-datapro appears in the MCP list; try asking “What is the latest SMM 1# copper cathode average price?”
命令行Command Line
一条命令完成添加(--scope user 全局生效)。配置会写入 ~/.claude.json,不建议手工编辑该文件。
One command does it (--scope user makes it global). The config is written to ~/.claude.json; editing that file by hand is not recommended.
claude mcp add --scope user --transport http smm-datapro \ https://datapromcp.smm.cn/mcp \ --header "api_key: your-api-key"
claude mcp add --scope user --transport http smm-datapro \ https://datapromcp.metal.com/mcp \ --header "api_key: your-api-key"
个别版本要求参数位于服务器名之前,若报参数错误可调整 --header 的位置。
Some versions require flags before the server name — if you get an argument error, move --header earlier in the command.
/mcp 查看连接状态;试问 「查询 SMM 1# 电解铜最新均价」。
Verify: type /mcp in a session to check the connection; try asking “What is the latest SMM 1# copper cathode average price?”
在 config.toml 中添加以下段落。需较新版本的 Codex CLI(支持远程 MCP 与 http_headers),旧版请先升级。
Add the block below to config.toml. Requires a recent Codex CLI (with remote MCP and http_headers support); upgrade first if yours is older.
[mcp_servers.smm-datapro] url = "https://datapromcp.smm.cn/mcp" http_headers = { api_key = "your-api-key" }
[mcp_servers.smm-datapro] url = "https://datapromcp.metal.com/mcp" http_headers = { api_key = "your-api-key" }
codex mcp list 确认 smm-datapro 在列;试问 「查询 SMM 1# 电解铜最新均价」。
Verify: run codex mcp list and confirm smm-datapro is listed; try asking “What is the latest SMM 1# copper cathode average price?”
其他客户端Any Other Client
任何原生支持 MCP Streamable HTTP 且允许自定义请求头的客户端,填入以下三项参数即可接入;仅支持 SSE 的旧客户端参见第四部分。 Any client with native MCP Streamable HTTP support and custom request headers connects with just these three parameters. For legacy SSE-only clients, see Part 04.
smm-datapro)即接入成功;试问「查询 SMM 1# 电解铜最新均价」。
Verify: your configured server name (we suggest smm-datapro) appears in the client's MCP server/tool list; try asking “What is the latest SMM 1# copper cathode average price?”
本节图标均为本页示意图形,并非各客户端官方标识;配置格式依据各客户端公开文档整理(2026-07 核验),如客户端改版请以其最新官方文档为准。 Icons in this section are illustrative glyphs for this page only, not official client marks. Config formats follow each client's public documentation (verified 2026-07); if a client changes, defer to its latest official docs.
身份认证Authentication
所有请求通过 HTTP 请求头完成认证与追踪,支持以下三个请求头: All requests are authenticated and traced via HTTP headers. The following three headers are supported:
| 请求头Header | 是否必填Required | 说明Description |
|---|---|---|
api_key |
必填Yes | 由 SMM 分配的加密密钥字符串,获取后原样填入配置即可An encrypted key string issued by SMM — paste it into the config as-is |
X-Request-ID |
选填Optional | 请求追踪 ID,便于问题排查时定位具体请求Request trace ID, useful for locating specific requests during troubleshooting |
Mcp-Session-Id |
选填Optional | 会话 ID。SSE 模式下由服务端自动分配;Streamable HTTP 模式下可手动指定Session ID. Auto-assigned by the server in SSE mode; can be provided manually in Streamable HTTP mode |
使用限制Usage Limits
| 限制项Limit | 规则Rule |
|---|---|
| 并发上限Max concurrency | 所有工具合计,每个用户最多 20 个并发工具调用Across all tools, each user may run at most 20 concurrent tool calls |
| 超限排队Over-limit queueing | 超出上限的请求最多等待 5 秒;若期间仍无空闲配额,返回繁忙(busy)响应Requests over the limit wait up to 5 seconds; if no slot frees up within that window, a busy response is returned |
常见问题FAQ
claude_desktop_config.json 文件在哪里?Where is claude_desktop_config.json?
~/Library/Application Support/Claude/claude_desktop_config.json;Windows:%APPDATA%\Claude\claude_desktop_config.json。也可在 Claude Desktop 的「设置 → 开发者 → 编辑配置」中直接打开。若文件不存在,新建即可。
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json; Windows: %APPDATA%\Claude\claude_desktop_config.json. You can also open it from Claude Desktop via Settings → Developer → Edit Config. If the file does not exist, simply create it.
Claude Desktop 无法通过配置文件添加远程服务器?My Claude Desktop can't add remote servers via the config file?
claude_desktop_config.json 仅支持本地(stdio)服务器,直接填写远程 URL 可能不生效。推荐使用第五部分 Claude Desktop 卡中的 mcp-remote 桥接配置(需 Node.js)。注意:「设置 → 连接器」中的自定义连接器目前无法附加 api_key 请求头,不适用于本服务。
Most versions of claude_desktop_config.json only support local (stdio) servers, so a remote URL entry may not take effect. Use the mcp-remote bridge config on the Claude Desktop card in Part 05 (requires Node.js). Note: custom connectors under Settings → Connectors currently cannot attach an api_key header, so they do not work with this service.
Cursor 如何配置?How do I configure Cursor?
~/.cursor/mcp.json,Cursor 会根据 url 自动识别传输方式,无需 transport 字段。
See the Cursor card in Part 05. In short: write the config into ~/.cursor/mcp.json; Cursor infers the transport from the url, so no transport field is needed.
中文端点和英文端点该选哪个?Which endpoint should I use — Chinese or English?
datapromcp.smm.cn,英文用户使用 datapromcp.metal.com。两个端点提供相同的工具与数据,区别仅在返回内容的语言;同一 API Key 通用,按团队的工作语言选择即可。如需在中文页使用英文端点,把配置中的域名改为 datapromcp.metal.com 即可,其余不变。
Chinese-language users should use datapromcp.smm.cn; English-language users should use datapromcp.metal.com. Both endpoints offer the same tools and data — they differ only in the language of the returned content. The same API Key works on both; choose based on your team's working language. To use the other endpoint, simply change the domain in the config (e.g. to datapromcp.smm.cn) — everything else stays the same.
配置文件里已有其他 MCP 服务器,怎么合并?My config already has other MCP servers — how do I merge?
"smm-datapro": { … } 这一段作为新条目添加到已有的 "mcpServers" 对象内部,与其他服务器条目并列(注意条目之间用英文逗号分隔),不要重复外层的 "mcpServers"。
Add the "smm-datapro": { … } block as a new entry inside your existing "mcpServers" object, alongside the other server entries (remember the comma between entries). Do not duplicate the outer "mcpServers" wrapper.
重启后没有看到 smm-datapro,如何排查?smm-datapro doesn't appear after restarting — how do I troubleshoot?
url 是否与所选传输方式匹配(HTTP 用 /mcp,SSE 用 /sse);③ api_key 是否已替换为真实 Key 且无多余空格;④ 网络是否可访问所选端点域名;⑤ 若使用 mcp-remote 桥接(如 Claude Desktop),在终端运行 npx -v 确认 Node.js 可用。仍无法解决时,请携带 X-Request-ID(如已配置)联系 SMM 技术支持。
Check in order: ① the config file is valid JSON (an extra or missing comma is the most common mistake); ② the url matches the chosen transport (/mcp for HTTP, /sse for SSE); ③ api_key has been replaced with your real key, with no stray spaces; ④ your network can reach the chosen endpoint domain; ⑤ if you use the mcp-remote bridge (e.g. Claude Desktop), run npx -v in a terminal to confirm Node.js is available. If the issue persists, contact SMM technical support, including the X-Request-ID if configured.
能看到 smm-datapro,但调用工具时报错或无数据?smm-datapro shows up, but tool calls fail or return no data?
api_key 无效或已过期;② 当前 Key 没有目标数据的订阅权限;③ 并发超限返回繁忙(busy)。请依次核对 Key、与 SMM 确认数据权限、稍后重试;仍失败请携带 X-Request-ID(如已配置)联系 SMM 技术支持。
Usually one of: ① the api_key is invalid or expired; ② your key lacks subscription permission for the requested data; ③ you hit the concurrency limit and got a busy response. Check the key, confirm data permissions with SMM, and retry later; if it persists, contact SMM technical support with the X-Request-ID if configured.