GenomicOps-MCP

t-neumann/GenomicOps-MCP

3.2

If you are the rightful owner of GenomicOps-MCP 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.

GenomicOps-MCP is a dual-mode Python server that provides genomic feature operations through both MCP and FastAPI interfaces.

Tools
1
Resources
0
Prompts
0

๐Ÿงฌ GenomicOps-MCP

GenomicOps-MCP is a dual-mode Python server that exposes genomic feature operations via:

  • ๐Ÿง  Model Context Protocol (MCP) โ€” for integration with Claude Desktop and other AI clients.
  • ๐ŸŒ FastAPI REST API โ€” for human-readable, local testing and web interaction.

It currently provides tools to query UCSC genome browser tracks, including feature overlaps and assembly listings.


๐Ÿš€ Features

  • MCP integration: Claude Desktop and other MCP-compatible LLM clients can call tools like get_overlapping_features.
  • FastAPI web API: Test and debug the same logic locally in a browser or via curl.
  • Unified backend: One codebase (src/server/mcp_server.py) supports both modes.
  • FastMCP-powered: Built with FastMCP for standard-compliant and rapid MCP development.

๐Ÿ“ Project Structure

GenomicOps-MCP/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ server/
โ”‚       โ”œโ”€โ”€ mcp_server.py        # Main MCP + FastAPI server
โ”‚       โ””โ”€โ”€ tools.py             # UCSC tools and helper functions
โ”œโ”€โ”€ pyproject.toml               # Managed by uv (Python project metadata)
โ”œโ”€โ”€ uv.lock                      # uv dependency lockfile
โ”œโ”€โ”€ .gitignore
โ””โ”€โ”€ README.md

๐Ÿงฉ Installation

1๏ธโƒฃ Prerequisites

  • Python โ‰ฅ 3.11
  • uv (recommended for managing virtual environments and dependencies)

Install uv globally (if not already):

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

2๏ธโƒฃ Clone and enter the project

git clone https://github.com/YOUR_USERNAME/GenomicOps-MCP.git
cd GenomicOps-MCP

3๏ธโƒฃ Install dependencies via uv

uv sync

This ensures your environment matches the locked versions in uv.lock.


๐Ÿง  Running in MCP Mode (for Claude Desktop)

Run the server as an MCP endpoint:

uv run src/server/mcp_server.py

This launches the MCP server over stdio, ready for a client like Claude Desktop to connect.

You should see something like:

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                            โ”‚
โ”‚        _ __ ___  _____           __  __  _____________    ____    ____     โ”‚
โ”‚       _ __ ___ .'____/___ ______/ /_/  |/  / ____/ __ \  |___ \  / __ \    โ”‚
โ”‚      _ __ ___ / /_  / __ `/ ___/ __/ /|_/ / /   / /_/ /  ___/ / / / / /    โ”‚
โ”‚     _ __ ___ / __/ / /_/ (__  ) /_/ /  / / /___/ ____/  /  __/_/ /_/ /     โ”‚
โ”‚    _ __ ___ /_/    \____/____/\__/_/  /_/\____/_/      /_____(*)____/      โ”‚
โ”‚                                                                            โ”‚
โ”‚                                                                            โ”‚
โ”‚                                FastMCP  2.0                                โ”‚
โ”‚                                                                            โ”‚
โ”‚                                                                            โ”‚
โ”‚                 ๐Ÿ–ฅ๏ธ  Server name:     ucsc-mcp                               โ”‚
โ”‚                 ๐Ÿ“ฆ Transport:       STDIO                                  โ”‚
โ”‚                                                                            โ”‚
โ”‚                 ๐ŸŽ๏ธ  FastMCP version: 2.12.4                                 โ”‚
โ”‚                 ๐Ÿค MCP SDK version: 1.16.0                                 โ”‚
โ”‚                                                                            โ”‚
โ”‚                 ๐Ÿ“š Docs:            https://gofastmcp.com                  โ”‚
โ”‚                 ๐Ÿš€ Deploy:          https://fastmcp.cloud                  โ”‚
โ”‚                                                                            โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ


[10/08/25 13:26:00] INFO     Starting MCP server 'ucsc-mcp' with transport 'stdio'

๐Ÿงฉ Add to Claude Desktop

To connect this MCP to Claude Desktop:

Option 1: Manual Configuration

Add this entry to your claude_desktop_config.json:

{
"ucsc-mcp": {
      "command": "/Users/tobias.neumann/.local/bin/uv",
      "args": [
        "run",
        "--project",
        "/Users/tobias.neumann/dev/GenomicOps-MCP",
        "--with",
        "fastmcp",
        "fastmcp",
        "run",
        "/Users/tobias.neumann/dev/GenomicOps-MCP/src/server/mcp_server.py"
      ],
      "env": {},
      "transport": "stdio",
      "type": null,
      "cwd": null,
      "timeout": null,
      "description": null,
      "icon": null,
      "authentication": null
    }
}

Then restart Claude Desktop โ€” it should detect ucsc-mcp and register the get_overlapping_features tool.

Option 2: FastMCP CLI (Recommended)

You can install the server directly into Claude Desktop with one command:

fastmcp install claude-desktop src/server/mcp_server.py \
  --python 3.11 \
  --project /Users/YOUR_USERNAME/dev/GenomicOps-MCP

๐ŸŒ Running in FastAPI Mode (for local testing)

If you want to expose the same functionality as a REST API, use the api flag:

uv run src/server/mcp_server.py api

Then open your browser at: ๐Ÿ‘‰ http://localhost:8000/docs

Youโ€™ll see interactive FastAPI documentation (Swagger UI).

Example endpoints:

MethodEndpointDescription
POST/overlapsQuery overlapping genomic features
GET/assembliesList supported genome assemblies

๐Ÿงช Example Usage (API)

POST /overlaps

curl -X POST http://localhost:8000/overlaps \
  -H "Content-Type: application/json" \
  -d '{"region": "chr1:1000-2000", "assembly": "hg38"}'

GET /assemblies

curl http://localhost:8000/assemblies

๐Ÿงฐ Development Tips

  • Run with uv
    uv run src/server/mcp_server.py
    
  • Add new tools
    Decorate Python functions with @mcp.tool() inside mcp_server.py.
  • Debug locally
    Use FastAPI mode (uv run src/server/mcp_server.py api) for quick JSON responses.

๐Ÿ“š References


Author: Tobias Neumann
License: MIT
Version: 0.1.0