ClinicalTrials.gov Natural Language API Server
ClinicalTrials.gov 自然语言 API 的 MCP 服务器
此 MCP(模型控制协议)服务器允许您使用自然语言查询 ClinicalTrials.gov。它使用 OpenAI 的 GPT 模型将您的查询转换为 API 参数并返回结构化结果。
特征
接受自然语言查询(例如,“向我展示加拿大已完成的 3 期糖尿病试验”)
使用 OpenAI API 解析并映射到 ClinicalTrials.gov API 参数
返回解析后的参数和结果
Related MCP server: Clinical Trials MCP Server
要求
Python 3.8+
requirements.txt中的依赖项OpenAI API 密钥(设置为
OPENAI_API_KEY环境变量)
运行服务器
安装依赖项:
pip install -r requirements.txt设置您的 OpenAI API 密钥:
export OPENAI_API_KEY=sk-...启动服务器:
uvicorn server:app --reload
用法
cURL 示例
curl -X POST "http://127.0.0.1:8000/query" \
-H "Content-Type: application/json" \
-d '{"query": "Show me completed phase 3 diabetes trials in Canada"}'Python 示例
import requests
query = "Show me completed phase 3 diabetes trials in Canada"
response = requests.post(
"http://127.0.0.1:8000/query",
json={"query": query}
)
print(response.json())什么是 MCP?
MCP(模型控制协议)是一种构建 AI 驱动 API 的模式,它充当自然语言 API 和结构化 API 之间的控制层。该服务器使用 LLM 来解释用户意图并将其映射到 API 调用,从而可以通过普通语言访问复杂数据。
定制
您可以在
server.py中修改提示或添加更多参数模式以支持更多查询类型或API。
如有疑问或需要改进,请提出问题或 PR!
This server cannot be installed
Maintenance
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
Clinical trial search and status from ClinicalTrials.gov
Provide structured access to ClinicalTrials.gov data for searching, retrieving, and analyzing clin…
ClinicalTrials MCP — wraps ClinicalTrials.gov API v2 (free, no auth)
Search ClinicalTrials.gov — find studies, retrieve results, match patients to eligible trials.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables searching and retrieving information from the ClinicalTrials.gov database of over 400,000 clinical studies, including trial details, eligibility criteria, locations, and results across 220+ countries.5-
- AlicenseBqualityDmaintenanceEnables searching and querying clinical trials from ClinicalTrials.gov with intelligent filtering for recruiting studies, geographic search, and detailed trial information including contacts and eligibility criteria.346MIT
- AlicenseAqualityFmaintenanceEnables conversational access to 400,000+ clinical trials on ClinicalTrials.gov, allowing users to search, compare, and retrieve trial details using plain English through MCP-compatible clients like Cursor and Claude Desktop.53MIT
- AlicenseNot gradedqualityCmaintenanceWraps the ClinicalTrials.gov API v2 to enable querying clinical trials data through natural language.16MIT