BioPython MCP Server

BioPython MCP Server

Provides comprehensive BioPython capabilities for biological sequence analysis, alignment, database access (GenBank, UniProt, PubMed), protein structure analysis, and phylogenetics through a Model Context Protocol interface for AI-assisted bioinformatics workflows.

Category
访问服务器

README

BioPython MCP Server

CI Python 3.10+ License: MIT Code style: black

A Model Context Protocol (MCP) server that provides comprehensive BioPython capabilities for biological sequence analysis, alignment, database access, and structural bioinformatics.

Overview

BioPython MCP bridges the powerful BioPython library with MCP-enabled applications like Claude Desktop, allowing seamless integration of bioinformatics tools into AI-assisted workflows. This enables researchers, clinicians, and developers to perform complex biological analyses through natural language interfaces.

Motivation

Bioinformatics workflows often require switching between multiple tools and writing custom scripts. BioPython MCP simplifies this by:

  • Unified Interface: Access BioPython's capabilities through a standardized MCP protocol
  • AI Integration: Combine computational biology with AI-powered analysis and interpretation
  • Workflow Automation: Chain complex bioinformatics tasks through conversational interfaces
  • Accessibility: Make advanced bioinformatics tools available to non-programmers

Features

  • Sequence Operations

    • DNA/RNA translation and transcription
    • Reverse complement calculation
    • GC content analysis
    • Motif finding and pattern matching
  • Sequence Alignment

    • Pairwise global and local alignment
    • Multiple sequence alignment support
    • Alignment scoring with substitution matrices
  • Database Access

    • GenBank sequence retrieval
    • UniProt protein data access
    • PubMed literature search
    • NCBI database queries
  • Protein Structure Analysis

    • PDB structure fetching and parsing
    • Structure statistics calculation
    • Active site residue analysis
  • Phylogenetics

    • Phylogenetic tree construction (NJ, UPGMA)
    • Distance matrix calculation
    • Tree visualization

Installation

Requirements

  • Python 3.10 or higher
  • pip or uv package manager

Quick Install with uvx (Recommended)

The fastest way to run BioPython MCP without installation:

uvx biopython-mcp

Or run from source:

git clone https://github.com/kmaneesh/biopython-mcp.git
cd biopython-mcp
uvx --from . biopython-mcp

Install from PyPI

pip install biopython-mcp

Install from Source with uv

git clone https://github.com/kmaneesh/biopython-mcp.git
cd biopython-mcp
uv venv --python 3.10
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"

Install from Source with pip

git clone https://github.com/kmaneesh/biopython-mcp.git
cd biopython-mcp
pip install -e ".[dev]"

Development Installation

For contributing or development:

git clone https://github.com/kmaneesh/biopython-mcp.git
cd biopython-mcp
uv venv --python 3.10
source .venv/bin/activate
uv pip install -e ".[dev]"
pre-commit install

Quick Start

Running the Server

Start the MCP server:

# With uvx (no installation needed)
uvx biopython-mcp

# Or if installed
biopython-mcp

Configuration for Claude Desktop

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

Using uvx (recommended):

{
  "mcpServers": {
    "biopython": {
      "command": "uvx",
      "args": ["biopython-mcp"]
    }
  }
}

Using installed package:

{
  "mcpServers": {
    "biopython": {
      "command": "biopython-mcp"
    }
  }
}

Using local development version:

{
  "mcpServers": {
    "biopython": {
      "command": "uvx",
      "args": ["--from", "/path/to/biopython-mcp", "biopython-mcp"]
    }
  }
}

Basic Usage Example

Once configured, you can use BioPython tools through Claude Desktop:

User: Translate the DNA sequence ATGGCCATTGTAATGGGCCGC to protein

Claude: [Uses translate_sequence tool]
Result: MAIVMGR (7 amino acids)

User: What's the GC content of this sequence?

Claude: [Uses calculate_gc_content tool]
Result: 57.14% GC content

Available Tools

Sequence Operations

Tool Description
translate_sequence Translate DNA/RNA to protein
reverse_complement Get reverse complement of DNA
transcribe_dna Transcribe DNA to RNA
calculate_gc_content Calculate GC percentage
find_motif Find sequence motifs

Alignment

Tool Description
pairwise_align Align two sequences
multiple_sequence_alignment Align multiple sequences
calculate_alignment_score Score alignments

Database Access

Tool Description
fetch_genbank Retrieve GenBank records
fetch_uniprot Retrieve UniProt entries
search_pubmed Search PubMed literature
fetch_sequence_by_id Get sequences by ID

Structure Analysis

Tool Description
fetch_pdb_structure Download PDB structures
calculate_structure_stats Analyze structure statistics
find_active_site Extract active site info

Phylogenetics

Tool Description
build_phylogenetic_tree Build phylogenetic trees
calculate_distance_matrix Compute distance matrices
draw_tree Visualize trees

See the Tools Reference for detailed documentation.

Configuration Options

Environment Variables

  • NCBI_EMAIL: Email address for NCBI Entrez queries (recommended)
  • NCBI_API_KEY: API key for higher NCBI rate limits (optional)

Setting Environment Variables

export NCBI_EMAIL="your.email@example.com"
export NCBI_API_KEY="your_api_key_here"

Examples

Analyze a Gene Sequence

# 1. Fetch from GenBank
fetch_genbank(accession="NM_000207", email="user@example.com")

# 2. Calculate GC content
calculate_gc_content(sequence="ATGGCC...")

# 3. Translate to protein
translate_sequence(sequence="ATGGCC...")

# 4. Find start codons
find_motif(sequence="ATGGCC...", motif="ATG")

Compare Sequences

# Perform global alignment
pairwise_align(
    seq1="ATGGCCATTGTAATGGGCCGC",
    seq2="ATGGCCATTGTTATGGGCCGC",
    mode="global"
)

Build Phylogenetic Tree

# Build tree from aligned sequences
build_phylogenetic_tree(
    sequences=["ATGGCC...", "ATGGCT...", "ATGGCA..."],
    method="nj",
    labels=["Species_A", "Species_B", "Species_C"]
)

See examples/ for complete workflow examples.

Documentation

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Development Setup

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/yourusername/biopython-mcp.git
  3. Install development dependencies: pip install -e ".[dev]"
  4. Install pre-commit hooks: pre-commit install
  5. Create a feature branch: git checkout -b feature-name
  6. Make your changes and commit
  7. Run tests: pytest
  8. Push and create a pull request

Code Quality

We use:

  • Black for code formatting
  • Ruff for linting
  • mypy for type checking
  • pytest for testing
  • pre-commit for automated checks

Testing

Run tests:

pytest

Run tests with coverage:

pytest --cov=biopython_mcp --cov-report=term-missing

Run type checking:

mypy biopython_mcp/

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use BioPython MCP in your research, please cite:

@software{biopython_mcp,
  title = {BioPython MCP: Model Context Protocol Server for BioPython},
  author = {BioPython MCP Contributors},
  year = {2026},
  url = {https://github.com/kmaneesh/biopython-mcp}
}

Acknowledgments

Support

Roadmap

  • [ ] Add support for protein secondary structure prediction
  • [ ] Implement BLAST search integration
  • [ ] Add sequence feature annotation tools
  • [ ] Support for custom HMM profiles
  • [ ] Interactive structure visualization
  • [ ] Batch processing capabilities
  • [ ] REST API wrapper

Related Projects


Made with BioPython and MCP

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选