medical-hospital-mcp-server
医院信息搜索
该MCP服务提供医院关键词搜索、医院性质与等级筛选、院区地址、联系方式、科室及医院详细介绍查询功能。
主要功能
🔍 医院名称模糊搜索
🏥 医院性质、等级和专业类型筛选
📍 医院所在省市及院区地址查询
📞 医院联系方式与科室查询
🧾 医院介绍及运营主体核验
Related MCP server: visitkorea-medicaltourism
环境要求
Python 3.10+
依赖包:python-dotenv, requests, mcp
本地快速启动
1. 克隆项目
git clone https://github.com/handaas/medical-hospital-mcp-server
cd medical-hospital-mcp-server2. 创建虚拟环境&安装依赖
python -m venv mcp_env && source mcp_env/bin/activate
pip install -r requirements.txt3. 环境配置
复制环境变量模板并配置:
cp .env.example .env编辑 .env 文件,配置以下环境变量:
INTEGRATOR_ID=your_integrator_id
SECRET_ID=your_secret_id
SECRET_KEY=your_secret_key
HANDAAS_REQUEST_TIMEOUT=304. streamable-http启动服务
python server/mcp_server.py streamable-http服务将在 http://localhost:8000 启动,MCP 地址为 http://127.0.0.1:8000/mcp。
支持启动方式 stdio 或 sse 或 streamable-http
5. Cursor / Cherry Studio MCP配置
{
"mcpServers": {
"medical-hospital-mcp-server": {
"type": "streamableHttp",
"url": "http://127.0.0.1:8000/mcp"
}
}
}STDIO版安装部署
设置Cursor / Cherry Studio MCP配置
{
"mcpServers": {
"medical-hospital-mcp-server": {
"command": "uv",
"args": ["run", "mcp", "run", "{workdir}/server/mcp_server.py"],
"env": {
"PATH": "{workdir}/mcp_env/bin:$PATH",
"PYTHONPATH": "{workdir}/mcp_env",
"INTEGRATOR_ID": "your_integrator_id",
"SECRET_ID": "your_secret_id",
"SECRET_KEY": "your_secret_key"
}
}
}
}使用官方Remote服务
1. 直接设置Cursor / Cherry Studio MCP配置
{
"mcpServers": {
"medical-hospital-mcp-server":{
"type": "streamableHttp",
"url": "https://mcp.handaas.com/medical/hospital_bigdata?token={token}"
}
}
}注意:integrator_id、secret_id、secret_key及token需要登录 https://www.handaas.com/ 进行注册开通平台获取
可用工具
1. medical_hospital_search
功能: 医院信息搜索
参数: 传入医院名称、性质、等级、专业类型或省份等条件,分页查询符合条件的医院。
hospitalName(可选): 医院名称关键词,支持模糊搜索hospitalType(可选): 医院性质,例如公立、民营hospitalLevel(可选): 医院等级,例如三甲、二甲、三级hospitalProfessionalType(可选): 专业类型,例如综合医院、儿童医院hospitalProvince(可选): 省份短名,例如北京、广东pageIndex(可选): 页码,从1开始,默认1pageSize(可选): 每页条数,默认10,最大50
返回值:
total: 符合条件的医院总数resultList: 医院结果列表hospitalId: 医院ID,供详情查询使用hospitalName: 医院名称hospitalLevel: 医院等级hospitalType: 医院性质hospitalProfessionalType: 专业类型hospitalProvince: 所在省份hospitalCity: 所在城市hospitalDistrict: 所在区县hospitalAddressDetail: 院区地址列表hospitalDepartment: 科室列表hospitalDepartmentCount: 科室数量hospitalCampusCount: 院区数量operatingEntity: 运营主体nameId: 运营主体ID
2. medical_hospital_detail
功能: 医院信息详情查询
参数: 通过医院搜索返回的医院ID查询单家医院的完整信息。
hospitalId(必需): 必须使用medical_hospital_search返回的hospitalId
返回值:
total: 命中数量,通常为1resultList: 医院详情列表hospitalName: 医院名称hospitalIntroduction: 医院简介hospitalDesc: 医院详细介绍hospitalAddressDetail: 各院区名称、地址及经纬度hospitalContact: 联系方式及联系方式类型hospitalDepartment: 科室列表hospitalLevel: 医院等级hospitalType: 医院性质operatingEntity: 运营主体nameId: 运营主体ID
使用注意事项
医院ID要求: 详情查询必须使用医院搜索结果中的
hospitalId,不能使用医院名称代替。省份筛选:
hospitalProvince使用北京、广东等短名,不带省、市后缀。API限制: 分页查询一页最多获取50条数据。
合法空结果: 未命中时返回
total=0和resultList=[]。医疗边界: 本服务只提供医院信息,不提供挂号、诊断、处方或紧急医疗服务。
使用提问示例
medical_hospital_search (医院信息搜索)
搜索北京的三甲综合医院
帮我查找名称中包含“协和”的医院
查询广东省内的儿童医院
medical_hospital_detail (医院信息详情查询)
查看刚才医院的院区地址和联系电话
查询这家医院有哪些科室
获取该医院的完整介绍和运营主体
测试验证
python -m py_compile server/mcp_server.py
python -m unittest discover -s tests -v当前服务包含 5 个离线单元测试。真实接口验证需在本地 .env 配置有效凭据后执行,测试输出不得提交真实业务响应或凭据。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Sourced, read-only hospital facts for Guangzhou and Shenzhen, with a free inquiry link.
Pay-per-call US healthcare data: hospital financials, prices, quality, exclusions, wages.
Search a healthcare provider directory and get full provider details by id.
Search source-labeled hospital prices, CPT codes, providers, and healthcare cost estimates.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables medical symptom guidance and disease consultation through the Zydsoft API. Provides disease diagnosis guidance and access to lists of medical conditions and departments.30 npm2MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to search and retrieve information about KTO-certified medical tourism facilities in South Korea, including area-based, location-based, and keyword search, with multilingual support.8,811 npm1MIT
- FlicenseAqualityBmaintenanceEnables users to collect hospital and clinic leads from Google Maps, including WhatsApp numbers verified from their websites, and to manage, filter, and export the collected results.7-
- AlicenseAqualityBmaintenanceEnables AI agents to search Iranian doctors, hospitals and clinics by specialty, city, name, gender and online visit, then read profiles, ratings, insurances, patient reviews, visit prices in Toman and free appointment times. Read-only, with no login, booking or payment, so users compare options and get a profile link to book themselves.12345 PyPI4MIT