Skip to main content
Glama
CNBS MCP Server
by icen-ai

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)

X-Fred-Api-Key request header

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 the X-Fred-Api-Key request header (HTTP mode) or set FRED_API_KEY env var (stdio mode).


Related MCP server: a-share-mcp

Installation

npx mcp-cnbs

HTTP transport

npx mcp-cnbs --port 12345

Install globally

npm install -g mcp-cnbs
mcp-cnbs

MCP 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

/ or /mcp

POST

Streamable HTTP — initialize session or send requests

/ or /mcp

GET

SSE notification stream (requires Mcp-Session-Id header)

/ or /mcp

DELETE

Terminate session (requires Mcp-Session-Id header)

/sse

GET

Legacy SSE mode

/message

POST

Legacy SSE messages


Tools

NBS Core Query

Tool

Description

cnbs_search

Search by keyword, returns latest value — start here

cnbs_batch_search

Batch search multiple keywords in one call

cnbs_economic_snapshot

One-shot snapshot of 10 key Chinese macro indicators (GDP, CPI, PPI, PMI, unemployment, industrial output, retail sales, fixed investment, trade, M2)

cnbs_compare

Compare data across regions or time periods

cnbs_fetch_nodes

Get category tree nodes — accepts one or multiple categories

cnbs_fetch_metrics

Get indicator list — accepts one or multiple setIds

cnbs_fetch_series

Get time series data

cnbs_fetch_end_nodes

Recursively get all leaf nodes

NBS Reference

Tool

Description

cnbs_get_guide

Full tool guide (useful for LLMs to self-orient)

cnbs_get_regions

Region codes and names (GB/T 2260)

cnbs_get_categories

NBS category codes

cnbs_list_data_sources

All available data sources with tool mappings

cnbs_fetch_data_from_source

Fetch data from any named source

cnbs_get_source_categories

Categories for a given source

cnbs_search_in_source

Search within a specific source

World Bank

Tool

Description

ext_world_bank

Query a single indicator across countries and years

ext_world_bank_multi

Query multiple indicators at once

ext_world_bank_indicators

List all supported World Bank indicators

IMF

Tool

Description

ext_imf

Query IMF WEO data — accepts one or multiple indicators

ext_imf_indicators

List supported IMF indicators

ext_imf_all_indicators

Full IMF DataMapper indicator catalog

OECD

Tool

Description

ext_oecd

Query OECD SDMX data by dataset and key

ext_oecd_datasets

List supported OECD datasets

BIS

Tool

Description

ext_bis

Query BIS statistics — accepts one or multiple countries

ext_bis_datasets

List supported BIS datasets with key templates

FRED (Federal Reserve)

Tool

Description

ext_fred

Query FRED series — accepts one or multiple series

ext_fred_series

List all supported FRED series

China Extended Sources

Tool

Description

ext_cn_census

NBS census data (population, economic, agriculture)

ext_cn_department

NBS department statistics by ministry

ext_cn_department_list

All department categories and indicator keywords

Cross-Source Comparison

Tool

Description

ext_global_compare

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), shortcuts LAST6/LAST12/LAST18

  • Monthly: 202401MM, range ["202301MM-202412MM"]

NBS Region Codes

Follows GB/T 2260 standard. Use cnbs_get_regions for the full list.

Region

Code

National

000000000000

Beijing

110000000000

Shanghai

310000000000

Guangdong

440000000000

Zhejiang

330000000000

Jiangsu

320000000000


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 12345

Requests must then include:

Authorization: Bearer your-secret-token

Cloudflare Workers

npx wrangler secret put MCP_CNBS_AUTH_TOKEN

Development

npm install
npm run build
npm run start

Requirements

  • 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 tools
cnbs_compareCompare CNBS DataA
Read-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"])

NameRequiredDescriptionDefault
keywordYes搜索关键词
regionsNo要对比的地区名称数组
compareTypeNo对比类型region
yearsNo时间对比时的年份数组
cnbs_economic_snapshotChina Economic SnapshotA
Read-onlyIdempotent

一次性获取中国当前核心宏观经济指标的最新值,覆盖 GDP、CPI、PPI、PMI、失业率、工业、消费、投资、贸易、货币供应。 适合需要快速了解中国经济全貌的场景,避免多次单独调用 cnbs_search。

Returns: 10 项核心指标的最新值及元数据(指标名、值、单位、时间)

示例: cnbs_economic_snapshot()

NameRequiredDescriptionDefault

No parameters

