synergy-age-mcp

synergy-age-mcp

MCP server for standardized access to SynergyAge genetic intervention and lifespan data.

8
Stars
1
Forks
8
Watchers
0
Issues
Implements the Model Context Protocol (MCP) for the SynergyAge database, enabling AI systems and agents to access, query, and analyze curated synergistic and antagonistic genetic interventions affecting lifespan in model organisms. Provides structured, read-only SQL access to experimentally validated datasets with schema documentation, example queries, and integrated quality assurance. Supports interaction via STDIO, HTTP, and SSE modes, with automatic data updates from the Hugging Face Hub.

Key Features

Implements the Model Context Protocol (MCP) for database standardization
Provides read-only SQL access to SynergyAge experimental data
Automatic data retrieval and updates from the Hugging Face Hub
Comprehensive schema documentation and example queries
Supports multiple interaction modes: STDIO, HTTP, Server-Sent Events
Integration with AI assistants and development tools
Validated, curated data covering various model organisms
Interactive network visualization and categorized search results
Epistasis and genetic interaction analysis tools
Extensive safety features including input validation and error handling

Use Cases

Querying top genetic interventions associated with lifespan extension in various organisms
Identifying synergistic, antagonistic, and additive genetic interactions
Integrating longevity data into AI assistants or chat-based research tools
Retrieving schema and table documentation for programmatic access
Analyzing pathways and gene combinations influencing aging
Comparing intervention effects across species or experimental conditions
Developing research workflows with up-to-date, validated genetic data
Automating quality-controlled data analysis through AI agents
Visualizing and exploring genetic relationships and interaction networks
Assessing temperature-dependent and pathway-specific effects on lifespan

README

synergy-age-mcp

Tests CI PyPI version Python 3.10+ License: MIT Code style: black

MCP (Model Context Protocol) server for SynergyAge database

This server implements the Model Context Protocol (MCP) for SynergyAge, providing a standardized interface for accessing synergistic genetic intervention and aging research data. MCP enables AI assistants and agents to query comprehensive longevity datasets through structured interfaces.

The server automatically downloads the latest SynergyAge database and documentation from Hugging Face Hub (specifically from the synergy-age folder), ensuring you always have access to the most up-to-date data without manual file management.

The SynergyAge database contains:

  • models: Experimentally validated genetic interventions and their effects on lifespan across model organisms
  • model_interactions: Synergistic, antagonistic, and epistatic interactions between genetic interventions
  • Data for multiple model organisms: C. elegans, Drosophila melanogaster, mice, and other aging research models
  • Quantitative lifespan effects: Precise measurements of intervention effectiveness

Usage Example

SynergyAge MCP Usage Example

Here's how the SynergyAge MCP server works in practice with AI assistants:

Example showing how to query the SynergyAge database through an AI assistant using natural language, which gets translated to SQL queries via the MCP server. You can use this database both in chat interfaces for research questions and in AI-based development tools (like Cursor, Windsurf, VS Code with Copilot) to significantly improve your aging and longevity research productivity by having direct access to synergistic intervention data while coding.

Understanding Genetic Interactions

The SynergyAge database focuses on different types of genetic interactions that affect lifespan:

SynergyAge Genetic Interactions

Figure: Types of genetic interactions in longevity research - synergistic, antagonistic, and additive effects between genetic interventions (Source: SynergyAge.info)

  • Synergistic interactions: Combined interventions produce greater effects than the sum of individual effects
  • Antagonistic interactions: Combined interventions produce smaller effects than expected, with one intervention suppressing another
  • Additive interactions: Combined interventions produce effects equal to the sum of individual effects

If you want to understand more about what the Model Context Protocol is and how to use it more efficiently, you can take the DeepLearning AI Course or search for MCP videos on YouTube.

About MCP (Model Context Protocol)

MCP is a protocol that bridges the gap between AI systems and specialized domain knowledge. It enables:

  • Structured Access: Direct connection to authoritative synergistic aging intervention data
  • Natural Language Queries: Simplified interaction with specialized databases through SQL
  • Type Safety: Strong typing and validation through FastMCP
  • AI Integration: Seamless integration with AI assistants and agents

About SynergyAge

SynergyAge is a curated database containing experimentally validated data on genetic interventions affecting lifespan across multiple model organisms. The database focuses on both single-gene mutants and multi-gene combinations to understand genetic interactions in aging.

Data Validation & Quality

