Skip to main content
Glama
huajibing

CHGIS MCP Server

by huajibing

CHGIS MCP Server

CHGIS (China Historical Geographic Information System) 时空地名查询API的MCP (Model Context Protocol) 服务器wrapper。

功能特性

这个MCP服务器提供了对CHGIS历史地名数据库的访问功能,包括:

工具列表

  1. search_place_by_id - 根据唯一ID精准查询地名

    • 输入:地名ID(格式:hvd_数字)

    • 输出:详细的地名信息,包括历史名称、行政区划、时间跨度、地理位置等

  2. search_places - 分面搜索地名

    • 支持多参数组合搜索:

      • name: 地名(中文、拼音等)

      • year: 历史年份(-222 至 1911)

      • feature_type: 行政等级类型(州、县、府等)

      • parent: 上级地名

      • source: 数据来源(CHGIS、RAS)

    • 支持多种输出格式(JSON、XML、HTML)

  3. get_place_historical_context - 获取地名历史沿革

    • 输入:地名ID

    • 输出:详细的历史隶属关系、下辖单位、时间变迁等信息

Related MCP server: SQLite Geography Server

安装和使用

前置要求

  • Node.js >= 18.0.0

  • npm 或 yarn

安装步骤

  1. 克隆或下载此项目

  2. 安装依赖:

    npm install

在Claude Code中配置

在Claude Code的配置文件中添加此MCP服务器:

{
  "mcpServers": {
    "chgis": {
      "command": "node",
      "args": ["/path/to/your/chgis-mcp-server/src/index.js"]
    }
  }
}

启动服务器

npm start

使用示例

1. 根据ID查询地名

// 查询婺州(hvd_32180)的详细信息
search_place_by_id({
  id: "hvd_32180",
  format: "json"
})

2. 分面搜索地名

// 搜索名称包含"晋阳"的地名
search_places({
  name: "晋阳",
  format: "json"
})

// 搜索1820年的县级行政单位
search_places({
  year: 1820,
  feature_type: "xian",
  format: "json"
})

// 多参数搜索
search_places({
  name: "庆",
  feature_type: "xian",
  year: 1420,
  parent: "Chuzhou",
  format: "json"
})

3. 获取历史沿革信息

// 获取婺州的历史沿革
get_place_historical_context({
  id: "hvd_32180"
})

数据结构说明

地名详细信息包含

  • 基本信息:系统ID、URI、数据来源、许可证

  • 拼写信息:多种文字的历史名称(繁体中文、简体中文、拼音等)

  • 行政类型:行政等级名称和英文翻译

  • 时间跨度:起始年份、结束年份

  • 地理位置:经纬度坐标、现今位置

搜索结果包含

  • 查询统计:显示结果数、总结果数

  • 地名列表:每个地名的基本信息和详情链接

历史沿革包含

  • 历史名称:不同时期的历史名称

  • 时间跨度:存在的时间范围

  • 隶属关系:不同历史时期的上级单位

  • 下辖单位:管辖的下级行政单位及其时间范围

API限制和注意事项

  1. 网络依赖:此MCP服务器需要访问 http://tgaz.fudan.edu.cn 的CHGIS API

  2. 时间范围:数据库中的历史年份范围为 -222 至 1911

  3. ID格式:地名ID格式必须为 hvd_ 开头加数字(如 hvd_32180

  4. 字符编码:支持UTF-8编码的中文字符,无需URL编码

  5. 数据来源:主要来自CHGIS项目和RAS数据

错误处理

  • 无效ID格式:会提示正确的ID格式

  • 未找到记录:当搜索无结果时会返回相应提示

  • 网络错误:会显示网络连接相关的错误信息

  • 参数验证:会验证输入参数的有效性

数据来源

Available Tools

3 tools
get_place_historical_contextB

Get historical context and hierarchical relationships of a place

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesPlace unique ID (format: hvd_numbers)

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves historical context and relationships, implying a read-only operation, but doesn't specify details like response format, error handling, or any constraints (e.g., rate limits, authentication needs). This leaves significant gaps in understanding how the tool behaves beyond its basic purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently conveys the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse and understand quickly, with no wasted information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (simple single-parameter retrieval), high schema coverage (100%), and lack of output schema, the description is minimally adequate. It covers the basic purpose but lacks details on behavioral aspects and usage context, which are important for an agent to invoke it correctly without annotations or output schema to fill in gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'id' parameter well-documented in the schema itself (format: hvd_numbers, pattern: ^hvd_\d+$). The description adds no additional meaning beyond what the schema provides, such as examples or context for the ID, so it meets the baseline for high schema coverage without compensating with extra insights.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'historical context and hierarchical relationships of a place', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'search_place_by_id' or 'search_places', which might also retrieve place information but with different scopes or outputs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing a place ID, or compare it to sibling tools like 'search_place_by_id' or 'search_places', leaving the agent to infer usage context without explicit direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_place_by_idB

Query historical place details by unique ID

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesPlace unique ID (format: hvd_numbers, e.g., hvd_32180)
formatNoReturn data formatjson

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a query operation ('Query historical place details'), implying it's read-only, but doesn't mention other important behaviors like rate limits, authentication requirements, error handling, or what 'historical' entails. The description adds minimal context beyond the basic operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point with zero wasted words. It's perfectly front-loaded with the core functionality immediately clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read operation with good schema coverage but no annotations or output schema, the description is minimally adequate. It states what the tool does but lacks important context about behavioral traits, differentiation from siblings, and what 'historical place details' actually returns. The absence of output schema means the description should ideally hint at return values.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description doesn't add any parameter semantics beyond what's already in the schema, which has 100% coverage with clear descriptions for both parameters. The baseline score of 3 is appropriate since the schema does all the work, though the description could have explained why the ID format matters or when to use different formats.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Query historical place details') and resource ('by unique ID'), making the tool's purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'search_places' or 'get_place_historical_context', which likely have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'search_places' or 'get_place_historical_context'. It mentions 'by unique ID' which implies usage when you have a specific ID, but doesn't explicitly state this as a guideline or mention exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_placesC