cnbs_fetch_data_from_sourceFetch Data from Specific SourceA
Read-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"})

NameRequiredDescriptionDefault
sourceYes数据源名称
paramsYes数据源特定的参数
cnbs_fetch_end_nodesFetch CNBS End NodesA
Read-onlyIdempotent

递归获取指定分类代码下所有叶子节点(setId)。注意:耗时长,不建议频繁使用。

Args:

  • category (string): 分类代码:1月度 2季度 3年度 5分省季度 6分省年度 7其他

Returns: 所有叶子节点列表

NameRequiredDescriptionDefault
categoryYes分类代码:1月度 2季度 3年度 5分省季度 6分省年度 7其他
cnbs_fetch_metricsFetch CNBS MetricsA
Read-onlyIdempotent

根据数据集ID (setId) 获取所有可用指标列表。支持同时查询多个数据集。

Args:

  • setIds (string | string[]): 单个或多个数据集ID,来自 cnbs_search 或 cnbs_fetch_nodes 的 isEnd=true 节点

  • name (string): 指标名称过滤(可选,单个 setId 时有效)

Returns: 指标列表,多个 setId 时返回按 setId 分组的结果

NameRequiredDescriptionDefault
setIdsYes单个或多个数据集ID
nameNo指标名称过滤(可选)
cnbs_fetch_nodesFetch CNBS NodesA
Read-onlyIdempotent

获取中国国家统计局分类树节点。支持同时查询多个分类。isEnd=true 的节点 id 即为 setId。

Args:

  • categories (string | string[]): 单个或多个分类代码,如 "3" 或 ["1","2","3"](1月度 2季度 3年度 5分省季度 6分省年度 7其他)

  • parentId (string): 父节点ID,空或省略表示从根节点开始(单分类时有效)

Returns: 分类树节点列表,多个分类时返回按分类代码分组的结果

NameRequiredDescriptionDefault
categoriesYes单个或多个分类代码,如 "3" 或 ["1","2","3"]
parentIdNo父节点ID,空或省略表示从根节点开始
cnbs_fetch_seriesFetch CNBS SeriesB
Read-onlyIdempotent

批量获取统计指标数据。支持多个指标ID、多个时间段、多地区。

Args:

  • setId (string): 数据集ID

  • metricIds (string[]): 指标ID数组

  • periods (string[]): 时间范围数组,如 ["202501MM-202503MM"] 或 ["2023YY-2025YY"]

  • areas (array): 地区维度,默认全国

  • rootId (string): 根节点ID,月度数据默认为 fc982599aa684be7969d7b90b1bd0e84

Returns: 统计数据点列表

NameRequiredDescriptionDefault
setIdYes数据集ID
metricIdsYes指标ID数组
periodsYes时间范围数组,如 ["202501MM-202503MM"] 或 ["2023YY-2025YY"]
areasNo地区维度,默认全国
rootIdNo根节点ID,月度数据默认为 fc982599aa684be7969d7b90b1bd0e84
cnbs_get_categoriesGet CNBS CategoriesA
Read-onlyIdempotent

获取所有数据分类信息,包括分类代码、名称和时间粒度。

Returns: 分类列表,包含代码、名称、时间粒度类型

示例返回:

  • 代码 1:月度数据(CPI、PPI等)

  • 代码 2:季度数据(GDP季度值等)

  • 代码 3:年度数据(GDP年度值、人口等)

  • 代码 6:分省年度数据

NameRequiredDescriptionDefault

No parameters

cnbs_get_guideGet CNBS MCP GuideA
Read-onlyIdempotent

获取本 MCP 服务器的使用指南,包括工具列表、使用建议和重要提示。建议首次使用时调用此工具了解如何正确使用其他工具。

NameRequiredDescriptionDefault

No parameters

cnbs_get_regionsGet CNBS RegionsA
Read-onlyIdempotent

获取可用的地区列表,用于分省数据查询。返回地区代码和名称列表。

Args:

  • keyword (string): 搜索关键词,可选,用于过滤地区

  • level (string): 地区级别过滤,可选:province(省级)、city(市级)、county(县级)

Returns: 地区列表,包含 code(地区代码)、name(全称)、shortName(简称)

示例:

  • 不传参数:返回所有省份

  • keyword="广东":返回广东省

  • keyword="江":返回名称包含"江"的省份(江苏、浙江等)

NameRequiredDescriptionDefault
keywordNo搜索关键词,如 "广东"、"北京"
levelNo地区级别过滤
cnbs_get_source_categoriesGet Source CategoriesA
Read-onlyIdempotent

