The AACT Clinical Trials MCP Server provides AI assistants with direct access to the ClinicalTrials.gov database through the Model Context Protocol (MCP). This implementation allows for querying and analyzing clinical trial data using a structured interface that follows the MCP specification.
To use the AACT Clinical Trials MCP Server, you need to set up the following environment variables:
DB_USER
: Your AACT database usernameDB_PASSWORD
: Your AACT database passwordThese credentials are required to connect to the AACT database.
You can integrate the AACT Clinical Trials MCP Server with Semantic Kernel using the following Python code:
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)
The server provides several tools for interacting with the AACT database:
Get an overview of all available tables in the AACT database:
list_tables
This tool is useful for understanding the database structure before conducting analysis.
Examine the detailed structure of a specific AACT table:
{"table_name": "studies"}
This tool shows column names and data types for the specified table.
Execute a SELECT query on the AACT clinical trials database:
{"query": "SELECT nct_id, brief_title FROM ctgov.studies LIMIT 5"}
The tool safely handles SQL queries with validation.
Record key findings and insights discovered during analysis:
{"finding": "Phase 3 oncology trials have increased by 15% over the last 5 years"}
This helps build an analytical narrative during your session.
The server also provides access to these resources:
schema://database
- Returns the database schema as a JSON resourcememo://insights
- Returns a formatted memo of insights collected during the sessionHere are some example prompts to use with this plugin:
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.