查询国家统计局数据,支持指标搜索、获取与对比统计数据,可本地运行或使用托管端点。
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
本地运行
claude mcp add thatcoder --env FRED_API_KEY='<FRED_API_KEY>' --env MCP_CNBS_AUTH_TOKEN='<MCP_CNBS_AUTH_TOKEN>' -- npx mcp-cnbs~/.codex/config.toml
[mcp_servers.thatcoder]
command = "npx"
args = ["mcp-cnbs"]
env = { FRED_API_KEY = "<FRED_API_KEY>", MCP_CNBS_AUTH_TOKEN = "<MCP_CNBS_AUTH_TOKEN>" }
# codex mcp add thatcoder --env FRED_API_KEY='<FRED_API_KEY>' --env MCP_CNBS_AUTH_TOKEN='<MCP_CNBS_AUTH_TOKEN>' -- npx mcp-cnbs~/.cursor/mcp.json
{
"mcpServers": {
"thatcoder": {
"command": "npx",
"args": [
"mcp-cnbs"
],
"env": {
"FRED_API_KEY": "<FRED_API_KEY>",
"MCP_CNBS_AUTH_TOKEN": "<MCP_CNBS_AUTH_TOKEN>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"thatcoder": {
"type": "stdio",
"command": "npx",
"args": [
"mcp-cnbs"
],
"env": {
"FRED_API_KEY": "<FRED_API_KEY>",
"MCP_CNBS_AUTH_TOKEN": "<MCP_CNBS_AUTH_TOKEN>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"thatcoder": {
"command": "npx",
"args": [
"mcp-cnbs"
],
"env": {
"FRED_API_KEY": "<FRED_API_KEY>",
"MCP_CNBS_AUTH_TOKEN": "<MCP_CNBS_AUTH_TOKEN>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"thatcoder": {
"command": "npx",
"args": [
"mcp-cnbs"
],
"env": {
"FRED_API_KEY": "<FRED_API_KEY>",
"MCP_CNBS_AUTH_TOKEN": "<MCP_CNBS_AUTH_TOKEN>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"thatcoder": {
"command": "npx",
"args": [
"mcp-cnbs"
],
"env": {
"FRED_API_KEY": "<FRED_API_KEY>",
"MCP_CNBS_AUTH_TOKEN": "<MCP_CNBS_AUTH_TOKEN>"
}
}
}
}远程托管
claude mcp add --transport http thatcoder https://cnbs.mcp.icen.ai~/.codex/config.toml
[mcp_servers.thatcoder]
url = "https://cnbs.mcp.icen.ai"
# codex mcp add thatcoder --url https://cnbs.mcp.icen.ai~/.cursor/mcp.json
{
"mcpServers": {
"thatcoder": {
"url": "https://cnbs.mcp.icen.ai"
}
}
}.vscode/mcp.json
{
"servers": {
"thatcoder": {
"type": "http",
"url": "https://cnbs.mcp.icen.ai"
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"thatcoder": {
"httpUrl": "https://cnbs.mcp.icen.ai"
}
}
}claude_desktop_config.json · Customize › Connectors › Add custom connector
{
"mcpServers": {
"thatcoder": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://cnbs.mcp.icen.ai"
]
}
}
}.trae/mcp.json
{
"mcpServers": {
"thatcoder": {
"url": "https://cnbs.mcp.icen.ai"
}
}
}需要的环境变量
FRED_API_KEYMCP_CNBS_AUTH_TOKEN
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。