获取特定数据源的分类信息。

Args:

  • source (string): 数据源名称,如 "census"、"international"、"department"

Returns: 数据源的分类信息

示例: cnbs_get_source_categories(source="census") cnbs_get_source_categories(source="international")

NameRequiredDescriptionDefault
sourceYes数据源名称
cnbs_list_data_sourcesList CNBS Data SourcesA
Read-onlyIdempotent

列出所有可用的数据源,包括国家统计局数据、普查数据、国际数据等。

Returns: 数据源列表,包括名称、描述、状态等信息

示例: cnbs_list_data_sources()

NameRequiredDescriptionDefault

No parameters

cnbs_search_in_sourceSearch in Specific SourceC
Read-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")

NameRequiredDescriptionDefault
sourceYes数据源名称
keywordYes搜索关键词
ext_bisBIS Statistics QueryA
Read-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

NameRequiredDescriptionDefault
datasetYes数据集: EER | CREDIT_GAP | TOTAL_CREDIT | PROPERTY_PRICES | DEBT_SERVICE | CROSS_BORDER_BANKING
countriesNo单个或多个 ISO2 代码,如 "CN" 或 ["CN","US","DE"]CN
keyNo覆盖默认键模板(高级用法,单国)
lastNObservationsNo最近 N 期数据
startPeriodNo起始期间,如 "2015-Q1" 或 "2015-01"
ext_bis_datasetsList BIS DatasetsB
Read-onlyIdempotent

列出 BIS 数据源支持的所有预置数据集及键模板。

NameRequiredDescriptionDefault
keywordNo按关键词过滤
ext_cn_censusChina NBS Census DataA
Read-onlyIdempotent

查询国家统计局普查数据(人口普查、经济普查、农业普查)。通过 NBS 官方 API 获取真实数据。

Args:

  • type (string): 普查类型 "population"(人口)| "economic"(经济)| "agriculture"(农业)

  • keyword (string): 自定义搜索关键词(可选,覆盖默认)

  • pageSize (number): 返回结果数,默认 20

NameRequiredDescriptionDefault
typeNo普查类型population
keywordNo自定义搜索关键词
pageSizeNo返回结果数
ext_cn_departmentChina Department StatisticsA
Read-onlyIdempotent

查询各部门在国家统计局发布的统计数据。涵盖财政、工业、商务、农业、货币金融、社会保障、房地产、能源等。

Args:

  • department (string): 部门键

  • indicator (string): 具体指标关键词(可选,不填则用部门默认首个关键词)

  • pageSize (number): 返回数量,默认 20

  • fetchAll (boolean): 是否获取该部门所有关键词数据(较慢),默认 false

可用部门: finance(财政)| industry(工业)| trade(商务)| agriculture(农业)| monetary(货币金融)| social_security(社保)| housing(房地产)| energy(能源)

NameRequiredDescriptionDefault
departmentYes部门键
indicatorNo具体指标关键词,如 "财政收入"
pageSizeNo返回数量
fetchAllNo是否获取该部门所有关键词数据
ext_cn_department_listList Department CategoriesA
Read-onlyIdempotent

列出所有可查询的部门及其指标关键词列表。

NameRequiredDescriptionDefault

No parameters

ext_fredFRED Economic Data (Federal Reserve)B
Read-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

NameRequiredDescriptionDefault
seriesYes单个系列名或数组,如 "FED_FUNDS" 或 ["FED_FUNDS","CNY_USD"]
limitNo每个系列返回数量
sortOrderNo排序方向desc
observationStartNo起始日期 YYYY-MM-DD
observationEndNo结束日期 YYYY-MM-DD
ext_fred_seriesList FRED SeriesA
Read-onlyIdempotent

列出 FRED 数据源支持的所有预置系列(利率、汇率、大宗商品、宏观经济等)。

NameRequiredDescriptionDefault
keywordNo按关键词过滤
ext_global_compareGlobal Economic Indicator ComparisonA
Read-onlyIdempotent

同时从世界银行和 IMF 获取同一指标的多国数据,快速进行国际横向对比。

Args:

  • wbIndicator (string): 世界银行指标,如 "GDP_GROWTH"

  • imfIndicator (string): IMF 指标,如 "GDP_GROWTH"

  • countries (string[]): ISO 代码,如 ["CHN","USA","DEU","JPN","IND"]

  • startYear (number): 起始年份