Search places by name, year, administrative level, etc.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNoPlace name (supports Chinese, Pinyin, etc.)
yearNoHistorical year (range: -222 to 1911)
feature_typeNoAdministrative level type (e.g., zhou, xian, fu)
parentNoParent place or administrative division
sourceNoData source (e.g., CHGIS, RAS)
formatNoReturn data formatjson

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions search functionality but doesn't describe what the search returns (e.g., list of places, detailed records), pagination behavior, rate limits, authentication requirements, or error conditions. For a search tool with 6 parameters, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core functionality without unnecessary words. It's appropriately sized for a search tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with 6 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the search returns, how results are structured, whether all parameters are optional (as indicated by required: []), or how the search behaves with multiple criteria. The absence of output schema increases the need for return value description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents all 6 parameters. The description mentions the main search criteria but doesn't add meaningful semantic context beyond what's in the schema descriptions (e.g., how parameters interact, search logic). Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'search' and the resource 'places', and lists the main search criteria (name, year, administrative level). However, it doesn't explicitly differentiate this tool from its siblings 'get_place_historical_context' and 'search_place_by_id', which would require a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus the sibling tools 'get_place_historical_context' and 'search_place_by_id'. It mentions search criteria but doesn't indicate when this tool is preferred over alternatives or any prerequisites for use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.0.0
    • First observedget_place_historical_context
    • First observedsearch_place_by_id
    • First observedsearch_places

TDQS

B3.2/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: get_place_historical_context retrieves context and relationships, search_place_by_id queries by ID, and search_places searches by multiple criteria. There is no overlap or ambiguity between these functions.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with snake_case: get_place_historical_context, search_place_by_id, and search_places. The naming is predictable and uniform throughout the set.

Tool Count3/5

With only 3 tools, the server feels thin for a historical geographic information system domain. While the tools cover core querying functions, the scope suggests potential gaps in operations like data creation, updates, or more specialized analyses.

Completeness2/5

The toolset is severely incomplete for a CHGIS server, lacking any CRUD operations beyond querying. There are no tools for creating, updating, or deleting place data, and no lifecycle coverage, which will likely cause agent failures in broader workflows.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enables location-based services through AMap/AutoNavi Maps API including geocoding, weather information, route planning, and POI searches. Supports multiple transportation modes and provides detailed geographic data for Chinese locations.
    12
    3
    Mulan Permissive Software , Version 2
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables exploration of geographical data including countries, cities, states/provinces, and regions through a SQLite database. Supports searches by name, location coordinates, currency, and regional groupings with comprehensive statistical queries.
    6
    -
  • F
    license
    Not graded
    quality
    F
    maintenance
    Enables querying Chinese enterprise business data including company profiles, shareholder information, investments, branch offices, and key personnel through fuzzy search and detailed lookups.
    4
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides a suite of tools for location retrieval and multi-modal route planning within China using the Baidu Maps API. It enables AI agents to perform address-to-coordinate conversions, nearby place searches, and calculate directions for driving, transit, walking, and cycling.
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/huajibing/CHGIS_MCP_Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server