PubMed Analysis MCP Server is a specialized tool that helps researchers analyze medical literature from PubMed. It retrieves and processes literature data to identify research hotspots, track publication trends, and generate comprehensive analysis reports about medical research dynamics.
It's recommended to use uv virtual environment for installation:
# In the project root directory:
uv pip install -e .
Create or modify your mcp.json
file with the following configuration (for Windows):
{
"mcpServers": {
"pubmearch": {
"command": "cmd",
"args": [
"/c",
"uv",
"run",
"--directory",
"path/to/project/root/directory",
"-m",
"pubmearch.server"
],
"env": {
"NCBI_USER_EMAIL": "[email protected]",
"NCBI_USER_API_KEY": "your_api_key"
}
}
}
}
The MCP server provides several tools for analyzing PubMed literature:
Use the search_pubmed
tool to retrieve and save search results.
Key parameters:
advanced_search
: PubMed search query (required, uses advanced search syntax)start_date
: Start date (format: YYYY/MM/DD)end_date
: End date (format: YYYY/MM/DD)max_results
: Maximum results (default: 1000)Use list_result_files
tool to see available result files from previous searches.
The analyze_research_keywords
tool identifies research hotspots and trends.
Key parameters:
top_n
: Number of keywords to analyze (default: 20)Use analyze_publication_count
to examine how publication frequency changes over time.
The generate_comprehensive_analysis
tool creates full reports combining multiple analyses.
When using with language models in agent mode, it's recommended to use advanced search syntax:
Help me analyze the research hotspots on prostate cancer immunotherapy in the past three months. The advanced search query is ((prostat*[Title/Abstract]) AND (cancer[Title/Abstract])) AND (immu*[Title/Abstract]).
pubmearch/results
directorypubmed_server.log
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.