coreymhudson/mcp-sequence-simulation
If you are the rightful owner of mcp-sequence-simulation and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The MCP Sequence Simulation Server is a powerful tool for simulating DNA and protein sequences using evolutionary models and algorithms.
Generate DNA Sequence
Generate random DNA sequences with various models.
Generate Protein Sequence
Generate random protein sequences with various biases.
Simulate FASTQ File
Simulate FASTQ sequencing reads with realistic quality scores and error models.
Mutate Sequence
Apply mutations to existing sequences.
Evolve Sequence
Simulate sequence evolution over multiple generations.
Simulate Phylogeny
Simulate sequence evolution on phylogenetic trees.
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 lengthgcContent
(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 reproducibilityoutputFormat
(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 lengthcount
(optional): Number of sequences (default: 1)model
(optional): "random", "hydrophobic-bias", or "disorder-prone"composition
(optional): Custom amino acid frequenciesseed
(optional): Random seedoutputFormat
(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 fromreadLength
(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 reproducibilityoutputFormat
(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 sequencesequenceType
(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 seedoutputFormat
(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 sequencegenerations
(required): Number of generationspopulationSize
(required): Population sizemutationRate
(required): Mutation rate per generationselectionPressure
(optional): Selection strength (0-1)fitnessFunction
(optional): "gc-content", "length", "hydrophobic", or "custom"targetValue
(optional): Target value for fitness functiontrackLineages
(optional): Track individual lineagesseed
(optional): Random seedoutputFormat
(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 sequencetreeStructure
(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 seedoutputFormat
(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.