The SynergyAge data undergoes rigorous validation at three levels:

  1. Curation Level: Only papers with experimentally validated results are selected for inclusion
  2. Import Validation: Automatic checks ensure no missing values or incorrect data formats
  3. Post-deployment: Manual investigation of outliers and random entries, with lifespan distributions plotted for each mutant at different temperatures

All survival curves from included papers are manually verified to ensure data accuracy.

Key Features

  • Comprehensive Search: Text search supporting multiple genes (comma or semicolon separated)
  • Categorized Results: Search results grouped into four categories:
    • Mutants with interventions in all searched genes
    • Single-gene mutants (1-mutants)
    • Multi-gene mutants with subset interventions (n-mutants)
    • Extended combinations including additional genes
  • Interactive Network Visualization: Visual exploration of mutant relationships with nodes representing lifespan models and edges showing genetic intervention relationships
  • Epistasis Analysis: Assessment of genetic interactions between modulated genes
  • External Integration: Links to KEGG pathways and model-specific databases for enhanced context

Data Source and Updates

The SynergyAge MCP server automatically downloads data from the longevity-genie/bio-mcp-data repository on Hugging Face Hub. This ensures:

  • Always Up-to-Date: Automatic access to the latest SynergyAge database without manual updates
  • Reliable Distribution: Centralized data hosting with version control and change tracking
  • Efficient Caching: Downloaded files are cached locally to minimize network requests
  • Fallback Support: Local fallback files are supported for development and offline use

The data files are stored in the synergy-age subfolder of the Hugging Face repository and include:

  • synergy-age.sqlite - The complete SynergyAge database
  • synergyage_prompt.txt - Database schema documentation and usage guidelines

Available Tools

This server provides three main tools for interacting with the SynergyAge database:

  1. synergyage_db_query(sql: str) - Execute read-only SQL queries against the SynergyAge database
  2. synergyage_get_schema_info() - Get detailed schema information including tables, columns, and data descriptions
  3. synergyage_example_queries() - Get a list of example SQL queries with descriptions

Available Resources

  1. resource://db-prompt - Complete database schema documentation and usage guidelines
  2. resource://schema-summary - Formatted summary of tables and their purposes

Quick Start

Installing uv

bash
# Download and install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Verify installation
uv --version
uvx --version

uvx is a very nice tool that can run a python package installing it if needed.

Running with uvx

You can run the synergy-age-mcp server directly using uvx without cloning the repository:

bash
# Run the server in streamed http mode (default)
uvx synergy-age-mcp

STDIO Mode (for MCP clients that require stdio, can be useful when you want to save files)

bash
# Or explicitly specify stdio mode
uvx synergy-age-mcp stdio

HTTP Mode (Web Server)

bash
# Run the server in streamable HTTP mode on default (3002) port
uvx synergy-age-mcp server

# Run on a specific port
uvx synergy-age-mcp server --port 8000

SSE Mode (Server-Sent Events)

bash
# Run the server in SSE mode
uvx synergy-age-mcp sse

In cases when there are problems with uvx often they can be caused by cleaning uv cache:

uv cache clean

The HTTP mode will start a web server that you can access at http://localhost:3002/mcp (with documentation at http://localhost:3002/docs). The STDIO mode is designed for MCP clients that communicate via standard input/output, while SSE mode uses Server-Sent Events for real-time communication.

Note: Currently, we do not have a Swagger/OpenAPI interface, so accessing the server directly in your browser will not show much useful information. To explore the available tools and capabilities, you should either use the MCP Inspector (see below) or connect through an MCP client to see the available tools.

Configuring your AI Client (Anthropic Claude Desktop, Cursor, Windsurf, etc.)

We provide preconfigured JSON files for different use cases:

  • For STDIO mode (recommended): Use mcp-config-stdio.json
  • For HTTP mode: Use mcp-config.json
  • For local development: Use mcp-config-stdio-debug.json

Configuration Video Tutorial

For a visual guide on how to configure MCP servers with AI clients, check out our configuration tutorial video for our sister MCP server (biothings-mcp). The configuration principles are exactly the same for the SynergyAge MCP server - just use the appropriate JSON configuration files provided above.

Inspecting SynergyAge MCP server

If you want to inspect the methods provided by the MCP server, use npx (you may need to install nodejs and npm):

For STDIO mode with uvx:

