The medRxiv MCP Server provides a bridge between AI assistants and medRxiv's preprint repository through the Model Context Protocol (MCP). It allows AI models to search for health sciences preprints and access their content programmatically, making it easier to find and retrieve medical research papers.
npx -y @smithery/cli@latest install @JackKuo666/medrxiv-mcp-server --client claude --config "{}"
Paste the following into Settings → Cursor Settings → MCP → Add new server (Mac/Linux):
npx -y @smithery/cli@latest run @JackKuo666/medrxiv-mcp-server --client cursor --config "{}"
npx -y @smithery/cli@latest install @JackKuo666/medrxiv-mcp-server --client windsurf --config "{}"
npx -y @smithery/cli@latest install @JackKuo666/medrxiv-mcp-server --client cline --config "{}"
Using uv:
uv tool install medRxiv-mcp-server
Using git:
# Clone and set up development environment
git clone https://github.com/JackKuo666/medRxiv-MCP-Server.git
cd medRxiv-MCP-Server
# Create and activate virtual environment
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt
Start the MCP server by running:
python medrxiv_server.py
Search for articles on medRxiv using keywords.
Parameters:
key_words
(str): Search query stringnum_results
(int, optional): Number of results to return (default: 10)Example:
result = await mcp.use_tool("search_medrxiv_key_words", {
"key_words": "COVID-19 vaccine efficacy",
"num_results": 5
})
Perform an advanced search for articles on medRxiv.
Parameters:
term
(str, optional): General search termtitle
(str, optional): Search in titleauthor1
(str, optional): First authorauthor2
(str, optional): Second authorabstract_title
(str, optional): Search in abstract and titletext_abstract_title
(str, optional): Search in full text, abstract, and titlesection
(str, optional): Section of medRxivstart_date
(str, optional): Start date for search range (format: YYYY-MM-DD)end_date
(str, optional): End date for search range (format: YYYY-MM-DD)num_results
(int, optional): Number of results to return (default: 10)Example:
result = await mcp.use_tool("search_medrxiv_advanced", {
"term": "COVID-19",
"author1": "MacLachlan",
"start_date": "2020-01-01",
"end_date": "2023-12-31",
"num_results": 3
})
Fetch metadata for a medRxiv article using its DOI.
Parameters:
doi
(str): DOI of the articleExample:
result = await mcp.use_tool("get_medrxiv_metadata", {
"doi": "10.1101/2025.03.09.25323517"
})
Add this configuration to your claude_desktop_config.json
:
Mac OS:
{
"mcpServers": {
"medrxiv": {
"command": "python",
"args": ["-m", "medrxiv-mcp-server"]
}
}
}
Windows:
{
"mcpServers": {
"medrxiv": {
"command": "C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Programs\\Python\\Python311\\python.exe",
"args": [
"-m",
"medrxiv-mcp-server"
]
}
}
}
{
"mcpServers": {
"medrxiv": {
"command": "bash",
"args": [
"-c",
"source /home/YOUR/PATH/mcp-server-medRxiv/.venv/bin/activate && python /home/YOUR/PATH/mcp-server-medRxiv/medrxiv_server.py"
],
"env": {},
"disabled": false,
"autoApprove": []
}
}
}
You can ask your AI assistant to search for papers using natural language:
Can you search medRxiv for recent papers about genomics?
The search will return basic information including:
Once you have a DOI, you can request more details:
Can you show me the details for paper 10.1101/003541?
This will return:
The following features are planned for future releases:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "medrxiv" '{"command":"python","args":["-m","medrxiv-mcp-server"]}'
See the official Claude Code MCP documentation for more details.
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 > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"medrxiv": {
"command": "python",
"args": [
"-m",
"medrxiv-mcp-server"
]
}
}
}
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"medrxiv": {
"command": "python",
"args": [
"-m",
"medrxiv-mcp-server"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect