BioPython MCP Server
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:
Or run from source:
Install from PyPI
Install from Source with uv
Install from Source with pip
Development Installation
For contributing or development:
Quick Start
Running the Server
Start the MCP server:
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):
Using installed package:
Using local development version:
Basic Usage Example
Once configured, you can use BioPython tools through Claude Desktop:
Available Tools
Sequence Operations
Tool | Description |
| Translate DNA/RNA to protein |
| Get reverse complement of DNA |
| Transcribe DNA to RNA |
| Calculate GC percentage |
| Find sequence motifs |
Alignment
Tool | Description |
| Align two sequences |
| Align multiple sequences |
| Score alignments |
Database Access
Tool | Description |
| Retrieve GenBank records |
| Retrieve UniProt entries |
| Search PubMed literature |
| Get sequences by ID |
Structure Analysis
Tool | Description |
| Download PDB structures |
| Analyze structure statistics |
| Extract active site info |
Phylogenetics
Tool | Description |
| Build phylogenetic trees |
| Compute distance matrices |
| 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
Examples
Analyze a Gene Sequence
Compare Sequences
Build Phylogenetic Tree
See examples/ for complete workflow examples.
Documentation
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Development Setup
Fork the repository
Clone your fork:
git clone https://github.com/yourusername/biopython-mcp.gitInstall development dependencies:
pip install -e ".[dev]"Install pre-commit hooks:
pre-commit installCreate a feature branch:
git checkout -b feature-nameMake your changes and commit
Run tests:
pytestPush 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:
Run tests with coverage:
Run type checking:
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:
Acknowledgments
Built on the excellent BioPython library
Uses FastMCP for MCP implementation
Inspired by the Model Context Protocol
Support
Issues: GitHub Issues
Discussions: GitHub Discussions
Email: Contact maintainers
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
BioPython - The core library
Model Context Protocol - The MCP specification
FastMCP - MCP framework for Python
Made with BioPython and MCP