ClinicalTrials.gov 自然语言 API 的 MCP 服务器
此 MCP(模型控制协议)服务器允许您使用自然语言查询 ClinicalTrials.gov。它使用 OpenAI 的 GPT 模型将您的查询转换为 API 参数并返回结构化结果。
特征
接受自然语言查询(例如,“向我展示加拿大已完成的 3 期糖尿病试验”)
使用 OpenAI API 解析并映射到 ClinicalTrials.gov API 参数
返回解析后的参数和结果
要求
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 示例
Python 示例
什么是 MCP?
MCP(模型控制协议)是一种构建 AI 驱动 API 的模式,它充当自然语言 API 和结构化 API 之间的控制层。该服务器使用 LLM 来解释用户意图并将其映射到 API 调用,从而可以通过普通语言访问复杂数据。
定制
您可以在
server.py
中修改提示或添加更多参数模式以支持更多查询类型或API。
如有疑问或需要改进,请提出问题或 PR!
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
使用户能够使用自然语言而不是复杂的 API 参数查询 ClinicalTrials.gov,将简单的英语请求转换为结构化的 API 调用并返回有组织的临床试验数据。
Related MCP Servers
- AsecurityAlicenseAqualityEnables extracting data from websites using natural language prompts, allowing users to specify exactly what content they want in plain English and returning structured JSON data.Last updated -167MIT License
- -securityAlicense-qualityProvides access to the ClinicalTrials.gov AACT database, enabling analysis of clinical trial data, tracking development trends, and generating therapeutic landscape insights.Last updated -16GPL 3.0
- -securityAlicense-qualityProvides AI assistants with direct query access to the AACT (Aggregate Analysis of ClinicalTrials.gov) database, allowing structured retrieval and analysis of clinical trial data.Last updated -16GPL 3.0
- -securityAlicense-qualityA Model Context Protocol server that enables Claude Desktop to search clinicaltrials.gov for matching clinical trials based on genetic mutations provided in natural language queries.Last updated -MIT License