POLYMER GENOMICS
Developers·Quickstart · SDK · MCP
§ DEVELOPERS · 60-second quickstart · SDK + MCP + REST

Build with Polymer

Genome-wide DNA biophysics in your stack. Python SDK, R bindings, TypeScript SDK, and an MCP server with 70 tools for AI agents. Every response carries provenance.

§0160-second quickstartinstall · auth · first call
1Install the SDK
bash
pip install polymer-genomics
2Get an API key

Sign in at polymerbio.org/account and copy your POLY_… key. Free tier: 1,000 requests/day.

3Fetch your first region
python
from polymer_genomics import PolymerClient

client = PolymerClient(api_key="POLY_...")

region = client.regions.fetch("hg38", "chr17:7668421-7687490")
print(region.stacking_dg37.mean)   # -8.42 kcal/mol
§02Pick your stackPython · curl · R · TypeScript
python
from polymer_genomics import PolymerClient

client = PolymerClient(api_key="POLY_...")

# 1. Fetch genome-wide biophysics for TP53
region = client.regions.fetch("hg38", "chr17:7668421-7687490")
print(region.stacking_dg37.mean)            # -8.42 kcal/mol
print(region.cpg_sites.count)                # 47

# 2. Run the physics linter on your own sequence
result = client.evaluate("ATGCGATCG...", analysis="full")
print(result.summary.gc_content, result.flag_counts.warnings)

# 3. Search for genes
hits = client.search.genes("TP53")
for h in hits:
    print(h.symbol, h.chromosome)
§03Recipes4 common patterns
01

Cross-layer region query

Fetch biophysics + CpG sites + EPIC v2 probes in one call. Single round-trip; agent-optimized response.

python
region = client.regions.fetch(
  "hg38", "chr17:7668421-7687490",
  layers=["biophysics", "cpg_sites", "probe_epic_v2"],
)
print(region.cpg_sites.count, region.probe_epic_v2.count)
02

Batch evaluate (constructs / CDS panels)

Send up to 1,000 sequences in one POST. Returns per-sequence flags and a summary roll-up.

python
batch = client.evaluate_batch([
  {"name": "TP53_ex2", "sequence": "ATGCG..."},
  {"name": "TP53_ex3", "sequence": "CGCGC..."},
  # ...
])
for r in batch.results:
    print(r.name, r.flag_counts.warnings)
03

Apply a methylation clock

Predict age from a beta matrix using any of the 6 supported clocks.

python
ages = client.clocks.predict(
  betas=betas,             # pandas.DataFrame or path to CSV
  clock="horvath",         # horvath | hannum | phenoage | grimage | retro_age | dunedinpace
)
print(ages.head())
04

Aggregate genome-wide

For atlas-scale overviews, request pre-binned counts instead of bp-resolution data.

python
agg = client.aggregation.fetch(
  "hg38", "chr17:1-83257441",
  layers=["cpg_sites", "probe_epic_v2"],
  resolution=1_000_000,
)
for bin in agg.cpg_sites.bins:
    print(bin.start, bin.count)
§04For AI agents · MCP70 tools

Polymer exposes its full API to LLM agents through a Model Context Protocol server. Add it to Claude Desktop, Cursor, or your in-house agent in one line.

json
{
  "mcpServers": {
    "polymer": {
      "command": "uvx",
      "args": ["polymer-mcp", "serve"],
      "env": { "POLYMER_API_KEY": "POLY_..." }
    }
  }
}
Full MCP tool reference
50 layers · versions · licenses
Data inventory
Browse every layer with citation, version, content hash, and license.
View data sources