CNBS MCP Server
Supports deployment on Cloudflare Workers platform with authentication token configuration via Wrangler CLI and Cloudflare dashboard secrets for secure serverless operation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CNBS MCP Servershow me China's GDP trend over the last 5 years"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CNBS MCP Server
MCP server for querying China National Bureau of Statistics (NBS) data and major international statistical databases. All data is fetched from real APIs — no mock data.
Data Sources
Source | Auth | Coverage |
China NBS (data.stats.gov.cn) | None | Monthly / Quarterly / Yearly / Provincial domestic data |
World Bank (api.worldbank.org) | None | 200+ countries — GDP, CPI, trade, population, FDI, Gini, etc. |
IMF DataMapper | None | WEO forecasts — GDP growth, inflation, government debt, current account |
OECD SDMX | None | Member-country quarterly GDP, employment, leading indicators |
BIS Statistics | None | Effective exchange rates, credit gaps, property prices, cross-border banking |
FRED (Federal Reserve) |
| US rates, CNY/USD, oil, gold, S&P 500, M2 |
NBS Census | None | Population (2020), Economic (2018), Agriculture (2016) censuses |
NBS Departments | None | Finance, Industry, Trade, Agriculture, PBoC monetary, Social Security, Housing, Energy |
FRED API Key: Free registration at https://fred.stlouisfed.org/docs/api/api_key.html
Pass it as theX-Fred-Api-Keyrequest header (HTTP mode) or setFRED_API_KEYenv var (stdio mode).
Related MCP server: a-share-mcp
Installation
npx (Recommended)
npx mcp-cnbsHTTP transport
npx mcp-cnbs --port 12345Install globally
npm install -g mcp-cnbs
mcp-cnbsMCP Client Configuration
stdio mode (npx)
Supported clients: Claude Desktop, Cursor, Windsurf, Cherry Studio, Trae, Continue, and all MCP-compatible clients.
{
"mcpServers": {
"cnbs": {
"command": "npx",
"args": ["mcp-cnbs"]
}
}
}With FRED support:
{
"mcpServers": {
"cnbs": {
"command": "npx",
"args": ["mcp-cnbs"],
"env": {
"FRED_API_KEY": "your_fred_api_key"
}
}
}
}HTTP mode (remote)
Supported clients: Trae, Cherry Studio, and other clients with HTTP transport support.
Free demo on ModelScope (no FRED):
{
"mcpServers": {
"cnbs": {
"url": "https://mcp.api-inference.modelscope.net/c2ca6ece4e9946/mcp"
}
}
}HTTP mode with FRED:
{
"mcpServers": {
"cnbs": {
"url": "https://your-cnbs-server/mcp",
"headers": {
"X-Fred-Api-Key": "your_fred_api_key"
}
}
}
}Free public demo by Alibaba Cloud ModelScope. No auth required.
For production use, deploy your own instance.
HTTP Endpoints
Endpoint | Method | Description |
| POST | Streamable HTTP — initialize session or send requests |
| GET | SSE notification stream (requires |
| DELETE | Terminate session (requires |
| GET | Legacy SSE mode |
| POST | Legacy SSE messages |
Tools
NBS Core Query
Tool | Description |
| Search by keyword, returns latest value — start here |
| Batch search multiple keywords in one call |
| One-shot snapshot of 10 key Chinese macro indicators (GDP, CPI, PPI, PMI, unemployment, industrial output, retail sales, fixed investment, trade, M2) |
| Compare data across regions or time periods |
| Get category tree nodes — accepts one or multiple categories |
| Get indicator list — accepts one or multiple |
| Get time series data |
| Recursively get all leaf nodes |
NBS Reference
Tool | Description |
| Full tool guide (useful for LLMs to self-orient) |
| Region codes and names (GB/T 2260) |
| NBS category codes |
| All available data sources with tool mappings |
| Fetch data from any named source |
| Categories for a given source |
| Search within a specific source |
World Bank
Tool | Description |
| Query a single indicator across countries and years |
| Query multiple indicators at once |
| List all supported World Bank indicators |
IMF
Tool | Description |
| Query IMF WEO data — accepts one or multiple indicators |
| List supported IMF indicators |
| Full IMF DataMapper indicator catalog |
OECD
Tool | Description |
| Query OECD SDMX data by dataset and key |
| List supported OECD datasets |
BIS
Tool | Description |
| Query BIS statistics — accepts one or multiple countries |
| List supported BIS datasets with key templates |
FRED (Federal Reserve)
Tool | Description |
| Query FRED series — accepts one or multiple series |
| List all supported FRED series |
China Extended Sources
Tool | Description |
| NBS census data (population, economic, agriculture) |
| NBS department statistics by ministry |
| All department categories and indicator keywords |
Cross-Source Comparison
Tool | Description |
| Simultaneously query World Bank + IMF for the same indicator across countries |
Quick Examples
China Economy At a Glance
// Full macro snapshot in one call
cnbs_economic_snapshot()
// Latest single indicator
cnbs_search(keyword="GDP")
// Batch indicators
cnbs_batch_search(keywords=["GDP", "CPI", "城镇化率", "出生率"])
// Regional comparison
cnbs_compare(keyword="GDP", regions=["北京", "上海", "广东"], compareType="region")
// Time series
cnbs_fetch_series(setId="...", metricIds=["..."], periods=["2015YY-2024YY"])International Comparison
// China GDP growth vs peers (World Bank)
ext_world_bank(indicator="GDP_GROWTH", countries=["CHN","USA","DEU","JPN","IND"], startYear=2015)
// Multiple indicators for China
ext_world_bank_multi(indicators=["GDP_GROWTH","CPI","UNEMPLOYMENT"], countries=["CHN"], startYear=2010)
// IMF: single indicator
ext_imf(indicators="GDP_GROWTH", countries=["CHN","USA","JPN"], periods=["2022","2023","2024","2025"])
// IMF: multiple indicators in one call
ext_imf(indicators=["GDP_GROWTH","CPI_INFLATION","GOVT_DEBT"], countries=["CHN","USA"], periods=["2020","2021","2022","2023","2024"])
// World Bank + IMF side-by-side
ext_global_compare(wbIndicator="GDP_GROWTH", imfIndicator="GDP_GROWTH", countries=["CHN","USA","DEU","JPN"])BIS & FRED
// BIS: single country
ext_bis(dataset="EER", countries="CN", lastNObservations=36)
// BIS: multiple countries in one call
ext_bis(dataset="EER", countries=["CN","US","DE","JP"], lastNObservations=24)
// BIS: credit gap
ext_bis(dataset="CREDIT_GAP", countries=["CN","US"], lastNObservations=20)
// FRED: single series
ext_fred(series="OIL_PRICE_WTI", limit=100, sortOrder="desc")
// FRED: multiple series in one call
ext_fred(series=["FED_FUNDS","CNY_USD","OIL_PRICE_WTI","GOLD_PRICE"], limit=30, sortOrder="desc")NBS Census & Departments
// 2020 Population census
ext_cn_census(type="population")
// PBoC M2 monetary data
ext_cn_department(department="monetary", indicator="M2货币供应量")
// All finance ministry indicators
ext_cn_department(department="finance", fetchAll=true)NBS Category Codes
Code | Category | Typical Indicators |
1 | Monthly | CPI, PPI, Industrial Output, PMI |
2 | Quarterly | GDP quarterly growth |
3 | Annual | GDP, population, urbanization rate |
5 | Provincial Quarterly | Provincial GDP by quarter |
6 | Provincial Annual | Provincial GDP, population by year |
7 | Other / Surveys | Household surveys, special surveys |
NBS Time Format
Annual:
2024YY, range["2020YY-2024YY"]Quarterly:
2024A/B/C/D(A=Q1, B=Q2, C=Q3, D=Q4), shortcutsLAST6/LAST12/LAST18Monthly:
202401MM, range["202301MM-202412MM"]
NBS Region Codes
Follows GB/T 2260 standard. Use cnbs_get_regions for the full list.
Region | Code |
National |
|
Beijing |
|
Shanghai |
|
Guangdong |
|
Zhejiang |
|
Jiangsu |
|
Authentication
No authentication required by default. Enable Bearer token auth:
stdio / HTTP mode
npx mcp-cnbs --port 12345 --auth-token your-secret-token
# or via env var
MCP_CNBS_AUTH_TOKEN=your-secret-token npx mcp-cnbs --port 12345Requests must then include:
Authorization: Bearer your-secret-tokenCloudflare Workers
npx wrangler secret put MCP_CNBS_AUTH_TOKENDevelopment
npm install
npm run build
npm run startRequirements
Node.js >= 18.0.0
Network access to
data.stats.gov.cn,api.worldbank.org,www.imf.org,sdmx.oecd.org,stats.bis.org,api.stlouisfed.org
License
MIT
Available Tools
31 toolscnbs_batch_searchBatch Search CNBS DataARead-onlyIdempotent
批量搜索多个关键词的统计数据。一次性查询多个指标,提高效率。
Args:
keywords (string[]): 搜索关键词数组,如 ["GDP", "CPI", "人口"]
pageSize (number): 每个关键词返回的结果数量,默认5
Returns: 按关键词分组的搜索结果
示例: cnbs_batch_search(keywords=["GDP", "CPI", "出生率"]) 返回三个关键词各自的搜索结果
| Name | Required | Description | Default |
|---|---|---|---|
| keywords | Yes | 搜索关键词数组 | |
| pageSize | No | 每个关键词返回的结果数量 |
cnbs_compareCompare CNBS DataARead-onlyIdempotent
对比不同地区或不同时间的数据。支持地区对比和时间对比。
Args:
keyword (string): 搜索关键词
regions (string[]): 要对比的地区名称数组,如 ["北京", "上海", "广东"]
compareType (string): 对比类型,"region"(地区对比)或 "time"(时间对比)
years (string[]): 时间对比时的年份数组,如 ["2022", "2023", "2024"]
Returns: 对比结果表格
示例:
地区对比:cnbs_compare(keyword="GDP", regions=["北京", "上海"], compareType="region")
时间对比:cnbs_compare(keyword="GDP", compareType="time", years=["2022", "2023", "2024"])
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | 搜索关键词 | |
| regions | No | 要对比的地区名称数组 | |
| compareType | No | 对比类型 | region |
| years | No | 时间对比时的年份数组 |
cnbs_economic_snapshotChina Economic SnapshotARead-onlyIdempotent
一次性获取中国当前核心宏观经济指标的最新值,覆盖 GDP、CPI、PPI、PMI、失业率、工业、消费、投资、贸易、货币供应。 适合需要快速了解中国经济全貌的场景,避免多次单独调用 cnbs_search。
Returns: 10 项核心指标的最新值及元数据(指标名、值、单位、时间)
示例: cnbs_economic_snapshot()
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
cnbs_fetch_data_from_sourceFetch Data from Specific SourceARead-onlyIdempotent
从特定数据源获取数据,支持扩展数据源。
Args:
source (string): 数据源名称,如 "cnbs"、"census"、"international"、"department"
params (object): 数据源特定的参数
Returns: 数据源返回的数据
⚠️ FRED 注意:通过此工具调用 source="fred" 时,仅支持 FRED_API_KEY 环境变量,不支持 X-Fred-Api-Key 请求头。HTTP 模式请改用专用工具 ext_fred。
示例: cnbs_fetch_data_from_source(source="cnbs", params={keyword: "GDP"}) cnbs_fetch_data_from_source(source="census", params={type: "population", year: "2020"}) cnbs_fetch_data_from_source(source="international", params={source: "world_bank", indicator: "GDP", country: "CHN"}) cnbs_fetch_data_from_source(source="department", params={department: "finance", indicator: "财政收入", period: "2024Q1"})
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | 数据源名称 | |
| params | Yes | 数据源特定的参数 |
cnbs_fetch_end_nodesFetch CNBS End NodesARead-onlyIdempotent
递归获取指定分类代码下所有叶子节点(setId)。注意:耗时长,不建议频繁使用。
Args:
category (string): 分类代码:1月度 2季度 3年度 5分省季度 6分省年度 7其他
Returns: 所有叶子节点列表
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | 分类代码:1月度 2季度 3年度 5分省季度 6分省年度 7其他 |
cnbs_fetch_metricsFetch CNBS MetricsARead-onlyIdempotent
根据数据集ID (setId) 获取所有可用指标列表。支持同时查询多个数据集。
Args:
setIds (string | string[]): 单个或多个数据集ID,来自 cnbs_search 或 cnbs_fetch_nodes 的 isEnd=true 节点
name (string): 指标名称过滤(可选,单个 setId 时有效)
Returns: 指标列表,多个 setId 时返回按 setId 分组的结果
| Name | Required | Description | Default |
|---|---|---|---|
| setIds | Yes | 单个或多个数据集ID | |
| name | No | 指标名称过滤(可选) |
cnbs_fetch_nodesFetch CNBS NodesARead-onlyIdempotent
获取中国国家统计局分类树节点。支持同时查询多个分类。isEnd=true 的节点 id 即为 setId。
Args:
categories (string | string[]): 单个或多个分类代码,如 "3" 或 ["1","2","3"](1月度 2季度 3年度 5分省季度 6分省年度 7其他)
parentId (string): 父节点ID,空或省略表示从根节点开始(单分类时有效)
Returns: 分类树节点列表,多个分类时返回按分类代码分组的结果
| Name | Required | Description | Default |
|---|---|---|---|
| categories | Yes | 单个或多个分类代码,如 "3" 或 ["1","2","3"] | |
| parentId | No | 父节点ID,空或省略表示从根节点开始 |
cnbs_fetch_seriesFetch CNBS SeriesBRead-onlyIdempotent
批量获取统计指标数据。支持多个指标ID、多个时间段、多地区。
Args:
setId (string): 数据集ID
metricIds (string[]): 指标ID数组
periods (string[]): 时间范围数组,如 ["202501MM-202503MM"] 或 ["2023YY-2025YY"]
areas (array): 地区维度,默认全国
rootId (string): 根节点ID,月度数据默认为 fc982599aa684be7969d7b90b1bd0e84
Returns: 统计数据点列表
| Name | Required | Description | Default |
|---|---|---|---|
| setId | Yes | 数据集ID | |
| metricIds | Yes | 指标ID数组 | |
| periods | Yes | 时间范围数组,如 ["202501MM-202503MM"] 或 ["2023YY-2025YY"] | |
| areas | No | 地区维度,默认全国 | |
| rootId | No | 根节点ID,月度数据默认为 fc982599aa684be7969d7b90b1bd0e84 |
cnbs_get_categoriesGet CNBS CategoriesARead-onlyIdempotent
获取所有数据分类信息,包括分类代码、名称和时间粒度。
Returns: 分类列表,包含代码、名称、时间粒度类型
示例返回:
代码 1:月度数据(CPI、PPI等)
代码 2:季度数据(GDP季度值等)
代码 3:年度数据(GDP年度值、人口等)
代码 6:分省年度数据
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
cnbs_get_guideGet CNBS MCP GuideARead-onlyIdempotent
获取本 MCP 服务器的使用指南,包括工具列表、使用建议和重要提示。建议首次使用时调用此工具了解如何正确使用其他工具。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
cnbs_get_regionsGet CNBS RegionsARead-onlyIdempotent
获取可用的地区列表,用于分省数据查询。返回地区代码和名称列表。
Args:
keyword (string): 搜索关键词,可选,用于过滤地区
level (string): 地区级别过滤,可选:province(省级)、city(市级)、county(县级)
Returns: 地区列表,包含 code(地区代码)、name(全称)、shortName(简称)
示例:
不传参数:返回所有省份
keyword="广东":返回广东省
keyword="江":返回名称包含"江"的省份(江苏、浙江等)
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | No | 搜索关键词,如 "广东"、"北京" | |
| level | No | 地区级别过滤 |
cnbs_get_source_categoriesGet Source CategoriesARead-onlyIdempotent
获取特定数据源的分类信息。
Args:
source (string): 数据源名称,如 "census"、"international"、"department"
Returns: 数据源的分类信息
示例: cnbs_get_source_categories(source="census") cnbs_get_source_categories(source="international")
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | 数据源名称 |
cnbs_list_data_sourcesList CNBS Data SourcesARead-onlyIdempotent
列出所有可用的数据源,包括国家统计局数据、普查数据、国际数据等。
Returns: 数据源列表,包括名称、描述、状态等信息
示例: cnbs_list_data_sources()
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
cnbs_searchSearch CNBS DataARead-onlyIdempotent
通过关键词搜索中国国家统计局指标和数据(推荐优先使用)。返回匹配的数据集列表,包含 setId、名称、时间范围等信息。
Args:
keyword (string): 搜索关键词,如 "GDP"、"CPI"、"人口"
pageNum (number): 页码,默认1
pageSize (number): 每页数量,默认10
sortBy (string): 排序方式,可选 relevance(相关性)或 time(时间)
sortOrder (string): 排序顺序,可选 desc(降序)或 asc(升序)
categories (string[]): 数据类型过滤,如 ["月度数据", "季度数据"]
periodRange (object): 时间范围过滤
Returns: 匹配的数据集列表,包含 setId、名称、时间范围等信息
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | 搜索关键词,如 "GDP"、"CPI"、"人口" | |
| pageNum | No | 页码,默认1 | |
| pageSize | No | 每页数量,默认10 | |
| sortBy | No | 排序方式,可选 relevance(相关性)或 time(时间) | relevance |
| sortOrder | No | 排序顺序,可选 desc(降序)或 asc(升序) | desc |
| categories | No | 数据类型过滤,如 ["月度数据", "季度数据"] | |
| periodRange | No | 时间范围过滤 |
cnbs_search_in_sourceSearch in Specific SourceCRead-onlyIdempotent
在特定数据源中搜索数据。
Args:
source (string): 数据源名称,如 "census"、"international"、"department"
keyword (string): 搜索关键词
Returns: 搜索结果
示例: cnbs_search_in_source(source="census", keyword="人口") cnbs_search_in_source(source="international", keyword="GDP")
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | 数据源名称 | |
| keyword | Yes | 搜索关键词 |
ext_bisBIS Statistics QueryARead-onlyIdempotent
查询国际清算银行 (BIS) 统计数据。涵盖有效汇率、信贷缺口、住宅房价、债务偿还比率等金融稳定指标。支持同时查询多个国家。完全免费,无需认证。
Args:
dataset (string): 数据集名,如 "EER"(有效汇率)、"CREDIT_GAP"(信贷缺口)、"PROPERTY_PRICES"(房价)
countries (string | string[]): 单个或多个 ISO2 代码,如 "CN" 或 ["CN","US","DE"];默认 "CN"
lastNObservations (number): 最近 N 期,默认 20
startPeriod (string): 起始期间,如 "2015-Q1" 或 "2015-01"
预置数据集: EER | CREDIT_GAP | TOTAL_CREDIT | PROPERTY_PRICES | DEBT_SERVICE | CROSS_BORDER_BANKING
| Name | Required | Description | Default |
|---|---|---|---|
| dataset | Yes | 数据集: EER | CREDIT_GAP | TOTAL_CREDIT | PROPERTY_PRICES | DEBT_SERVICE | CROSS_BORDER_BANKING | |
| countries | No | 单个或多个 ISO2 代码,如 "CN" 或 ["CN","US","DE"] | CN |
| key | No | 覆盖默认键模板(高级用法,单国) | |
| lastNObservations | No | 最近 N 期数据 | |
| startPeriod | No | 起始期间,如 "2015-Q1" 或 "2015-01" |
ext_bis_datasetsList BIS DatasetsBRead-onlyIdempotent
列出 BIS 数据源支持的所有预置数据集及键模板。
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | No | 按关键词过滤 |
ext_cn_censusChina NBS Census DataARead-onlyIdempotent
查询国家统计局普查数据(人口普查、经济普查、农业普查)。通过 NBS 官方 API 获取真实数据。
Args:
type (string): 普查类型 "population"(人口)| "economic"(经济)| "agriculture"(农业)
keyword (string): 自定义搜索关键词(可选,覆盖默认)
pageSize (number): 返回结果数,默认 20
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | 普查类型 | population |
| keyword | No | 自定义搜索关键词 | |
| pageSize | No | 返回结果数 |
ext_cn_departmentChina Department StatisticsARead-onlyIdempotent
查询各部门在国家统计局发布的统计数据。涵盖财政、工业、商务、农业、货币金融、社会保障、房地产、能源等。
Args:
department (string): 部门键
indicator (string): 具体指标关键词(可选,不填则用部门默认首个关键词)
pageSize (number): 返回数量,默认 20
fetchAll (boolean): 是否获取该部门所有关键词数据(较慢),默认 false
可用部门: finance(财政)| industry(工业)| trade(商务)| agriculture(农业)| monetary(货币金融)| social_security(社保)| housing(房地产)| energy(能源)
| Name | Required | Description | Default |
|---|---|---|---|
| department | Yes | 部门键 | |
| indicator | No | 具体指标关键词,如 "财政收入" | |
| pageSize | No | 返回数量 | |
| fetchAll | No | 是否获取该部门所有关键词数据 |
ext_cn_department_listList Department CategoriesARead-onlyIdempotent
列出所有可查询的部门及其指标关键词列表。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
ext_fredFRED Economic Data (Federal Reserve)BRead-onlyIdempotent
查询美联储经济数据库 (FRED)。涵盖美国GDP、利率、汇率、通胀、大宗商品价格等 800,000+ 系列。支持同时查询多个系列。 ⚠️ 需要 FRED API Key:在 MCP 客户端配置中添加请求头 X-Fred-Api-Key: <your_key>(在 https://fred.stlouisfed.org/docs/api/api_key.html 免费申请)。stdio 模式可改用 FRED_API_KEY 环境变量。
Args:
series (string | string[]): 单个或多个系列名/FRED代码,如 "FED_FUNDS" 或 ["FED_FUNDS","CNY_USD","OIL_PRICE_WTI"]
limit (number): 每个系列返回数量,默认 100
sortOrder (string): "desc"(最新优先)或 "asc"
observationStart (string): 起始日期,如 "2010-01-01"
常用系列: US_GDP | US_GDP_GROWTH | FED_FUNDS | US_10Y_YIELD | US_2Y_YIELD | CNY_USD | EUR_USD | US_UNEMPLOYMENT | US_CPI | OIL_PRICE_WTI | GOLD_PRICE | US_M2 | SP500 | VIX | DOLLAR_INDEX
| Name | Required | Description | Default |
|---|---|---|---|
| series | Yes | 单个系列名或数组,如 "FED_FUNDS" 或 ["FED_FUNDS","CNY_USD"] | |
| limit | No | 每个系列返回数量 | |
| sortOrder | No | 排序方向 | desc |
| observationStart | No | 起始日期 YYYY-MM-DD | |
| observationEnd | No | 结束日期 YYYY-MM-DD |
ext_fred_seriesList FRED SeriesARead-onlyIdempotent
列出 FRED 数据源支持的所有预置系列(利率、汇率、大宗商品、宏观经济等)。
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | No | 按关键词过滤 |
ext_global_compareGlobal Economic Indicator ComparisonARead-onlyIdempotent
同时从世界银行和 IMF 获取同一指标的多国数据,快速进行国际横向对比。
Args:
wbIndicator (string): 世界银行指标,如 "GDP_GROWTH"
imfIndicator (string): IMF 指标,如 "GDP_GROWTH"
countries (string[]): ISO 代码,如 ["CHN","USA","DEU","JPN","IND"]
startYear (number): 起始年份
| Name | Required | Description | Default |
|---|---|---|---|
| wbIndicator | Yes | 世界银行指标名,如 "GDP_GROWTH" | |
| imfIndicator | No | IMF 指标名,如 "GDP_GROWTH"(不填则只查 WB) | |
| countries | No | ISO3 代码数组 | |
| startYear | No | 起始年份 |
ext_imfIMF DataMapper QueryARead-onlyIdempotent
查询 IMF 世界经济展望 (WEO) 数据。支持 GDP 增速、通胀、失业率、经常账户、政府债务等。支持同时查询多个指标。完全免费,无需认证。
Args:
indicators (string | string[]): 单个或多个指标名/IMF代码,如 "GDP_GROWTH" 或 ["GDP_GROWTH","CPI_INFLATION","GOVT_DEBT"]
countries (string[]): ISO 代码数组,如 ["CHN","USA","JPN"];默认 ["CHN"]
periods (string[]): 年份数组,如 ["2020","2021","2022","2023"];不传则返回全部
常用指标: GDP_GROWTH | GDP_USD | GDP_PER_CAPITA | CPI_INFLATION | UNEMPLOYMENT | CURRENT_ACCOUNT | GOVT_DEBT | GOVT_BALANCE | GROSS_SAVINGS | INVESTMENT | POPULATION
| Name | Required | Description | Default |
|---|---|---|---|
| indicators | Yes | 单个或多个指标名,如 "GDP_GROWTH" 或 ["GDP_GROWTH","CPI_INFLATION"] | |
| countries | No | ISO 代码数组,如 ["CHN","USA"] | |
| periods | No | 年份数组,如 ["2020","2021","2022"] |
ext_imf_all_indicatorsIMF All WEO IndicatorsARead-onlyIdempotent
获取 IMF DataMapper 完整指标目录(直接调用 IMF API)。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
ext_imf_indicatorsList IMF IndicatorsBRead-onlyIdempotent
列出 IMF DataMapper 支持的所有预置指标。
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | No | 按关键词过滤 |
ext_oecdOECD SDMX Data QueryARead-onlyIdempotent
查询 OECD 统计数据(SDMX-JSON)。支持季度GDP、就业、先行指标等。完全免费,无需认证。
Args:
dataset (string): 预置数据集名,如 "QNA_GDP"、"KEI_CPI"、"EMPLOYMENT"
key (string): SDMX 维度键,如 "Q.G20.B1GQ....V.N"(可选,默认 "all",注意数据量可能较大)
startPeriod (string): 起始期间,如 "2015-Q1" 或 "2015-01"
lastNObservations (number): 返回最近 N 期,默认 20
预置数据集: QNA_GDP | KEI_CPI | EMPLOYMENT | TRADE
| Name | Required | Description | Default |
|---|---|---|---|
| dataset | Yes | 预置数据集: QNA_GDP | KEI_CPI | EMPLOYMENT | TRADE,或自定义 agencyId+dataflowId | |
| key | No | SDMX 维度键,默认 "all" | |
| agencyId | No | 自定义 agencyId,与 dataflowId 配合使用 | |
| dataflowId | No | 自定义 dataflowId | |
| startPeriod | No | 起始期间,如 "2015-Q1" | |
| endPeriod | No | 结束期间 | |
| lastNObservations | No | 最近 N 期数据 |
ext_oecd_datasetsList OECD DatasetsARead-onlyIdempotent
列出 OECD 数据源支持的所有预置数据集。
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | No | 按关键词过滤 |
ext_world_bankWorld Bank Open DataARead-onlyIdempotent
查询世界银行开放数据。支持 GDP、CPI、贸易、人口、失业率等全球 200+ 国家数据。完全免费,无需认证。
Args:
indicator (string): 指标名(如 "GDP"、"CPI"、"UNEMPLOYMENT")或 WB 指标代码(如 "NY.GDP.MKTP.CD")
countries (string[]): ISO3 国家代码数组,如 ["CHN","USA","JPN"];默认 ["CHN"]
startYear (number): 起始年份,默认 2000
endYear (number): 结束年份,默认当前年
常用指标: GDP | GDP_GROWTH | GDP_PER_CAPITA | CPI | UNEMPLOYMENT | POPULATION | EXPORTS | IMPORTS | FDI_INFLOWS | GOVT_DEBT | GINI | LIFE_EXPECTANCY | CO2_EMISSIONS | CURRENT_ACCOUNT
| Name | Required | Description | Default |
|---|---|---|---|
| indicator | Yes | 指标名如 "GDP" 或 WB 代码如 "NY.GDP.MKTP.CD" | |
| countries | No | ISO3 代码数组,如 ["CHN","USA"] | |
| startYear | No | 起始年份 | |
| endYear | No | 结束年份,默认当前年 |
ext_world_bank_indicatorsList World Bank IndicatorsARead-onlyIdempotent
列出世界银行数据源支持的所有预置指标及其代码和说明。
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | No | 按关键词过滤 |
ext_world_bank_multiWorld Bank Multi-Indicator QueryARead-onlyIdempotent
同时查询世界银行多个指标,跨国对比。
Args:
indicators (string[]): 指标数组,如 ["GDP_GROWTH","CPI","UNEMPLOYMENT"]
countries (string[]): ISO3 代码数组,如 ["CHN","USA","DEU"]
startYear (number): 起始年份
endYear (number): 结束年份
| Name | Required | Description | Default |
|---|---|---|---|
| indicators | Yes | 指标数组 | |
| countries | No | ISO3 代码数组 | |
| startYear | No | 起始年份 | |
| endYear | No | 结束年份 |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
31 tool updates
v1.1.0- First observed
cnbs_batch_search - First observed
cnbs_compare - First observed
cnbs_economic_snapshot - First observed
cnbs_fetch_data_from_source - First observed
cnbs_fetch_end_nodes - First observed
cnbs_fetch_metrics - First observed
cnbs_fetch_nodes - First observed
cnbs_fetch_series - First observed
cnbs_get_categories - First observed
cnbs_get_guide - First observed
cnbs_get_regions - First observed
cnbs_get_source_categories - First observed
cnbs_list_data_sources - First observed
cnbs_search - First observed
cnbs_search_in_source - First observed
ext_bis - First observed
ext_bis_datasets - First observed
ext_cn_census - First observed
ext_cn_department - First observed
ext_cn_department_list - First observed
ext_fred - First observed
ext_fred_series - First observed
ext_global_compare - First observed
ext_imf - First observed
ext_imf_all_indicators - First observed
ext_imf_indicators - First observed
ext_oecd - First observed
ext_oecd_datasets - First observed
ext_world_bank - First observed
ext_world_bank_indicators - First observed
ext_world_bank_multi
TDQS
Scored across 31 tools
Most tools have clearly distinct purposes, but there is some overlap between cnbs_search and cnbs_batch_search (both search by keyword), and between cnbs_fetch_data_from_source and the dedicated ext_* tools. Detailed descriptions help differentiate, but agents might still confuse similar functions.
The cnbs_ tools mix verbs inconsistently: fetch_, get_, list_, search_. The ext_ tools follow a more consistent pattern (ext_<source>_<action>). This inconsistency may confuse agents expecting a uniform naming convention.
With 31 tools, the server exceeds the recommended range (3-15). While each tool serves a distinct purpose, the high number can overwhelm agents and increase selection difficulty. A more streamlined surface would improve coherence.
The tool set covers a comprehensive range of data retrieval operations: search, browse hierarchies, batch queries, comparisons, and dedicated access to major international sources (BIS, IMF, OECD, World Bank, FRED). There are no obvious gaps for the stated domain of Chinese and global economic data.
Related MCP Connectors
Macroeconomic and other official data from 170+ publishers, resolved from natural language with provenance.
Structured Chinese official data for AI agents: 426 entries, JSON-LD, read-only. find/get/list
Query official statistics through MCP, with periods, places and citable sources in every answer.
Official economic statistics for AI agents: GDP, inflation, trade and debt for 150+ countries.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides real-time quotes, fund flows, and corporate announcements for Chinese A-share stocks. It enables users to search for stocks, analyze financial indicators, and summarize quarterly reports through natural language.-
- AlicenseNot gradedqualityDmaintenanceEnables users to query Chinese A-share stock data, including stock basics, historical prices, financial reports, and macroeconomic indicators.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying statistical data from China NBS, World Bank, IMF, OECD, BIS, census, and department statistics via MCP tools.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables querying China's official foreign exchange reserves, balance of payments, and external debt data from SAFE's English-language data pages, including publication-date metadata for freshness.225 npmMIT