MCP Sequence Simulation Server

MCP Sequence Simulation Server

Enables the generation, mutation, and evolution of DNA and protein sequences using various evolutionary models and phylogenetic algorithms. It supports realistic next-generation sequencing read simulation and population-level evolutionary tracking for bioinformatics research and testing.

Category
Visit Server

README

MCP Sequence Simulation Server

An MCP (Model Context Protocol) server for simulating DNA and amino acid sequences using various evolutionary models and algorithms. This server provides powerful tools for sequence generation, mutation simulation, evolutionary modeling, and phylogenetic analysis.

Features

🧬 DNA Sequence Generation

  • Random DNA Generation: Generate sequences with specified GC content
  • Markov Chain Models: Context-dependent sequence generation
  • Codon-Biased Generation: Realistic protein-coding sequences
  • Customizable Parameters: Length, GC content, seed for reproducibility

📊 FASTQ Sequencing Simulation

  • NGS Read Simulation: Generate realistic next-generation sequencing reads
  • Platform-Specific Models: Illumina, 454, Ion Torrent, and PacBio quality models
  • Paired-End Support: Both single-end and paired-end sequencing reads
  • Error Modeling: Configurable sequencing error rates with realistic quality scores
  • Coverage Control: Generate reads to achieve specified coverage depths
  • NEAT-Based: Implementation inspired by published NEAT methodology

🧭 Protein Sequence Generation

  • Random Protein Generation: Uniform amino acid distribution
  • Hydrophobic-Biased: Membrane protein-like sequences
  • Disorder-Prone: Intrinsically disordered protein sequences
  • Custom Composition: User-defined amino acid frequencies

🔬 Sequence Mutation

  • Substitution Mutations: Point mutations with transition/transversion bias
  • Insertion/Deletion Events: Indel mutations
  • Multiple Iterations: Track changes over time
  • Both DNA and Protein: Support for nucleotide and amino acid sequences

🌳 Evolutionary Simulation

  • Population Evolution: Simulate populations over generations
  • Selection Pressure: Configurable fitness functions
  • Lineage Tracking: Follow individual evolutionary paths
  • Fitness Functions: GC content, length, hydrophobicity targets

🌲 Phylogenetic Simulation

  • Tree-Based Evolution: Simulate sequences on phylogenetic trees
  • Multiple Substitution Models: JC69, K80, HKY85, GTR
  • Molecular Clock: Uniform or variable evolutionary rates
  • Multiple Output Formats: FASTA, NEXUS, PHYLIP

Installation

npm install
npm run build

Usage

With Claude Code

./start-claude.sh

Manual Configuration

Add to your Claude Code MCP configuration:

{
  "mcpServers": {
    "sequence-simulation": {
      "command": "node",
      "args": ["dist/server.js"],
      "cwd": "/path/to/mcp-sequence-simulation"
    }
  }
}

Available Tools

1. Generate DNA Sequence

Generate random DNA sequences with various models.

Parameters:

  • length (required): Sequence length
  • gcContent (optional): GC content ratio (0-1, default: 0.5)
  • count (optional): Number of sequences (default: 1)
  • model (optional): "random", "markov", or "codon-biased"
  • seed (optional): Random seed for reproducibility
  • outputFormat (optional): "fasta" or "plain"

Example:

{
  "length": 1000,
  "gcContent": 0.6,
  "count": 5,
  "model": "markov",
  "outputFormat": "fasta"
}

2. Generate Protein Sequence

Generate random protein sequences with various biases.

Parameters:

  • length (required): Sequence length
  • count (optional): Number of sequences (default: 1)
  • model (optional): "random", "hydrophobic-bias", or "disorder-prone"
  • composition (optional): Custom amino acid frequencies
  • seed (optional): Random seed
  • outputFormat (optional): "fasta" or "plain"

Example:

{
  "length": 200,
  "count": 3,
  "model": "hydrophobic-bias",
  "outputFormat": "fasta"
}

3. Simulate FASTQ File

Simulate FASTQ sequencing reads with realistic quality scores and error models.

Parameters:

  • referenceSequence (required): Reference DNA sequence to generate reads from
  • readLength (required): Length of each sequencing read (50-300 bp)
  • coverage (required): Target sequencing coverage depth (1-1000x)
  • readType (optional): "single-end" or "paired-end" (default: "single-end")
  • insertSize (optional): Mean insert size for paired-end reads (default: 300)
  • insertSizeStd (optional): Standard deviation of insert size (default: 50)
  • errorRate (optional): Base calling error rate 0-0.1 (default: 0.01)
  • qualityModel (optional): "illumina", "454", "ion-torrent", or "pacbio" (default: "illumina")
  • mutationRate (optional): Rate of true mutations 0-0.05 (default: 0.001)
  • seed (optional): Random seed for reproducibility
  • outputFormat (optional): "fastq" or "json" (default: "fastq")

Example:

