GenePattern MCP Server
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GenePattern MCP ServerRun PreprocessDataset on all_aml_test.gct with default parameters"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Why GenePattern MCP?
Modern AI assistants are extraordinarily good at reasoning — but they can't run a gene expression pipeline or execute bioinformatics on their own. We built GenePattern MCP to close that gap.
By implementing the Model Context Protocol (MCP), this server exposes the full GenePattern REST API as a set of structured, type-safe tools that any MCP-compatible AI client (Claude, Cursor, GitHub Copilot, and more) can call directly. The result: your AI assistant can now:
🧬 Search, inspect, and execute hundreds of peer-reviewed genomic analysis modules
🤖 Chain bioinformatic tasks into multi-step AI-driven workflows — no manual API calls required
☁️ Scale effortlessly on GenePattern's cloud infrastructure at cloud.genepattern.org
📊 Guarantee reproducibility — every job is tracked by LSID and stored with full provenance
From raw expression data to publication-ready insights — powered by a conversation.
Related MCP server: encode-toolkit
Feature Highlights
Feature | Description |
🧬 Genomic Integration | Access 200+ curated modules: differential expression, pathway analysis, single-cell, proteomics, and more |
🤖 AI/ML Workflows | Let your LLM orchestrate multi-step pipelines end-to-end via natural language prompts |
☁️ Cloud Scalability | Jobs run on GenePattern's managed cloud — no local compute needed |
📊 Reproducible Science | Every module is versioned by LSID; every job is logged and retrievable |
🔌 Multi-Transport |
|
🔐 Flexible Auth | Pluggable |
🐳 Docker-Ready | Official image at |
Prerequisites
Python 3.11+
A GenePattern API token (see Get a Token below)
piporuv
Installation
With pip:
pip install -r requirements.txtWith uv:
uv venv && source .venv/bin/activate
uv pip install -r requirements.txtGet a GenePattern Token
You need a Bearer token to authenticate with GenePattern.
Option A — You already have a token:
export GENEPATTERN_KEY="YOUR_TOKEN"Option B — Generate one with the included helper:
python get-token.py -s https://cloud.genepattern.org/gp \
-u YOUR_USERNAME \
-p YOUR_PASSWORD
# Follow the printed instructions to export GENEPATTERN_KEYQuick Start
1. Start the server (local stdio — recommended for AI clients)
export GENEPATTERN_KEY="YOUR_TOKEN"
python server.py --transport stdio2. Run a bioinformatic analysis via your AI assistant
Once connected, ask your AI assistant something like:
"Run PreprocessDataset on
all_aml_test.gct, threshold at 20/1500, and download the result."
The MCP server will:
Look up the
PreprocessDatasetmodule LSID automaticallySubmit the job to GenePattern cloud
Poll for completion and return the output file paths
3. Explore available tools interactively
mcp dev server.pyRunning the Server
The server supports three transport modes via FastMCP.
Mode | Command |
stdio (local AI clients) |
|
HTTP (remote / Docker) |
|
SSE |
|
Testing with GenePattern Copilot:
python server.py --transport streamable-http --host 0.0.0.0 --port 3000 \ --auth-handler genepattern_mcp._shared.HeaderAuthHandler
Docker
Pull and run the official image in seconds:
docker pull genepattern/mcpRun in HTTP mode:
docker run --rm \
-e GENEPATTERN_URL=https://cloud.genepattern.org/gp \
-e GENEPATTERN_KEY=YOUR_TOKEN \
-e FASTMCP_TRANSPORT=streamable-http \
-e FASTMCP_HOST=0.0.0.0 \
-e FASTMCP_PORT=3000 \
-p 3000:3000 \
genepattern/mcpUsing Authorization header instead of an env token (stateless, multi-user HTTP):
docker run --rm -p 3000:3000 \
-e AUTH_HANDLER=genepattern_mcp._shared.HeaderAuthHandler \
-e FASTMCP_TRANSPORT=streamable-http \
genepattern/mcp
# Clients send: Authorization: Bearer YOUR_TOKENNote:
stdiotransport is impractical inside Docker containers. Usestreamable-httpwhen containerized.
Connect from MCP-Enabled Clients
Claude Code (VS Code)
Local stdio (recommended):
{
"mcpServers": {
"genepattern": {
"command": "python",
"args": ["server.py", "--transport", "stdio"],
"env": {
"GENEPATTERN_URL": "https://cloud.genepattern.org/gp",
"GENEPATTERN_KEY": "${env:GENEPATTERN_KEY}"
}
}
}
}Remote HTTP server:
{
"mcpServers": {
"genepattern": {
"type": "streamable-http",
"url": "http://localhost:3000/mcp",
"env": {
"GENEPATTERN_URL": "https://cloud.genepattern.org/gp",
"GENEPATTERN_KEY": "<GP API TOKEN>"
}
}
}
}Cursor
Add via Cursor Settings → MCP Servers:
{
"mcpServers": {
"genepattern": {
"command": "python",
"args": ["server.py", "--transport", "stdio"],
"environment": {
"GENEPATTERN_URL": "https://cloud.genepattern.org/gp",
"GENEPATTERN_KEY": "YOUR_TOKEN"
}
}
}
}Other MCP Clients
stdio: invoke
server.py --transport stdioHTTP/SSE: connect to
http://HOST:PORTusing the appropriate transportMulti-user HTTP: set
AUTH_HANDLER=genepattern_mcp._shared.HeaderAuthHandlerand passAuthorization: Bearer <token>per request
Configuration Reference
All CLI flags have a corresponding environment variable. Environment variables are applied before CLI arguments.
Flag | Env Variable | Default | Description |
|
|
| GenePattern server URL (include |
|
|
| Your GenePattern API Bearer token |
|
|
| Full Python path to an |
|
|
| Transport protocol: |
|
|
| Port to listen on (HTTP/SSE only) |
|
|
| Host interface to bind (HTTP/SSE only) |
|
|
| Enable local file upload/download tools |
Auth Handlers
Class | Behavior |
| (default) Reads |
| Reads |
custom | Subclass |
Local File Tools
When --local-files is False, the following tools are disabled:
upload_whole_filedownload_job_resultsupload_fileupload_job_input_from_bodyupload_job_input_from_formupload_job_output
Security Notes
Treat
GENEPATTERN_KEYlike a password — prefer environment variables over hardcoding tokens.When exposing the HTTP server to a network, put it behind a reverse proxy with TLS (e.g., nginx + Let's Encrypt).
For multi-user deployments, use
HeaderAuthHandlerso each user supplies their own token per request.
Contributing & Community
We believe the best bioinformatics tools are built by the community, for the community. All skill levels welcome — whether you're a genomics researcher, an ML engineer, or just someone who wants to ask an AI to run a pathway analysis.
Ways to get involved:
🐛 Found a bug? Open an issue — we triage actively.
💡 Have a feature idea? Start a Discussion — we love hearing about new use cases.
🔧 Want to contribute code? Fork the repo, make your changes, and open a PR. Please include tests.
💬 Need help? Reach out on the GenePattern Community Forum or tag us in an issue.
# Get started with development
git clone https://github.com/genepattern/genepattern-mcp.git
cd genepattern-mcp
uv venv && source .venv/bin/activate
uv pip install -r requirements.txt
mcp dev server.py # Explore all tools interactivelyCiting This Work
If GenePattern MCP accelerates your research, please cite the underlying GenePattern platform:
Reich M, Liefeld T, Gould J, Lerner J, Tamayo P, Mesirov JP. GenePattern 2.0 Nature Genetics 38 no. 5 (2006): pp500-501 Google Scholar
License
Distributed under the BSD 3-Clause License. See LICENSE for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/genepattern/genepattern-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server