bash
npx @modelcontextprotocol/inspector --config mcp-config-stdio.json --server synergy-age-mcp

For HTTP mode (ensure server is running first):

bash
npx @modelcontextprotocol/inspector --config mcp-config.json --server synergy-age-mcp

For local development:

bash
npx @modelcontextprotocol/inspector --config mcp-config-stdio-debug.json --server synergy-age-mcp

You can also run the inspector manually and configure it through the interface:

bash
npx @modelcontextprotocol/inspector

After that you can explore the tools and resources with MCP Inspector at http://127.0.0.1:6274 (note, if you run inspector several times it can change port)

Integration with AI Systems

Simply point your AI client (like Cursor, Windsurf, ClaudeDesktop, VS Code with Copilot, or others) to use the appropriate configuration file from the repository.

Repository setup

bash
# Clone the repository
git clone https://github.com/longevity-genie/synergy-age-mcp.git
cd synergy-age-mcp
uv sync

Running the MCP Server

If you already cloned the repo you can run the server with uv:

bash
# Start the MCP server locally (HTTP mode)
uv run server

# Or start in STDIO mode  
uv run stdio

# Or start in SSE mode
uv run sse

Database Schema

Main Tables

  • models (12 columns): Experimental genetic intervention data with lifespan effects across model organisms
  • model_interactions (3 columns): Synergistic, antagonistic, and epistatic interactions between genetic interventions

Key Fields

  • id: Unique identifier for each genetic intervention model
  • tax_id: NCBI Taxonomy ID for the model organism
  • name: Descriptive name of the genetic intervention
  • genes: Target genes for the intervention
  • temp: Experimental temperature conditions
  • lifespan: Measured lifespan values
  • effect: Quantitative effect on lifespan (percentage change)
  • details: Detailed description of the intervention method
  • interaction_type: Classification of genetic interactions
  • phenotype_comparison: Description of interaction effects

Example Queries

sql
-- Get top genetic interventions with highest lifespan effects
SELECT genes, effect, details, model_organism 
FROM models 
WHERE effect > 0 
ORDER BY effect DESC 
LIMIT 10;

-- Find synergistic interactions in C. elegans
SELECT m1.genes as gene1, m2.genes as gene2, mi.phenotype_comparison 
FROM model_interactions mi 
JOIN models m1 ON mi.id1 = m1.id 
JOIN models m2 ON mi.id2 = m2.id 
WHERE m1.tax_id = 6239 AND m2.tax_id = 6239
AND mi.phenotype_comparison LIKE '%synergistic%';

-- Compare insulin signaling pathway effects across organisms
SELECT tax_id, genes, effect, details 
FROM models 
WHERE genes LIKE '%daf-2%' OR genes LIKE '%InR%' OR genes LIKE '%IGF1R%'
ORDER BY tax_id, effect DESC;

-- Find interventions with antagonistic interactions
SELECT m1.genes, m2.genes, mi.phenotype_comparison 
FROM model_interactions mi 
JOIN models m1 ON mi.id1 = m1.id 
JOIN models m2 ON mi.id2 = m2.id 
WHERE mi.phenotype_comparison LIKE '%antagonistic%' 
   OR mi.phenotype_comparison LIKE '%suppress%';

-- Get average lifespan effects by organism
SELECT tax_id, COUNT(*) as intervention_count, 
       AVG(effect) as avg_effect, 
       MAX(effect) as max_effect 
FROM models 
WHERE effect IS NOT NULL 
GROUP BY tax_id 
ORDER BY avg_effect DESC;

Safety Features

  • Read-only access: Only SELECT queries are allowed
  • Input validation: Blocks INSERT, UPDATE, DELETE, DROP, CREATE, ALTER, TRUNCATE operations
  • Error handling: Comprehensive error handling with informative messages

Testing & Verification

The MCP server is provided with comprehensive tests including LLM-as-a-judge tests that evaluate the quality of responses to complex queries. However, LLM-based tests are disabled by default in CI to save costs.

Environment Setup for LLM Agent Tests

If you want to run LLM agent tests that use MCP functions with Gemini models, you need to set up a .env file with your Gemini API key:

bash
# Create a .env file in the project root
echo "GEMINI_API_KEY=your-gemini-api-key-here" > .env

Note: The .env file and Gemini API key are only required for running LLM agent tests. All other tests and basic MCP server functionality work without any API keys.

Running Tests

Run tests for the MCP server:

bash
uv run pytest -vvv -s

You can also run manual tests:

bash
uv run python tests/manual_test_questions.py

You can use MCP inspector with locally built MCP server same way as with uvx.

Note: Using the MCP Inspector is optional. Most MCP clients (like Cursor, Windsurf, etc.) will automatically display the available tools from this server once configured. However, the Inspector can be useful for detailed testing and exploration.

If you choose to use the Inspector via npx, ensure you have Node.js and npm installed. Using nvm (Node Version Manager) is recommended for managing Node.js versions.

Example questions that MCP helps to answer

  • What are the synergistic interactions involving daf-2 mutations in C. elegans?
  • Which genetic interventions show the largest positive effects on lifespan in C. elegans?
  • What types of synergistic interactions are found between longevity interventions?
  • How do insulin signaling pathway interventions compare across different model organisms?
  • Which interventions show negative effects on lifespan and why?
  • Which genetic interventions show the strongest synergistic effects in C. elegans?
  • What are the most effective single-gene interventions for lifespan extension across model organisms?
  • How do insulin signaling pathway interventions compare between C. elegans, Drosophila, and mice?
  • Which genetic combinations show antagonistic interactions that reduce lifespan benefits?
  • What is the relationship between daf-2 and daf-16 mutations in C. elegans longevity?
  • Which interventions target similar pathways but show different interaction patterns?
  • What are the temperature-dependent effects of genetic interventions on lifespan?
  • Which model organism shows the highest average lifespan extension from genetic interventions?
  • How do caloric restriction mimetics interact with other longevity interventions?
  • What genetic interventions show consistent effects across different strains or conditions?
  • Which pathways are most commonly targeted in successful longevity interventions?
  • How do single mutants compare to double or triple mutants in terms of lifespan effects?
  • What is the distribution of positive vs negative lifespan effects across all interventions?
  • Which genes show the most experimental validation across different studies?
  • How do oxidative stress response pathways interact with other longevity mechanisms?
  • What interventions show epistatic relationships indicating pathway dependencies?
  • Which genetic combinations produce super-additive longevity effects?
  • How do mitochondrial interventions synergize with other cellular pathways?

Contributing

We welcome contributions from the community! ๐ŸŽ‰ Whether you're a researcher, developer, or enthusiast interested in aging and longevity research, there are many ways to get involved:

We especially encourage you to try our MCP server and share your feedback with us! Your experience using the server, any issues you encounter, and suggestions for improvement are incredibly valuable for making this tool better for the entire research community.

Ways to Contribute

  • ๐Ÿ› Bug Reports: Found an issue? Please open a GitHub issue with detailed information
  • ๐Ÿ’ก Feature Requests: Have ideas for new functionality? We'd love to hear them!
  • ๐Ÿ“ Documentation: Help improve our documentation, examples, or tutorials
  • ๐Ÿงช Testing: Add test cases, especially for edge cases or new query patterns
  • ๐Ÿ” Data Quality: Help identify and report data inconsistencies or suggest improvements
  • ๐Ÿš€ Performance: Optimize queries, improve caching, or enhance server performance
  • ๐ŸŒ Integration: Create examples for new MCP clients or AI systems
  • ๐ŸŽฅ Tutorials & Videos: Create tutorials, video guides, or educational content showing how to use MCP servers
  • ๐Ÿ“– User Stories: Share your research workflows and success stories using our MCP servers
  • ๐Ÿค Community Outreach: Help us evangelize MCP adoption in the aging research community

Tutorials, videos, and user stories are especially valuable to us! We're working to push the aging research community toward AI adoption, and real-world examples of how researchers use our MCP servers help demonstrate the practical benefits and encourage wider adoption.

Getting Started

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes and add tests
  4. Run the test suite (uv run pytest)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to your branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Development Guidelines

  • Follow the existing code style (we use black for formatting)
  • Add tests for new functionality
  • Update documentation as needed
  • Keep commits focused and write clear commit messages

Questions or Ideas?

Don't hesitate to open an issue for discussion! We're friendly and always happy to help newcomers get started. Your contributions help advance open science and longevity research for everyone. ๐Ÿงฌโœจ

Known Issues

Database Coverage

The SynergyAge MCP server currently provides access to the core experimental data tables. Future versions may include additional metadata tables and extended functionality based on community feedback and research needs.

Test Coverage

