AACT Clinical Trials MCP Server

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.

Integrations

  • The project acknowledges being based on code from DuckDB MCP Server, indicating similar querying capabilities or implementation patterns

  • The project was inspired by and based on code from the SQLite MCP Server, suggesting some level of SQLite compatibility or similar functionality

AACT临床试验MCP服务器

概述

模型上下文协议 (MCP) 服务器实现,使用 FastMCP 框架提供对 AACT(ClinicalTrials.gov 汇总分析)数据库的访问。该服务器允许 AI 助手直接从 ClinicalTrials.gov 数据库查询临床试验数据。

特征

工具

  • list_tables
    • 获取 AACT 数据库中所有可用表的概览
    • 有助于在分析之前了解数据库结构
  • describe_table
    • 检查特定 AACT 表的详细结构
    • 显示列名和数据类型
    • 例如: {"table_name": "studies"}
  • read_query
    • 在 AACT 临床试验数据库上执行 SELECT 查询
    • 通过验证安全地处理 SQL 查询
    • 例如: {"query": "SELECT nct_id, brief_title FROM ctgov.studies LIMIT 5"}
  • append_insight
    • 记录分析过程中发现的关键发现和见解
    • 帮助构建分析性叙述
    • 示例: {"finding": "Phase 3 oncology trials have increased by 15% over the last 5 years"}

资源

  • schema://database
    • 将数据库架构作为 JSON 资源返回
  • memo://insights
    • 返回会话期间收集的见解的格式化备忘录

配置

必需的环境变量

  • DB_USER :您的 AACT 数据库用户名
  • DB_PASSWORD :您的 AACT 数据库密码

与语义内核一起使用

from semantic_kernel import Kernel from semantic_kernel.connectors.mcp import MCPStdioPlugin # Create an AACT Clinical Trials MCP plugin aact_mcp = MCPStdioPlugin( name="aact", description="Clinical Trials Database Plugin", command="uvx", args=["mcp-server-aact"], env={ "DB_USER": "your_aact_username", "DB_PASSWORD": "your_aact_password" } ) # Add to Semantic Kernel kernel = Kernel() kernel.add_plugin(aact_mcp)

示例提示

以下是一些与该插件一起使用的示例提示:

  1. “乳腺癌临床试验中最常见的干预类型有哪些?”
  2. “2023年完成了多少项3期临床试验?”
  3. “向我展示不同国家糖尿病试验的入组统计数据”
  4. “过去 5 年内有多少比例的肿瘤学试验报告了结果?”

实现细节

该服务器使用以下方式构建:

  • FastMCP 用于模型上下文协议实现
  • 用于 PostgreSQL 数据库连接的 Python psycopg2
  • AACT 数据库作为 ClinicalTrials.gov 信息的数据源

执照

MIT 许可证

贡献

欢迎投稿!请:

致谢

该项目的灵感来自以下代码,并最初基于以下代码:

感谢这些出色的项目为我们指明了方向!🙌

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

提供对 ClinicalTrials.gov AACT 数据库的访问,从而能够分析临床试验数据、跟踪发展趋势并生成治疗前景洞察。

  1. Overview
    1. Features
      1. Tools
      2. Resources
    2. Configuration
      1. Required Environment Variables
    3. Usage with Semantic Kernel
      1. Example Prompts
        1. Implementation Details
          1. License
            1. Contributing
              1. Acknowledgements
                ID: 1gsekmp63g