POLYMER

Developers / REST · Python · MCP

Build with Polymer

Use the same genomic reference data in your scripts, notebooks, and compatible AI agents.

Before you start

API access

Set your API key as POLYMER_API_KEY in your environment. REST requests send it in the X-API-Key header. To request access, contact Polymer.

Examples use GRCh38 / hg38 and 1-based, inclusive coordinates. GRCh37 / hg19 is exposed as hg37 in the API. Layer availability depends on the assembly; check data sources before switching builds. Changing the build parameter does not convert coordinates.

01 / REST

Make a region request

Fetch CpG-site annotations for an interval around TP53. Inspect the response for coordinate conventions, data versions, and resolved layers.

bash
curl 'https://api.polymerbio.org/v1/regions/hg38/chr17:7668421-7687490?layers=cpg_sites' \
  -H "X-API-Key: $POLYMER_API_KEY"

Browse the endpoint reference →

02 / Python

Bring a region into your notebook

Install the Python client, then make the same request. The client returns dictionaries; inspect the response before selecting fields.

bash
pip install polymer-genomics
python
import os
from polymer_genomics import PolymerClient

with PolymerClient(api_key=os.environ["POLYMER_API_KEY"]) as client:
    region = client.region(
        "hg38", "chr17:7668421-7687490", layers=["cpg_sites"]
    )
    print(region)

Python SDK source and examples ↗

03 / MCP

Connect a compatible agent

Install uv first; its uvx command runs the Polymer MCP package. Copy the local stdio configuration into a client that accepts mcpServers entries.

json
{
  "mcpServers": {
    "polymer-genomics": {
      "command": "uvx",
      "args": [
        "polymer-genomics-mcp"
      ],
      "env": {
        "POLYMER_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Merge this entry into your client’s MCP configuration, replace YOUR_API_KEY with your key, then reload the client. Confirm that the Polymer tools appear before making requests. Client configuration formats may differ.

Explore the MCP tool reference →