MCP ExplorerExplorer

Gen3 Mcp

@delocalizeron 9 months ago
4 MIT
FreeCommunity
AI Systems
A Model Context Protocol (MCP) server for interacting with Gen3 data commons.

Overview

What is Gen3 Mcp

gen3-mcp is a Model Context Protocol (MCP) server designed for interacting with Gen3 data commons, providing GraphQL query validation to minimize errors and enhance data retrieval accuracy.

Use cases

Use cases for gen3-mcp include validating and executing GraphQL queries to retrieve genomic data, exploring data schemas, and integrating Gen3 data commons into chat applications for enhanced user interaction.

How to use

To use gen3-mcp, clone the repository, install the necessary dependencies, create a credentials file with your Gen3 API key, and configure your chat client to connect to the MCP server. Example configurations are provided in the README.

Key features

Key features of gen3-mcp include schema discovery tools for understanding entity relationships, query building tools for generating safe and validated GraphQL queries, and a query execution tool for running these queries against the Gen3 data commons.

Where to use

gen3-mcp is primarily used in data science, bioinformatics, and research environments where access to Gen3 data commons is required for data analysis and management.

Content

Gen3 MCP Server

A Model Context Protocol (MCP) server for interacting with Gen3 data commons, with GraphQL query validation to reduce hallucinations.

Install and Configure

These instructions are for using the server in a chat client. For development, see Development.

# Clone the repository
git clone <repository-url>

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

Create Gen3 credentials file

Create a file credentials.json containing your Gen3 API key:

{
  "api_key": "xxxx",
  "key_id": "xxxx"
}

Configure chat client

Example for Claude Desktop ~/.config/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "gen3-mcp-server": {
      "command": "uvx",
      "args": [
        "--from",
        "/path/to/gen3-mcp",
        "gen3-mcp"
      ],
      "env": {
        "GEN3_CREDENTIALS_FILE": "/path/to/credentials.json",
        "GEN3_BASE_URL": "https://gen3.datacommons.io/",
        "GEN3_LOG_LEVEL": "INFO"
      }
    }
  }
}

Example Usage in chat client

Screenshot of Claude chat

Available Tools

The MCP server provides the following tools:

Schema Discovery Tools

  • get_schema_summary() - Get annotated overview of all entities and their relationships
  • get_schema_entity(entity) - Get detailed schema info about a specific entity including all fields

Query Building Tools

  • generate_query_template(entity_name, include_relationships=True, max_fields=20) - Generate safe query templates with validated fields
  • validate_query(query) - Validate GraphQL query syntax and field names against schema

Query Execution Tool

  • execute_graphql(query) - Execute validated GraphQL queries against the Gen3 data commons

Acknowledgments

Built with MCP (Model Context Protocol) and designed for Gen3 Data Commons.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers