BM

bio-mcp/bio-mcp-blast

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

11 stars 2 forks 质量 52 趋势 8

🔍 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. - - Nucleotide-nucleotide BLAST search - - Protein-protein BLAST search - - Create custom BLAST databases - - JSON, XML, tabular, pairwise - - File paths or raw sequences - - Async processing for large searches - query (required) - Path to FASTA file or sequence string - database (required) - Database name (e.g., "nt", "nr") or path - evalue - E-value threshold (default: 10) - max_hits - Maximum hits to return (default: 50) - output_format - Output format: "tabular", "xml", "json", "pairwise" - Same as blastn, but for protein sequences - input_file (required) - Path to FASTA file - database_name (required) - Name for output database - dbtype (required) - "nucl" or "prot" - title - Database title (optional) - blastn_async - Submit nucleotide search to queue - blastp_async - Submit protein search to queue -...

README

以下为原文 README 节选,完整内容请查看原文。

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

# Install BLAST+
conda install -c bioconda blast

# Or via package manager
# macOS: brew install blast
# Ubuntu: sudo apt-get install ncbi-blast+

# Install MCP server
git clone https://github.com/bio-mcp/bio-mcp-blast.git
cd bio-mcp-blast
pip install -e .

Basic Usage

# Start the server
python -m src.server

# Or with queue support
python -m src.main --mode queue

Configuration

Add to your MCP client config:

{
  "mcpServers": {
    "bio-blast": {
      "command": "python",
      "args": ["-m", "src.server"],
      "cwd": "/path/to/bio-mcp-blast"
    }
  }
}

💡 Usage Examples

User: "BLAST this sequence against nr: ATGCGATCGATCG"
AI: [calls blastn] → Returns top hits with E-values and alignments
User: "Search proteins.fasta against SwissProt database"
AI: [calls blastp] → Processes file and returns similarity results

Database Creation

User: "Create a BLAST database from reference_genomes.fasta"
AI: [calls makeblastdb] → Creates searchable database files
User: "BLAST large_dataset.fasta against nt database"
AI: [calls blastn_async] → "Job submitted! ID: abc123, checking progress..."

🛠️ Available Tools

blastn

Nucleotide-nucleotide BLAST search

Parameters:

  • query (required) - Path to FASTA file or sequence string
  • database (required) - Database name (e.g., “nt”, “nr”) or path
  • evalue - 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 file
  • database_name (required) - Name for output database
  • dbtype (required) - “nucl” or “prot”
  • title - Database title (optional)

Async Variants (Queue Mode)

  • blastn_async - Submit nucleotide search to queue
  • blastp_async - Submit protein search to queue
  • get_job_status - Check job progress
  • get_job_result - Retrieve completed results

⚙️ Configuration

Environment Variables

# Basic settings
export BIO_MCP_MAX_FILE_SIZE=100000000    # 100MB max file size
在 GitHub 查看完整 README

安装

docker run -p 5000:5000 \
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "bio-blast": { "command": "python", "args": ["-m", "src.server"], "cwd": "/path/to/bio-mcp-blast" } } }