{
  "referenceSequence": "ATCGATCGATCGATCGATCGATCGATCGATCGATCG",
  "readLength": 150,
  "coverage": 30,
  "readType": "paired-end",
  "errorRate": 0.01,
  "qualityModel": "illumina"
}

Citation: Based on Stephens et al. (2016) PLOS ONE 11(11): e0167047.

4. Mutate Sequence

Apply mutations to existing sequences.

Parameters:

  • sequence (required): Input sequence
  • sequenceType (required): "dna" or "protein"
  • substitutionRate (optional): Substitution rate (default: 0.01)
  • insertionRate (optional): Insertion rate (default: 0.001)
  • deletionRate (optional): Deletion rate (default: 0.001)
  • transitionBias (optional): Transition vs transversion bias for DNA (default: 2.0)
  • iterations (optional): Number of mutation rounds (default: 1)
  • seed (optional): Random seed
  • outputFormat (optional): "fasta" or "plain"

Example:

{
  "sequence": "ATGCGATCGATCG",
  "sequenceType": "dna",
  "substitutionRate": 0.02,
  "iterations": 5,
  "outputFormat": "fasta"
}

5. Evolve Sequence

Simulate sequence evolution over multiple generations.

Parameters:

  • sequence (required): Starting sequence
  • generations (required): Number of generations
  • populationSize (required): Population size
  • mutationRate (required): Mutation rate per generation
  • selectionPressure (optional): Selection strength (0-1)
  • fitnessFunction (optional): "gc-content", "length", "hydrophobic", or "custom"
  • targetValue (optional): Target value for fitness function
  • trackLineages (optional): Track individual lineages
  • seed (optional): Random seed
  • outputFormat (optional): "summary", "detailed", or "fasta"

Example:

{
  "sequence": "ATGCGATCGATCG",
  "generations": 100,
  "populationSize": 50,
  "mutationRate": 0.01,
  "selectionPressure": 0.3,
  "fitnessFunction": "gc-content",
  "targetValue": 0.5,
  "outputFormat": "detailed"
}

6. Simulate Phylogeny

Simulate sequence evolution on phylogenetic trees.

Parameters:

  • rootSequence (required): Ancestral sequence
  • treeStructure (optional): Newick format tree or "random"
  • numTaxa (optional): Number of taxa for random tree (default: 5)
  • mutationRate (optional): Mutation rate per branch length (default: 0.1)
  • branchLengthVariation (optional): Branch length variation (default: 0.2)
  • molecularClock (optional): Use molecular clock (default: true)
  • substitutionModel (optional): "JC69", "K80", "HKY85", or "GTR"
  • seed (optional): Random seed
  • outputFormat (optional): "fasta", "nexus", or "phylip"

Example:

{
  "rootSequence": "ATGCGATCGATCGATCG",
  "numTaxa": 8,
  "mutationRate": 0.05,
  "substitutionModel": "K80",
  "outputFormat": "nexus"
}

Output Formats

FASTA Format

Standard FASTA format with descriptive headers containing simulation parameters.

Statistics

All tools provide detailed statistics including:

  • Sequence composition analysis
  • Mutation counts and types
  • Evolutionary parameters
  • Phylogenetic tree statistics

Specialized Formats

  • NEXUS: For phylogenetic analysis software
  • PHYLIP: For phylogenetic analysis
  • JSON: Structured data with full simulation details

Use Cases

Research Applications

  • Molecular Evolution Studies: Simulate sequence evolution under different models
  • Phylogenetic Analysis: Generate test datasets with known evolutionary history
  • Algorithm Testing: Create benchmark datasets for bioinformatics tools
  • Educational Purposes: Demonstrate evolutionary principles

Bioinformatics Development

  • Algorithm Validation: Test sequence analysis tools with controlled data
  • Statistical Analysis: Generate null distributions for statistical tests
  • Performance Benchmarking: Create datasets of varying complexity
  • Method Comparison: Compare tools on simulated vs real data

Technical Details

Evolutionary Models

  • Jukes-Cantor (JC69): Equal substitution rates
  • Kimura 2-Parameter (K80): Transition/transversion bias
  • HKY85: Unequal base frequencies with transition bias
  • GTR: General time-reversible model

Sequence Generation

  • Markov Chains: Context-dependent nucleotide selection
  • Codon Usage Bias: Realistic protein-coding sequences
  • Amino Acid Properties: Hydrophobicity and disorder propensity

Mutation Models

  • Point Mutations: Single nucleotide/amino acid changes
  • Indels: Insertion and deletion events
  • Transition Bias: Realistic DNA mutation patterns

Dependencies

  • @modelcontextprotocol/sdk: MCP framework
  • zod: Schema validation
  • typescript: Type safety
  • Node.js: Runtime environment

Contributing

This server provides a comprehensive framework for sequence simulation. Extensions could include:

  • Additional substitution models
  • Recombination simulation
  • Population genetics models
  • Structural constraints
  • Codon usage tables for different organisms

License

See LICENSE file for details.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured