medical-hospital-mcp-server

medical-hospital-mcp-server

Enables hospital search and detail lookup to discover medical institutions and verify campuses, departments, contacts, introductions, and operating entities.

Category
Visit Server

README

医疗:医院信息搜索

该 MCP 服务提供医院搜索和医院详情查询能力,帮助用户发现医疗机构并核验院区、科室、联系方式、医院介绍和运营主体。

主要功能

  • 🏥 医院名称模糊搜索
  • 🏷️ 医院性质、等级和专业类型筛选
  • 📍 省份、城市和院区地址查询
  • 📞 医院联系方式与科室查询
  • 🧾 医院详细介绍和运营主体核验

推荐调用流程

  1. 用户只提供医院名称、地区或等级时,先调用 medical_hospital_search
  2. 从候选结果中确认医院,并取得 hospitalId
  3. 调用 medical_hospital_detail 查询该医院的院区、联系方式、科室和完整介绍。

不要使用医院名称代替 hospitalId 调用详情 Tool,也不要自行构造医院 ID。

服务设计说明

  • 服务仅提供医院信息相关的 2 个只读 Tool。
  • 所有成功响应统一使用 total/resultList 顶层;详情命中时通常 total=1
  • 业务码 10001 查询数据为空 归一化为 total=0resultList=[],不作为系统错误。
  • Tool 不提供在线挂号、诊疗建议、预约、支付或写入能力。

环境要求

  • Python 3.10+
  • 依赖:mcppython-dotenvrequests

本地快速启动

cd medical-hospital-mcp-server
python3 -m venv mcp_env
source mcp_env/bin/activate
pip install -r requirements.txt
cp .env.example .env
python server/mcp_server.py streamable-http

服务默认地址:http://127.0.0.1:8000/mcp。支持 stdiossestreamable-http

环境变量

INTEGRATOR_ID=your_integrator_id
SECRET_ID=your_secret_id
SECRET_KEY=your_secret_key
HANDAAS_REQUEST_TIMEOUT=30

可用 Tool 与 Product ID

MCP Tool 使用场景 Product ID 关键输入
medical_hospital_search 按名称、性质、等级、专业类型和省份发现医院 6a7b07b28c8d379dd486b944 医院筛选条件、分页
medical_hospital_detail 查询单家医院的院区、联系方式、科室和详细介绍 6a7b0e85dfa4a2f37b191128 hospitalId

Tool 详细说明

1. medical_hospital_search

何时使用:用户询问某家医院、某地区医院、某等级医院或某类专科医院时使用,也是详情查询的入口。

关键参数

  • hospitalName:医院名称关键词,支持模糊搜索,例如“协和”。
  • hospitalType:医院性质,例如“公立”或“民营”。
  • hospitalLevel:医院等级,例如“三甲”“二甲”“三级”。
  • hospitalProfessionalType:专业类型,例如“综合医院”“儿童医院”。
  • hospitalProvince:所在省份筛选值,使用“北京”“广东”等短名,不带“省”“市”后缀。
  • pageIndex:从 1 开始;pageSize 默认 10、最大 50。

返回说明:返回医院名称、等级、性质、专业类型、地区、院区、科室和运营主体等摘要。后续详情查询使用结果中的 hospitalId

2. medical_hospital_detail

何时使用:已经通过搜索确认医院,需要查看完整院区、联系方式、科室或医院介绍时使用。

关键参数

  • hospitalId:必填,必须来自 medical_hospital_search 的结果。

返回说明:命中时返回单条医院详情,包括院区地址、联系电话、科室、详细介绍和运营主体。

使用示例

示例一:搜索医院

用户问题:

搜索北京的三甲综合医院,先返回 5 家。

建议调用:

{
  "tool": "medical_hospital_search",
  "arguments": {
    "hospitalLevel": "三甲",
    "hospitalProfessionalType": "综合医院",
    "hospitalProvince": "北京",
    "pageIndex": 1,
    "pageSize": 5
  }
}

示例二:查询医院详情

用户问题:

查看刚才确认医院的院区地址、联系电话和科室。

建议调用:

{
  "tool": "medical_hospital_detail",
  "arguments": {
    "hospitalId": "从医院搜索结果取得"
  }
}

使用注意事项

  1. 搜索结果可能包含名称相近的不同医院,必须先核对地区和医院等级。
  2. hospitalId 只能来自医院搜索结果。
  3. 空结果是合法业务结果,可减少筛选条件后再次搜索。

测试验证

python -m py_compile server/mcp_server.py
python -m unittest discover -s tests -v

单元测试使用 Mock 响应;真实验证通过本地 .env 调用 HandaaS Integrator Gateway。

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured