Bio-MCP BLAST
π MCP server for NCBI BLAST sequence similarity search
Enable AI assistants to perform BLAST searches through natural language. Search nucleotide and protein databases, create custom databases, and get formatted results instantly.
𧬠Features
blastn - Nucleotide-nucleotide BLAST search
blastp - Protein-protein BLAST search
makeblastdb - Create custom BLAST databases
Multiple output formats - JSON, XML, tabular, pairwise
Flexible input - File paths or raw sequences
Queue support - Async processing for large searches
π Quick Start
Installation
Basic Usage
Configuration
Add to your MCP client config:
π‘ Usage Examples
Simple Sequence Search
File-Based Search
Database Creation
Long-Running Search
π οΈ Available Tools
blastn
Nucleotide-nucleotide BLAST search
Parameters:
query(required) - Path to FASTA file or sequence stringdatabase(required) - Database name (e.g., "nt", "nr") or pathevalue- E-value threshold (default: 10)max_hits- Maximum hits to return (default: 50)output_format- Output format: "tabular", "xml", "json", "pairwise"
blastp
Protein-protein BLAST search
Parameters:
Same as blastn, but for protein sequences
makeblastdb
Create BLAST database from FASTA file
Parameters:
input_file(required) - Path to FASTA filedatabase_name(required) - Name for output databasedbtype(required) - "nucl" or "prot"title- Database title (optional)
Async Variants (Queue Mode)
blastn_async- Submit nucleotide search to queueblastp_async- Submit protein search to queueget_job_status- Check job progressget_job_result- Retrieve completed results
βοΈ Configuration
Environment Variables
Database Setup
π³ Docker Deployment
Local Docker
Docker Compose
π Queue System
For long-running BLAST searches, use the queue system:
Setup
Usage
π Output Formats
Tabular (Default)
JSON
XML
Standard BLAST XML format for programmatic parsing.
π§ͺ Testing
π Performance Tips
Local Optimization
Use SSD storage for databases
Increase available RAM
Use multiple CPU cores:
export BLAST_NUM_THREADS=8
Database Selection
Use smaller, specific databases when possible
Consider pre-filtering sequences
Use appropriate E-value thresholds
Queue Optimization
Scale workers based on CPU cores
Use separate queues for different database sizes
Monitor memory usage with large databases
π Security
Input Validation
File size limits prevent resource exhaustion
Path validation prevents directory traversal
Command injection protection
Sandboxing
Containers run as non-root user
Temporary files isolated per job
Network access restricted in production
π Troubleshooting
Common Issues
BLAST not found
Database not found
Out of memory
Timeout errors
π Resources
π€ Contributing
Fork the repository
Create a feature branch
Add tests for new functionality
Ensure all tests pass
Submit a pull request
See CONTRIBUTING.md for detailed guidelines.
π License
MIT License - see LICENSE file.
π Support
π Bug Reports: GitHub Issues
π‘ Feature Requests: GitHub Issues
π Documentation: Bio-MCP Docs
π¬ Discussions: GitHub Discussions
Happy BLASTing! π§¬π