Skip to main content
Glama

ClinicalTrials.gov Natural Language API Server

by HuaiyuZhang

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环境变量)

运行服务器

  1. 安装依赖项:
    pip install -r requirements.txt
  2. 设置您的 OpenAI API 密钥:
    export OPENAI_API_KEY=sk-...
  3. 启动服务器:
    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!

-
security - not tested
A
license - permissive license
-
quality - not tested

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 调用并返回有组织的临床试验数据。

  1. 特征
    1. 要求
      1. 运行服务器
        1. 用法
          1. cURL 示例
          2. Python 示例
        2. 什么是 MCP?
          1. 定制

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              Enables 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 -
              1
              666
              6
              TypeScript
              MIT License
              • Apple
              • Linux
            • -
              security
              A
              license
              -
              quality
              Provides access to the ClinicalTrials.gov AACT database, enabling analysis of clinical trial data, tracking development trends, and generating therapeutic landscape insights.
              Last updated -
              15
              Python
              GPL 3.0
              • Apple
            • -
              security
              A
              license
              -
              quality
              Provides 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 -
              15
              Python
              GPL 3.0
              • Apple
            • -
              security
              A
              license
              -
              quality
              A 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 -
              Python
              MIT License
              • Apple

            View all related MCP servers

            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/HuaiyuZhang/clinical-trial-mcp'

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