While we provide comprehensive tests including LLM-as-a-judge evaluations, not all test cases have been manually verified against the actual SynergyAge web interface. Some automated test results may need manual validation to ensure accuracy. Contributions to improve test coverage and validation are welcome.

License

This project is licensed under the MIT License.

Citations

If you use SynergyAge data in your research, please cite:

Bunu, G., Toren, D., Ion, C. et al. SynergyAge, a curated database for synergistic and antagonistic interactions of longevity-associated genes. Sci Data 7, 366 (2020). https://doi.org/10.1038/s41597-020-00710-z

Acknowledgments

This project is part of the Longevity Genie organization, which develops open-source AI assistants and libraries for health, genetics, and longevity research.

Other MCP Servers by Longevity Genie

We also develop other specialized MCP servers for biomedical research:

  • opengenes-mcp - MCP server for OpenGenes database, providing access to aging-related gene data, lifespan experiments, and longevity associations
  • biothings-mcp - MCP server for BioThings.io APIs, providing access to gene annotation (mygene.info), variant annotation (myvariant.info), and chemical compound data (mychem.info)

We are supported by:

HEALES

HEALES - Healthy Life Extension Society

and

IBIMA

IBIMA - Institute for Biostatistics and Informatics in Medicine and Ageing Research

Star History

Star History Chart

Repository Owner

longevity-genie
longevity-genie

Organization

Repository Details

Language Python
Default Branch main
Size 1,270 KB
Contributors 1
License MIT License
MCP Verified Sep 5, 2025

Programming Languages

Python
100%

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • awslabs/mcp

    awslabs/mcp

    Specialized MCP servers for seamless AWS integration in AI and development environments.

    AWS MCP Servers is a suite of specialized servers implementing the open Model Context Protocol (MCP) to bridge large language model (LLM) applications with AWS services, tools, and data sources. It provides a standardized way for AI assistants, IDEs, and developer tools to access up-to-date AWS documentation, perform cloud operations, and automate workflows with context-aware intelligence. Featuring a broad catalog of domain-specific servers, quick installation for popular platforms, and both local and remote deployment options, it enhances cloud-native development, infrastructure management, and workflow automation for AI-driven tools. The project includes Docker, Lambda, and direct integration instructions for environments such as Amazon Q CLI, Cursor, Windsurf, Kiro, and VS Code.

    • โญ 6,220
    • MCP
    • awslabs/mcp
  • cloudflare/mcp-server-cloudflare

    cloudflare/mcp-server-cloudflare

    Connect Cloudflare services to Model Context Protocol (MCP) clients for AI-powered management.

    Cloudflare MCP Server enables integration between Cloudflare's suite of services and clients using the Model Context Protocol (MCP). It provides multiple specialized servers that allow AI models to access, analyze, and manage configurations, logs, analytics, and other features across Cloudflare's platform. Users can leverage natural language interfaces in compatible MCP clients to read data, gain insights, and perform automated actions on their Cloudflare accounts. This project aims to streamline the orchestration of security, development, monitoring, and infrastructure tasks through standardized MCP connections.

    • โญ 2,919
    • MCP
    • cloudflare/mcp-server-cloudflare
  • mindsdb

    mindsdb

    Connect, unify, and query data at scale with an open-source AI platform.

    MindsDB enables seamless connection to and unification of data from hundreds of enterprise sources, allowing for highly accurate responses across large-scale federated systems. It provides an open-source server with built-in support for the Model Context Protocol (MCP) to facilitate standardized interaction with AI-driven question answering over diverse data sets. The platform offers tools for preparing, organizing, and transforming both structured and unstructured data via knowledge bases, views, and scheduled jobs. Its agent framework and SQL interface empower users to configure data-centric agents, automate workflows, and interact with data conversationally.

    • โญ 35,487
    • MCP
    • mindsdb/mindsdb
  • anyquery

    anyquery

    Universal SQL query engine for files, databases, apps, and LLM integration.

    Anyquery is a SQL query engine that enables users to run SQL queries on a wide array of data sources, including files, databases, and popular applications via plugins. It supports integrations with large language models (LLMs) through the Model Context Protocol (MCP), providing seamless access for AI models to query data. Built on SQLite, it extends functionality with a plugin system and can also function as a MySQL server for compatibility with conventional SQL clients. Its flexible installation options and broad plugin ecosystem allow extensive customization and integration.

    • โญ 1,298
    • MCP
    • julien040/anyquery
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results