Skip to content
Conduit

mcp server

bioinformatics-mcp

🧬 A comprehensive MCP server for bioinformatics β€” 62 tools for genomics, transcriptomics, epigenetics & more. Connects AI agents to scanpy, biopython, squidpy, NCBI, UniProt, Ensembl, and PubMed.

raonyguimaraes/bioinformatics-mcpcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • uv (`curl -LsSf https://astral.sh/uv/install.sh | sh`)
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "bioinformatics-mcp": {
      "command": "uvx",
      "args": [
        "bioinformatics-mcp"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 21, 2026

🧬 bioinformatics-mcp

A comprehensive MCP server for bioinformatics β€” enabling AI agents (Claude Desktop, Claude Code, etc.) to run genomics, transcriptomics, epigenetics, and variant analysis workflows through the Model Context Protocol.

CI Python 3.11+ License: MIT

πŸ““ Interactive Tutorial Notebook β€” Full PBMC 3k analysis from raw data to annotated clusters with database lookups


Why?

Bioinformatics workflows involve chaining many specialized tools (scanpy, biopython, squidpy, pysam, etc.) with domain-specific knowledge about parameter choices and step ordering. bioinformatics-mcp wraps these tools as MCP endpoints so an AI agent can:

  • πŸ”¬ Run complete single-cell RNA-seq pipelines (QC β†’ clustering β†’ markers)
  • πŸ—ΊοΈ Analyse spatial transcriptomics (spatial neighbors, autocorrelation, co-occurrence)
  • πŸ§ͺ Perform differential expression and pathway enrichment analysis
  • 🧫 Analyse DNA methylation & epigenetics (CpG islands, DMRs, beta-value distributions)
  • 🧬 Parse and analyse FASTA sequences, find ORFs, compute GC content
  • πŸ“Š Parse VCF files and compute variant statistics (Ti/Tv ratio, etc.)
  • 🌐 Query public databases β€” NCBI Gene, UniProt, Ensembl, PubMed β€” with zero config
  • πŸ“ˆ Generate publication-quality plots (UMAP, volcano, dotplot, heatmap, spatial)
  • πŸ’Ύ Manage datasets in-session across multi-step workflows

All through natural language conversation.

Quick Start

Installation

# Core (sequence tools, data I/O, methylation)
pip install bioinformatics-mcp

# With single-cell analysis support
pip install "bioinformatics-mcp[single-cell]"

# With spatial transcriptomics
pip install "bioinformatics-mcp[spatial]"

# With variant analysis
pip install "bioinformatics-mcp[variants]"

# Everything
pip install "bioinformatics-mcp[full]"

Use with Claude Desktop

Add to your claude_desktop_config.json (see examples/):

{
  "mcpServers": {
    "bioinformatics": {
      "command": "python",
      "args": ["-m", "bioinformatics_mcp"],
      "env": {}
    }
  }
}

Use with Claude Code

claude mcp add bioinformatics -- python -m bioinformatics_mcp

Run Standalone

# stdio transport (default, for MCP clients)
python -m bioinformatics_mcp

# Streamable HTTP transport (for web/remote clients)
python -m bioinformatics_mcp --transport streamable-http --port 8000

# SSE transport
python -m bioinformatics_mcp --transport sse --port 8000

Docker

# Build
docker build -t bioinformatics-mcp .                           # full image
docker build --target slim -t bioinformatics-mcp:slim .        # core only

# Run stdio (pipe to MCP client)
docker run -i bioinformatics-mcp

# Run HTTP server
docker run -p 8000:8000 bioinformatics-mcp --transport streamable-http

# Docker Compose (see examples/)
cd examples && docker compose up

Available Tools (70+)

πŸ“‚ Data I/O

ToolDescription
load_anndataLoad .h5ad files (AnnData format)
load_csvLoad CSV/TSV files as DataFrames
load_10x_mtxLoad 10x Genomics Cell Ranger output
save_anndataSave datasets to .h5ad
list_datasetsList all loaded datasets
inspect_datasetGet detailed dataset info
remove_datasetFree memory by removing datasets

πŸ”¬ Quality Control

ToolDescription
calculate_qc_metricsCompute gene counts, UMI counts, %mito, %ribo
plot_qc_metricsViolin plots of QC metrics
filter_cells_and_genesFilter by min/max genes, %mito, min cells
detect_doubletsScrublet-based doublet detection

βš™οΈ Preprocessing & Clustering

ToolDescription
normalize_and_logLibrary size normalization + log1p
find_highly_variable_genesHVG selection (Seurat v3, etc.)
scale_dataZero-mean unit-variance scaling
run_pcaPrincipal Component Analysis
compute_neighborsk-NN graph construction
run_umapUMAP embedding
run_leiden_clusteringLeiden community detection
run_standard_pipelineAll of the above in one step

πŸ“Š Differential Expression

ToolDescription
rank_genes_groupsWilcoxon / t-test DE between groups
get_marker_genesExtract filtered markers for a group

πŸ§ͺ Enrichment Analysis

ToolDescription
run_enrichment_analysisORA via Enrichr (GO, KEGG, Reactome, etc.)
run_gsea_prerankedPre-ranked GSEA from DE results

🏷️ Cell Type Annotation

ToolDescription
annotate_cell_typesAuto-label clusters using marker gene panels (PBMC, tumor, mouse)
list_marker_panelsBrowse available marker panels and their genes

πŸ”§ Dataset Operations

ToolDescription
subset_datasetFilter cells by any .obs column (pandas query syntax)
merge_datasetsConcatenate multiple datasets with batch tracking
rename_clustersRelabel clusters (e.g. '0' β†’ 'CD4+ T cells')
export_obs_tableExport .obs metadata as CSV
export_gene_expressionExtract expression values for specific genes

πŸ—ΊοΈ Spatial Transcriptomics

ToolDescription
compute_spatial_neighborsBuild spatial neighbor graph from coordinates
spatial_autocorrelationMoran's I / Geary's C for spatially variable genes
neighborhood_enrichmentTest cluster co-localisation in tissue
co_occurrenceCluster co-occurrence at increasing distances
ripley_scoreRipley's F/G/L spatial point pattern statistics
plot_spatialPlot expression or clusters on tissue coordinates
plot_spatial_nhood_enrichmentNeighborhood enrichment heatmap

🧫 Methylation & Epigenetics

ToolDescription
parse_bedgraphParse bedGraph methylation tracks
parse_methylation_tableLoad tabular methylation calls (Bismark, nanome, etc.)
methylation_summary_by_chromosomePer-chromosome methylation statistics
find_differentially_methylated_regionsSliding-window DMR detection between groups
cpg_densityCpG observed/expected ratio & island classification
plot_methylation_distributionBeta-value histogram (optional group overlay)

🌐 Public Database Connectors (zero config, no API keys)

ToolDescription
search_ncbi_geneSearch NCBI Gene by symbol/name/keyword
fetch_ncbi_gene_detailsFull gene info: summary, location, OMIM, exon count
search_ncbi_nucleotideSearch NCBI Nucleotide database
fetch_ncbi_sequenceDownload FASTA/GenBank by accession
search_uniprotProtein search (Swiss-Prot/TrEMBL, organism filter)
fetch_uniprot_entryFull protein details: function, domains, GO, sequence
search_ensembl_genesGene lookup with Ensembl ID and transcript info
fetch_ensembl_sequenceDownload genomic/cDNA/CDS sequence by Ensembl ID
search_pubmedLiterature search with structured results
fetch_pubmed_abstractFull abstract, authors, MeSH terms, keywords
fetch_gene_ontologyGO annotations grouped by BP/MF/CC
search_clinvarClinical variants by gene + pathogenicity filter
get_protein_interactionsProtein–protein interactions from STRING
get_string_enrichmentFunctional enrichment (GO, KEGG) for gene sets via STRING

🧬 Sequence Tools

ToolDescription
parse_fastaParse FASTA files with sequence summaries
gc_contentCompute GC% of a sequence
translate_sequenceDNA β†’ protein translation
reverse_complementGet reverse complement
find_orfsFind open reading frames
bam_statsBAM/SAM alignment statistics

πŸ” Variant Tools

ToolDescription
parse_vcfParse VCF files with variant details
vcf_summary_statsVariant type counts, Ti/Tv ratio, chr distribution

πŸ“ˆ Visualization

ToolDescription
plot_umapUMAP scatter plots
plot_dotplotGene expression dot plots
plot_heatmapExpression heatmaps
plot_volcanoVolcano plots from DE results
plot_marker_genesTop markers per cluster

Guided Workflows (MCP Prompts)

The server includes pre-built prompts that guide agents through multi-step analyses:

PromptDescription
scrna_standard_analysisComplete scRNA-seq from raw data to annotated clusters
differential_expression_workflowDE analysis with enrichment
spatial_transcriptomics_workflowSpatial analysis: neighbors β†’ autocorrelation β†’ co-occurrence
methylation_analysis_workflowMethylation: distribution β†’ per-chrom β†’ DMRs β†’ CpG islands
variant_analysis_workflowVCF analysis and interpretation
sequence_analysis_workflowFASTA analysis with ORF finding
gene_research_workflowMulti-database gene research (NCBI β†’ UniProt β†’ Ensembl β†’ PubMed)

Example Conversation

You: Load the PBMC dataset at ~/data/pbmc3k.h5ad and run a standard single-cell analysis.

Claude: I'll load the data and run the complete pipeline... (calls load_anndata β†’ run_standard_pipeline β†’ plot_umap β†’ rank_genes_groups β†’ plot_marker_genes)

The analysis found 8 clusters. Based on marker genes:

  • Cluster 0: CD4+ T cells (IL7R, CD4)
  • Cluster 1: CD14+ Monocytes (CD14, LYZ)
  • Cluster 2: B cells (MS4A1, CD79A)
  • ...

Architecture

bioinformatics-mcp/
β”œβ”€β”€ src/bioinformatics_mcp/
β”‚   β”œβ”€β”€ server.py              # FastMCP server + tool registration
β”‚   β”œβ”€β”€ __main__.py            # CLI entry point (stdio / sse / streamable-http)
β”‚   β”œβ”€β”€ tools/                 # Tool modules (auto-register via decorators)
β”‚   β”‚   β”œβ”€β”€ data_io.py         # Load/save/inspect datasets
β”‚   β”‚   β”œβ”€β”€ quality_control.py # QC metrics and filtering
β”‚   β”‚   β”œβ”€β”€ preprocessing.py   # Normalize, HVG, PCA, cluster
β”‚   β”‚   β”œβ”€β”€ differential_expression.py
β”‚   β”‚   β”œβ”€β”€ gene_set_enrichment.py
β”‚   β”‚   β”œβ”€β”€ databases.py       # NCBI, UniProt, Ensembl, PubMed connectors
β”‚   β”‚   β”œβ”€β”€ spatial.py         # Squidpy-based spatial analysis
β”‚   β”‚   β”œβ”€β”€ methylation.py     # CpG, DMRs, beta-value analysis
β”‚   β”‚   β”œβ”€β”€ sequence_tools.py  # FASTA, ORFs, GC content
β”‚   β”‚   β”œβ”€β”€ variant_tools.py   # VCF parsing and stats
β”‚   β”‚   └── visualization.py   # UMAP, volcano, dotplot, heatmap
β”‚   β”œβ”€β”€ models/                # Pydantic data models
β”‚   β”œβ”€β”€ resources/             # MCP Resources (dataset browsing)
β”‚   β”œβ”€β”€ prompts/               # MCP Prompts (workflow guides)
β”‚   └── utils/                 # DataManager, plotting, imports
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ tools/                 # Unit tests per module
β”‚   └── integration/           # End-to-end workflow tests
β”œβ”€β”€ notebooks/
β”‚   └── pbmc3k_tutorial.ipynb  # πŸ““ Full PBMC 3k tutorial notebook
β”œβ”€β”€ examples/
β”‚   β”œβ”€β”€ quickstart.py          # Direct Python usage example
β”‚   β”œβ”€β”€ claude_desktop_config.json
β”‚   └── docker-compose.yml
β”œβ”€β”€ .github/workflows/
β”‚   β”œβ”€β”€ ci.yml                 # Lint + test + typecheck + Docker build
β”‚   └── publish.yml            # PyPI trusted publishing on release
β”œβ”€β”€ Dockerfile                 # Multi-stage: slim / full
β”œβ”€β”€ pyproject.toml
└── README.md

Key design decisions:

  • Session DataManager β€” datasets live in memory across tool calls, enabling multi-step workflows
  • Lazy imports β€” heavy deps (scanpy, squidpy, pysam) only load when their tools are called
  • Optional extras β€” install only what you need ([single-cell], [spatial], [variants], [full])
  • Multiple transports β€” stdio (default), SSE, and Streamable HTTP for flexible deployment
  • Base64 plots β€” visualisations are returned as base64 PNGs, compatible with MCP image content
  • Multi-stage Docker β€” slim image for core tools, full image with everything

Development

We provide a Makefile for common tasks:

make dev          # install with all deps + dev tools
make test         # run tests
make lint         # run linter + format check
make serve        # start MCP server (stdio)
make serve-http   # start MCP server (HTTP on port 8000)
make docker       # build Docker image
make help         # show all targets

Or manually:

git clone https://github.com/raonyguimaraes/bioinformatics-mcp
cd bioinformatics-mcp
python -m venv .venv && source .venv/bin/activate
pip install -e ".[full,dev]"

# Run tests
pytest

# Run linter
ruff check src/ tests/

# Format code
ruff format src/ tests/

# Type check
mypy src/bioinformatics_mcp/ --ignore-missing-imports

# Run the quickstart example
python examples/quickstart.py

Contributing

Contributions welcome! Areas where help is especially valuable:

  • 🧬 New tool modules β€” long-read analysis, proteomics, phylogenetics
  • πŸ“Š More visualisations β€” interactive plots, genome browsers
  • πŸ”§ Workflow prompts β€” guided analysis templates for common use cases
  • πŸ“– Documentation β€” tutorials, example notebooks
  • πŸ§ͺ Tests β€” more coverage, integration tests with real datasets
  • 🌍 Translations β€” non-English documentation

License

MIT β€” see LICENSE.

↑↓ navigate openesc close