CMB Data MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CMB Data MCP Server Plot the Planck and ACT TT power spectra with error bars"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CMB Data MCP Server
MCP server for public CMB data: Planck PR3 component-separated CMB maps and your
own power spectrum measured from them; Planck PR3 / ACT DR6 / SPT-3G bandpowers with
covariances and lensing bandpowers; and published chains / best-fit theory (published
results, for comparison only). It covers data access, honest chi2
checks against LCDM, publication-style plots, and cross-experiment comparisons. It is part
of the cosmo-*-mcp-server family (see docs/CONVENTIONS.md).
No compiled likelihoods yet (see the TODO list below).

Data products
Maps & catalogs = component-separated CMB maps; summary statistics = power spectra /
bandpowers with covariance (including those you measure from the maps); published results =
published inference (chains, best fits), comparison only: never used as a measurement or
prior. Every tool declares its kind of data (@data_kind), results carry
metadata["data_kind"], and published-result tools are prefixed
"[Published result - for comparison only]" and get metadata["comparison_only"].
dataset | Maps & catalogs | Summary statistics | Published results (comparison only) | access |
| SMICA-noSZ T, SMICA I/Q/U, Commander I/Q/U (full, hm1, hm2); common T/P masks | pseudo-C_ell TT (EE/TE/BB) measured by | – | download on demand from IRSA (resumable parallel ranges; 201 MB–2.0 GB at nside 2048), ud_graded to nside 128–1024 and cached |
| – | binned/unbinned TT, TE, EE, low-ell BB | PLA best-fit (minimum) theory spectra | bundled binned + theory; unbinned downloaded |
| – | ACT-lite TT/TE/EE, 135×135 covariance, windows | – | download (287 kB) |
| – | MV TT/TE/EE | – | bundled |
| – | TT/TE/EE | – | bundled |
| – | PP bandpowers, 9×9 covariance | – | bundled |
| – | C_L^kk, 18×18 covariance | – | bundled |
| – | C_L^kk, 17×17 covariance, windows | – | bundled |
| – | – | posterior chains, margestats | download (65 MB) |
| – | – | ACT-lite / P-ACT chains | download (5–7 MB) |
compute_lcdm_theory_spectrum(params=...) with camb is a model computation from your
parameters (a summary-statistic tool); without camb it falls back to the published Planck best
fit and flags it model_source: published_result (comparison only).
Related MCP server: spectra-mcp-server
Tools (16 science/meta + 4 dispatch)
tool | what it does |
| dataset registry: products, units, verified URLs, citations |
| server-side recipes (also exposed as MCP prompts) |
Maps | |
| Planck PR3 SMICA-noSZ / SMICA / Commander map (full or half-mission) + common mask, downloaded once and ud_graded to nside 128–1024 (cached, muK, RING, Galactic). Dispatch kernel |
| Mollweide PNG with the mask greyed out, rms in the mask |
| from map to power spectrum: masked pseudo-C_ell (healpy anafast; |
Summary statistics | |
| TT/TE/EE/BB/PP bandpowers written to a tidy CSV (+ covariance |
| D_ell with errors, multi-experiment overlay, best-fit LCDM, residual panel |
| chi2 / PTE against a theory spectrum. Uses the full covariance and windows for ACT and lensing; diagonal (indicative) for Planck/SPT plotting products |
| camb LCDM spectra from your parameters (optional dependency, lazy import, dispatchable). Falls back to the bundled Planck 2018 best-fit file (published result, flagged) |
| Planck/ACT/SPT [L(L+1)]^2 C_L^phiphi/2pi with LCDM, plus a fitted A_lens per experiment |
Published results (comparison only) | |
| downloads and extracts ONE public chain (Planck 2018 plikHM TTTEEE+lowl+lowE+lensing, 65 MB; ACT DR6 ACT-lite / P-ACT, 5–7 MB) |
| getdist marginal stats (mean, std, 68/95% limits). Dispatch kernel downloads the chain on the node |
| getdist triangle plot overlaying up to 3 chains |
| whisker plot of H0/S8/Om/ns/sigma8 from chains and cited published tables, with n-sigma tensions |
| hep-genesis IRI dispatch (family convention) |
Datasets (details)
key | access | content |
| on demand (IRSA) |
|
| bundled binned spectra + best-fit theory; unbinned spectra downloaded | PLA R3.01/R3.02 TT/TE/EE, low-ell BB, base_plikHM_TTTEEE_lowl_lowE_lensing minimum theory |
| download (287 kB) | ACT DR6 CMB-only (ACT-lite) sacc: 135 bandpowers, covariance, windows |
| bundled | SPT-3G D1 MV foreground-cleaned TT/TE/EE |
| bundled | SPT-3G 2018 TT/TE/EE MV bandpowers |
| bundled | 2018 conservative lensing bandpowers + CMB-marginalised covariance |
| bundled (extracted from the 361 MB tarball) | DR6 lensing baseline bins + covariance |
| bundled | D1 GMV lensing bandpowers, covariance, windows |
| download (65 MB) | single-family PLA zip, not the 11 GB grid |
| download | ACT-lite and P-ACT-lite LCDM Cobaya chains |
Provenance for every bundled file is in data/README.md.
Sanity checks (verified by tests)
Map → spectrum (real run, 2026-11-04): SMICA-noSZ hm1×hm2 at nside 1024, common mask (1° apodisation, fsky_w2 = 0.752), lmax 2000: first peak at ℓ = 225, D_ℓ = 5706 μK² (Planck released 5793 μK² in that bin). Ratio to the released Planck TT bandpowers over 30 < ℓ < 1500: median 1.023, rms deviation 4.7 %, max 10 %: within ±4 % for 100 < ℓ < 1000; the lowest bin (ℓ ≈ 48) is −6.5 % (cosmic variance plus the fsky approximation) and ℓ ≈ 1000–1500 sits +4–10 % high (unmodelled residual foregrounds/point sources and no mode-coupling inversion). The full-mission auto-spectrum agrees to ≈3 % below ℓ ~ 900, but noise bias then grows to +27 % at ℓ ≈ 1500. Use the half-mission cross. Map rms in the mask is 106.9 μK at nside 1024. Download: 600 MB in ~6 min (0.8–1.2 MB/s).
Planck 2018 chain: H0 = 67.36 ± 0.54, Ωm = 0.3153 ± 0.0073, σ8 = 0.8111 ± 0.0060 (getdist output equals the PLA margestats).
Planck TT binned vs best fit: χ² ≈ 82.7 for 83 points. Lensing A_lens: Planck 1.01 ± 0.03, ACT 1.02 ± 0.03.
SH0ES vs Planck H0: 4.9σ. KiDS S8: −3.1σ. DES Y3 S8: −2.6σ.
Skills
cmb-tour (map → power spectrum → own fit → compare), planck-map-to-power-spectrum (from map to power spectrum, new),
reproduce-planck-tt-spectrum, cmb-experiment-comparison,
h0-s8-tension-whisker (published results, for comparison only), hpc-dispatch-handoff.
Install / run
uv venv --python 3.12 .venv && uv pip install --python .venv/bin/python -e ".[dev]"
uv pip install --python .venv/bin/python --only-binary :all: camb # optional (".[theory]")
uv pip install --python .venv/bin/python --only-binary :all: pymaster # optional (".[namaster]"; Linux/arm64 wheels)
.venv/bin/python -m mcp_server --transport stdio # or ./run_server.sh
.venv/bin/python -m mcp_server --transport streamable-http --port 8012
MPLBACKEND=Agg .venv/bin/python -m pytest -q # -m "not network" offlineKnown limitations
The Planck and SPT-3G D1 spectra are the release plotting products, which ship no covariance. Their χ² values are diagonal-only and indicative.
ACT DR6 χ² fixes A_act = P_act = 1.
The SPT-3G D1 lensing A_lens comes out ≈ 0.92. candl's lensing-systematics emulator and M_L response corrections are not applied, so this is a known bias, not a physical result.
The bundled theory stops at ℓ = 2508. ACT/SPT bins beyond that need camb (
lmax=6600).ACT chain Ωm is derived assuming Σmν = 0.06 eV. ACT burn-in is 0.3, since LAMBDA lists none for the lite chains.
Maps: there is no official nside-1024 PR3 SMICA map (PR2 had one), so the 2048 file is always downloaded first and then downgraded.
smica_nosz(403 MB, T only) is the default; Q/U needssmica(2.0 GB) orcommander(1.6 GB), which are implemented but were only HEAD/range-verified here.measure_cmb_power_spectrumuses pseudo-C_ell/fsky with no mode-coupling inversion (usemethod="namaster"where pymaster installs) and Knox cosmic-variance errors (no noise term, no foreground model). Polarisation spectra from SMICA are implemented but not validated.
TODO — Phase 2: pip likelihoods (not implemented)
Planck: HiLLiPoP (PR4 high-ℓ TT/TE/EE) and LoLLiPoP (PR4 low-ℓ EE/BB), via
planck-npipe/ cobaya.ACT: act_dr6_lenslike (full lensing likelihood with linear corrections), plus the ACT DR6 multi-frequency MFLike.
SPT: candl +
spt_candl_data(SPT-lite TT/TE/EE and D1 lensing with its systematics emulator).Tools:
evaluate_cmb_likelihood(theory_file, likelihood), plus a profile likelihood in one parameter (heavy, dispatchable).
TODO — more maps
Done: Planck PR3 SMICA/Commander maps, masks, and the power spectrum from maps.
Not yet: the Planck PR3 lensing κ alm (
COM_Lensing_4096_R3.00.tgz, 723 MB, URL HEAD-verified; IRSA served it at <0.1 MB/s during development, so no tool reads it yet), ACT DR6 maps / κ map (pixell), PR4 (NPIPE) maps, SPT-3G D1 maps, cutouts, and cross-correlation with galaxy surveys.
Available Tools
20 toolsanalyze_chainA
[Published result - for comparison only] Published result, comparison only: getdist marginal statistics (mean, std, 68/95%) of a PUBLISHED chain.
Use only to compare against your own fit of maps / bandpowers; never feed these numbers into a fit as a measurement or prior.
Heavy: downloads/extracts the chain on first use. With set_dispatch('polaris'| 'perlmutter') it runs as one facility job (the node downloads the archive itself). Sanity check (Planck 2018): H0 67.36+-0.54, omegam 0.3153+-0.0073, sigma8 0.8111+-0.0060.
Inputs: output_dir (required), chain, params, ignore_rows. Returns: Uniform result contract returned by every tool.
auth_statusA
Report the facility sign-in state THIS server sees for its own HPC dispatch (ALCF and NERSC).
Call this before set_dispatch to a remote site, or when one of this
server's remote calls fails with an auth error. It says nothing about
the facility servers' own tokens - ask those servers directly. Sign-in
happens outside this server (hep-genesis auth CLIs or the desktop app's
HPC panel); tokens are re-read on every call.
Inputs: no named parameters. Returns: result
compare_with_published_constraintsA
[Published result - for comparison only] Published result, comparison only: whisker plot of PUBLISHED H0, S8, Omega_m, n_s (sigma8) constraints.
Every entry is a published inference product (chains or tables) across CMB experiments and late-time probes - for the final "compare with published" step of an analysis.
Every point is either a getdist analysis of a public chain (marked 'chain') or a published table value with its citation. Reports the Gaussian tension of each entry vs the reference: (x - x_ref) / sqrt(s^2 + s_ref^2) - e.g. SH0ES vs Planck H0 ~ 4.9 sigma.
Inputs: output_dir (required), chains, params, reference, +1 more. Returns: Uniform result contract returned by every tool.
compute_cmb_residualsA
chi2 of one experiment's bandpowers against an LCDM theory spectrum, plus residuals.
Uses the full covariance when the release has one (ACT DR6 TT/TE/EE block, all lensing
datasets, with Hartlap factors) and the bandpower windows when available; otherwise the
diagonal errors (Planck/SPT plotting products: chi2 is INDICATIVE, correlations ignored;
Planck unbinned uses the mean of the asymmetric errors). Reports chi2, N, PTE.
Inputs: output_dir (required), binned, dataset, ell_max, +3 more. Returns: Uniform result contract returned by every tool.
compute_lcdm_theory_spectrumA
Compute a lensed LCDM TT/TE/EE/BB + lensing-potential theory spectrum to CSV.
Model computation: with camb and YOUR parameters this is your own model for
fitting the bandpowers. Uses camb (optional dependency, lazily imported; or a facility
node via set_dispatch). Without camb and without params it falls back to the bundled
Planck 2018 published best-fit theory file (ell<=2508) - that is a published result
(comparison only), flagged in metadata.model_source; say so when reporting. Pass the CSV as theory_file to
plot_cmb_spectra / compute_cmb_residuals / plot_lensing_spectrum.
Inputs: output_dir (required), lmax, params. Returns: Uniform result contract returned by every tool.
describe_cmb_datasetB
Full description of one dataset: products, units, conventions, URLs, citation.
Inputs: name (required). Returns: Uniform result contract returned by every tool.
export_dispatch_packA
Hand THIS server's compute kernels to the client for HPC runs.
Returns the ``tools/`` package as in-band text files plus a manifest of
kernel entry points (dotted function path, args shape, node-side
pip_deps, walltime hint). The CLIENT - which holds the facility tokens,
Globus endpoint, project and workdir - stages and submits the kernels
with ITS OWN credentials (e.g. the hep-genesis facility servers'
run_pack_kernel tool). Nothing credential-shaped or project-shaped is
needed on, or returned by, this server.
Clients that recognise the ``dispatch_pack`` key should save the files
locally and NOT echo their contents into the conversation.
Inputs: no named parameters.
fetch_cmb_chainA
[Published result - for comparison only] Published result, comparison only: download and extract ONE published MCMC chain (never the 11 GB grid).
Returns the getdist chain root path (pass to analyze_chain / plot_triangle) and the parameter list. First call downloads into the cache; later calls are instant.
Inputs: output_dir (required), chain. Returns: Uniform result contract returned by every tool.
fetch_cmb_mapA
Fetch a Planck PR3 component-separated CMB MAP and its common mask, downgraded.
Use this to start any map-level analysis (own power spectrum, cutouts, cross-correlation).
The nside-2048 FITS is downloaded ONCE from IRSA with resumable parallel range requests
into the data cache, then ud_graded to `nside` (RING, Galactic, muK_CMB); the downgraded
map and mask are cached so later calls are instant. Planck PR3 SMICA/Commander beam: 5'
FWHM Gaussian. Returns the map/mask paths (pass to measure_cmb_power_spectrum /
plot_cmb_map), rms in the mask and fsky. Heavy (first call: minutes of download).
Inputs: output_dir (required), mask, nside, split, +2 more. Returns: Uniform result contract returned by every tool.
fetch_cmb_spectrumA
Fetch one public CMB bandpower spectrum and write it as a tidy CSV.
Use this first for any spectrum task. Columns: ell, D_ell, err_lo, err_hi (+ ell_min,
ell_max when bins are known; + planck_best_fit for Planck binned). Units: D_ell =
ell(ell+1)C_ell/2pi in muK^2; PP is [L(L+1)]^2 C_L^phiphi/2pi (ACT/SPT C^kk converted).
If the dataset ships a covariance (ACT DR6, all lensing) it is saved as <stem>_cov.npy.
Inputs: output_dir (required), binned, dataset, spectrum. Returns: Uniform result contract returned by every tool.
get_dispatchA
Report where THIS server's heavy tools currently execute.
Inputs: no named parameters. Returns: result
list_cmb_datasetsA
List the public datasets this server exposes. Call this first.
Products are grouped as catalogs (object-level data), summary statistics (measurements with covariance) and published results (chains / parameter constraints, for comparison only). Build analyses on catalogs and summary statistics. Each entry also gives access (bundled vs downloaded on first use) and which tools read it.
Inputs: kind. Returns: Uniform result contract returned by every tool.
list_cmb_skillsA
List this server's skills: named multi-tool recipes.
A skill is procedural know-how - which tools to chain, in which order,
with what parameters, and how to sanity-check and report. When a task
matches one, load it with the load-skill tool and follow it.
Inputs: no named parameters. Returns: Uniform result contract returned by every tool.
load_cmb_skillA
Load the full instructions of one of this server's skills and follow them.
Inputs: name (required). Returns: Uniform result contract returned by every tool.
measure_cmb_power_spectrumA
Measure the CMB TT (optionally EE/TE/BB) power spectrum FROM A MAP (from map to power spectrum).
Use this for your own spectrum from Planck maps (instead of the released bandpowers).
Pseudo-C_ell via healpy anafast of the (apodised) masked map, divided by fsky = <w^2>,
the Gaussian beam^2 and the HEALPix pixel window^2; monopole/dipole removed. Binned in
Delta-ell = 30 bins like the PLA TT file; errors are Knox cosmic-variance only (no noise
term). Auto-spectra carry noise bias (SMICA: noticeable above ell ~ 1000), so pass the
hm1/hm2 pair for a cross-spectrum. Heavy, dispatchable (set_dispatch). Sanity: first
peak at ell ~ 220 with D_ell ~ 5700-5800 muK^2; within a few % of Planck TT at 30<ell<1500.
Inputs: map_file (required), mask_file (required), output_dir (required), lmax, +6 more. Returns: Uniform result contract returned by every tool.
plot_cmb_mapA
Mollweide (Galactic) PNG of a HEALPix CMB map, with the mask greyed out.
Use after fetch_cmb_map to show the component-separated CMB map. Reports the pixel rms inside the mask.
Inputs: map_file (required), output_dir (required), vmax, field, +3 more. Returns: Uniform result contract returned by every tool.
plot_cmb_spectraA
Plot D_ell bandpowers with error bars for one or more experiments + LCDM + residuals.
Use to reproduce the Planck 2018 TT/TE/EE figure (datasets=['planck_pr3']) or the
SPT-3G D1 / ACT DR6 / Planck overlay (Camphuis+25 Fig.1: ['planck_pr3','act_dr6','spt3g_d1'],
log_y=True for TT/EE). Residuals are D_ell - theory with the same errors.
Inputs: output_dir (required), log_x, log_y, ell_max, +5 more. Returns: Uniform result contract returned by every tool.
plot_lensing_spectrumA
Plot CMB lensing-potential bandpowers [L(L+1)]^2 C_L^phiphi/2pi for Planck/ACT/SPT.
Shows Planck PR3 (8<=L<=400), ACT DR6 baseline (40<=L<=763) and SPT-3G D1 GMV bandpowers
with the LCDM prediction, and reports each dataset's amplitude A_lens = best-fit scaling of
the theory (full covariance) with its error.
Inputs: output_dir (required), datasets, theory_file. Returns: Uniform result contract returned by every tool.
plot_triangleA
[Published result - for comparison only] Published result, comparison only: getdist triangle plot (68/95% contours) of published CMB chains.
Overlay planck_pr3 with act_dr6_lite to show the Planck-vs-ACT LCDM agreement.
Inputs: output_dir (required), chains, params. Returns: Uniform result contract returned by every tool.
set_dispatchA
Set where THIS server's heavy tools execute: 'local' (this machine), 'polaris' (ALCF) or 'perlmutter' (NERSC).
Affects only this server's heavy (dispatchable) tools - never other
servers' dispatch state. Remote sites run each heavy call as one facility
job (staging + queue + walltime: minutes, not seconds) and need facility
sign-in - check with auth_status first. Light tools (listing, plotting,
small reads) always run locally. Optional artifact_dir sets where
produced files are fetched back to. Returns the active configuration.
Inputs: site (required), artifact_dir. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Tools are mostly cleanly separated by resource and action (fetch map vs fetch spectrum vs fetch chain; plot_map vs plot_spectra vs plot_lensing_spectrum). The closest pair is fetch_cmb_spectrum vs measure_cmb_power_spectrum (released bandpowers vs own pseudo-C_ell from a map), but the descriptions explicitly distinguish them. Infrastructure tools (dispatch, skills, discovery) are clearly bounded.
Every tool follows snake_case verb_noun with a coherent cmb/lensing domain namespace (fetch_cmb_map, plot_cmb_spectra, compute_lcdm_theory_spectrum, compute_cmb_residuals). Even the infrastructure tools follow the same pattern (get_dispatch, set_dispatch, auth_status, export_dispatch_pack). No mixed conventions.
20 tools is on the heavy side but the domain genuinely spans maps, spectra, lensing, chains, theory, and HPC dispatch, so most tools earn their place. A few infrastructure tools (list/load skills, export_dispatch_pack) inflate the count beyond core science operations. Slightly over-scoped but defensible.
Covers the full analysis lifecycle: discovery, map fetch, measured/released spectra, theory, residuals, lensing, chain analysis, triangle plots, and published-constraint comparison. Minor gaps exist (no explicit parameter-fitting tool despite references to fitting, no cache/artifact management or deletion), but agents can work around them with external code.
Maintenance
Related MCP Connectors
Provide structured access to ClinicalTrials.gov data for searching, retrieving, and analyzing clin…
arXiv, PubMed, Crossref and OpenAlex scholarly metadata.
Peer-reviewed scientific paper & arXiv preprint search MCP with citations, abstracts & PDF links.
Discover, verify, and access NASA Earth science datasets via the Common Metadata Repository (CMR)
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server that exposes cosmology tools to LLM agents, including CLASS matter power spectrum computation, eBOSS DR14 Lyman-α forest data retrieval, and plotting capabilities.2-
- FlicenseNot gradedqualityCmaintenanceEnables LLM agents to access and analyze cosmological power spectrum data, including running CLASS model computations, retrieving eBOSS DR14 Lyman-α forest observations, and generating comparison plots, all through natural language interactions.-
- AlicenseAqualityBmaintenanceEnables fetching and analyzing public Type Ia supernova Hubble diagrams, including covariance-aware binning, plotting, chi-squared evaluation, and flat LCDM/wCDM/w0waCDM fits with contour comparisons and optional HPC dispatch.211MIT
- AlicenseNot gradedqualityBmaintenanceEnables querying and analyzing spectroscopic galaxy survey data, including BAO/RSD compilations with cosmological fits and plots, SDSS SkyServer catalog queries and galaxy properties, and GSWLC-A2 catalog access and crossmatching.1MIT