OpenGenes

by longevity-genie

Not rated
GitHub

About

Access the OpenGenes database for aging and longevity research, with automatic updates from Hugging Face Hub.

Details

Author
longevity-genie
Categories
Database, Other

Setup

Install OpenGenes in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/longevity-genie/opengenes-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

MCP (Model Context Protocol) server for OpenGenes database

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

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

- lifespan_change: Experimental data about genetic interventions and their effects on lifespan across model organisms
- gene_criteria: Criteria classifications for aging-related genes (12 different categories)
- gene_hallmarks: Hallmarks of aging associated with specific genes
- longevity_associations: Genetic variants associated with longevity from population studies

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

This MCP server is part of theHoly Bio MCPproject - a unified framework for bioinformatics research thatwon the Bio x AI Hackathon 2025and continues to be actively developed and extended after the victory.

The Holy Bio MCP framework brings together multiple specialized MCP servers into a cohesive ecosystem for advanced biological research:

- gget-mcp- Genomics & sequence analysis toolkit
-
opengenes-mcp- Aging & longevity genetics (this server)
-
synergy-age-mcp- Synergistic genetic interactions in longevity
-
biothings-mcp- Foundational biological data from BioThings.io
-
pharmacology-mcp- Drug, target & ligand data

Together, these servers provide 50+ specialized bioinformatics functions that can work seamlessly together in AI-driven research workflows. Learn more about the complete framework atgithub.com/longevity-genie/holy-bio-mcp.

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

Example showing how to query the OpenGenes 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 bioinformatics productivity by having direct access to aging and longevity research data while coding.

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

- Structured Access: Direct connection to authoritative aging and longevity research 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

The OpenGenes MCP server automatically downloads data from thelongevity-genie/bio-mcp-datarepository on Hugging Face Hub. This ensures:

- Always Up-to-Date: Automatic access to the latest OpenGenes 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 theopengenessubfolder of the Hugging Face repository and include:

- open_genes.sqlite- The complete OpenGenes database
- prompt.txt- Database schema documentation and usage guidelines

This server provides three main tools for interacting with the OpenGenes database:
- opengenes_db_query(sql: str)- Execute read-only SQL queries against the OpenGenes database
- opengenes_get_schema_info()- Get detailed schema information including tables, columns, and enumerations
- opengenes_example_queries()- Get a list of example SQL queries with descriptions
- resource://db-prompt- Complete database schema documentation and usage guidelines
- resource://schema-summary- Formatted summary of tables and their purposes

# 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.

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

# Run the server in streamed http mode (default) uvx opengenes-mcp

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

# Or explicitly specify stdio mode uvx opengenes-mcp stdio
# Run the server in streamable HTTP mode on default (3001) port uvx opengenes-mcp server # Run on a specific port uvx opengenes-mcp server --port 8000
# Run the server in SSE mode uvx opengenes-mcp sse

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

The HTTP mode will start a web server that you can access athttp://localhost:3001/mcp(with documentation athttp://localhost:3001/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.)

Here's what you can copy directly into your Claude Desktop or Cursor MCP configuration:

{ "mcpServers": { "opengenes-mcp": { "command": "uvx", "args": ["opengenes-mcp"], "env": { "MCP_TRANSPORT": "stdio" } } } }

We also provide preconfigured JSON files for different use cases:

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

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

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

npx @modelcontextprotocol/inspector --config mcp-config-stdio.json --server opengenes-mcp

For HTTP mode (ensure server is running first):

npx @modelcontextprotocol/inspector --config mcp-config.json --server opengenes-mcp
npx @modelcontextprotocol/inspector --config mcp-config-stdio-debug.json --server opengenes-mcp

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

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)

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.