pairix-mcp

Local

An MCP server for pairix — a fast indexer and query tool for bgzipped .pairs files used in Hi-C data analysis.

Add to your MCP Client

LocalLinuxmacOSWindows

Add the following to your claude_desktop_config.json (or equivalent MCP config file):

{
  "mcpServers": {
    "pairix-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/pairix-mcp",
        "run",
        "main.py"
      ]
    }
  }
}

pairix-mcp

An MCP server for pairix — a fast indexer and query tool for bgzipped .pairs files used in Hi-C data analysis.

Tools

ToolDescription
check_pairix_installedCheck whether pairix and bgzip are installed and accessible
install_pairixInstall pairix into the MCP server's Python environment (macOS/Linux)
install_pairix_windowsInstall pairix inside WSL on Windows
pairix_indexBuild a .px2 index for a bgzipped .pairs file
pairix_queryQuery an indexed .pairs file by 1D or 2D genomic region
check_job_statusPoll the status of a background job
list_jobsList all background jobs in the current session

Typical Hi-C workflow

1. pairix_index(input_pairs_gz="sample.pairs.gz", preset="pairs")
   → sample.pairs.gz.px2

2. pairix_query(
       input_pairs_gz="sample.pairs.gz",
       regions=["chr1:1000000-2000000|chr2:5000000-6000000"]
   )
   → returns matching pair records

Note: The input must already be bgzipped. Use a separate bgzip tool or bgzip CLI before indexing.

Region formats

  • 2D region: "chr1:1000000-2000000|chr2:5000000-6000000" — pairs where end1 is in chr1 window AND end2 is in chr2 window
  • 1D region: "chr1:1000000-2000000" — pairs where either end falls in the window

Installation

cd pairix-mcp
uv sync
uv run main.py

MCP config

{
  "mcpServers": {
    "pairix-mcp": {
      "command": "uv",
      "args": ["--directory", "/path/to/pairix-mcp", "run", "main.py"]
    }
  }
}