NameRequiredDescriptionDefault
wbIndicatorYes世界银行指标名,如 "GDP_GROWTH"
imfIndicatorNoIMF 指标名,如 "GDP_GROWTH"(不填则只查 WB)
countriesNoISO3 代码数组
startYearNo起始年份
ext_imfIMF DataMapper QueryA
Read-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

NameRequiredDescriptionDefault
indicatorsYes单个或多个指标名,如 "GDP_GROWTH" 或 ["GDP_GROWTH","CPI_INFLATION"]
countriesNoISO 代码数组,如 ["CHN","USA"]
periodsNo年份数组,如 ["2020","2021","2022"]
ext_imf_all_indicatorsIMF All WEO IndicatorsA
Read-onlyIdempotent

获取 IMF DataMapper 完整指标目录(直接调用 IMF API)。

NameRequiredDescriptionDefault

No parameters

ext_imf_indicatorsList IMF IndicatorsB
Read-onlyIdempotent

列出 IMF DataMapper 支持的所有预置指标。

NameRequiredDescriptionDefault
keywordNo按关键词过滤
ext_oecdOECD SDMX Data QueryA
Read-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

NameRequiredDescriptionDefault
datasetYes预置数据集: QNA_GDP | KEI_CPI | EMPLOYMENT | TRADE,或自定义 agencyId+dataflowId
keyNoSDMX 维度键,默认 "all"
agencyIdNo自定义 agencyId,与 dataflowId 配合使用
dataflowIdNo自定义 dataflowId
startPeriodNo起始期间,如 "2015-Q1"
endPeriodNo结束期间
lastNObservationsNo最近 N 期数据
ext_oecd_datasetsList OECD DatasetsA
Read-onlyIdempotent

列出 OECD 数据源支持的所有预置数据集。

NameRequiredDescriptionDefault
keywordNo按关键词过滤
ext_world_bankWorld Bank Open DataA
Read-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

NameRequiredDescriptionDefault
indicatorYes指标名如 "GDP" 或 WB 代码如 "NY.GDP.MKTP.CD"
countriesNoISO3 代码数组,如 ["CHN","USA"]
startYearNo起始年份
endYearNo结束年份,默认当前年
ext_world_bank_indicatorsList World Bank IndicatorsA
Read-onlyIdempotent

列出世界银行数据源支持的所有预置指标及其代码和说明。

NameRequiredDescriptionDefault
keywordNo按关键词过滤
ext_world_bank_multiWorld Bank Multi-Indicator QueryA
Read-onlyIdempotent

同时查询世界银行多个指标,跨国对比。

Args:

  • indicators (string[]): 指标数组,如 ["GDP_GROWTH","CPI","UNEMPLOYMENT"]

  • countries (string[]): ISO3 代码数组,如 ["CHN","USA","DEU"]

  • startYear (number): 起始年份

  • endYear (number): 结束年份

NameRequiredDescriptionDefault
indicatorsYes指标数组
countriesNoISO3 代码数组
startYearNo起始年份
endYearNo结束年份

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 31 tool updatesv1.1.0
    • First observedcnbs_batch_search
    • First observedcnbs_compare
    • First observedcnbs_economic_snapshot
    • First observedcnbs_fetch_data_from_source
    • First observedcnbs_fetch_end_nodes
    • First observedcnbs_fetch_metrics
    • First observedcnbs_fetch_nodes
    • First observedcnbs_fetch_series
    • First observedcnbs_get_categories
    • First observedcnbs_get_guide
    • First observedcnbs_get_regions
    • First observedcnbs_get_source_categories
    • First observedcnbs_list_data_sources
    • First observedcnbs_search
    • First observedcnbs_search_in_source
    • First observedext_bis
    • First observedext_bis_datasets
    • First observedext_cn_census
    • First observedext_cn_department
    • First observedext_cn_department_list
    • First observedext_fred
    • First observedext_fred_series
    • First observedext_global_compare
    • First observedext_imf
    • First observedext_imf_all_indicators
    • First observedext_imf_indicators
    • First observedext_oecd
    • First observedext_oecd_datasets
    • First observedext_world_bank
    • First observedext_world_bank_indicators
    • First observedext_world_bank_multi

TDQS

A3.6/5.0

Scored across 31 tools

Disambiguation4/5

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.

Naming Consistency3/5

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.

Tool Count2/5

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.

Completeness5/5

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

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides 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.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables users to query Chinese A-share stock data, including stock basics, historical prices, financial reports, and macroeconomic indicators.
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables 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 npm
    MIT