Skip to main content

Measure Monitor

Unattended cross-platform anomaly monitoring for the Measure ecosystem.

measure-monitor is the ecosystem's orchestrator, not an MCP product. It sits one level above the products — which never import one another — and wires them together: it fetches metric Observations from a source product (paid media today), runs the SDK's shared anomaly detector, and delivers alerts to your channels. Run it on a schedule for hands-off monitoring of irregular drops and spikes.

  ┌── cron / /schedule ──────────────────────────────────────────────┐
  │  measure-monitor run --config monitors.toml                       │
  │                                                                   │
  │   paid-media.get_metric_observations(metric)   ← fetch + history  │
  │            │                                                      │
  │            ▼  detect_anomaly (SDK)              ← shared brain     │
  │       irregular drop/spike?                                       │
  │            │                                                      │
  │            ▼                                                      │
  │     Slack / Teams / email                       ← centralized     │
  └───────────────────────────────────────────────────────────────────┘

Install

pip install measure-monitor          # pulls in measure-paid-media-mcp + measure-sdk
measure login                        # one-time Google sign-in (from the SDK)

Configure

Describe what to watch in a JSON or TOML file — see examples/monitors.toml:

[[monitors]]
name = "spend-anomaly"
metric = "spend"        # spend | revenue | conversions | clicks | impressions | roas | cpa | ctr
days = 7                # each period is a 7-day window
periods = 4             # 4 prior windows form the baseline
method = "z_score"      # z_score | mad | pct_change
sensitivity = 3.0       # stdevs (z_score/mad) or fraction (pct_change)

  [[monitors.channels]]
  type = "console"      # console | slack | teams | discord | email

Run

measure-monitor run --config monitors.toml            # detect + deliver
measure-monitor run --config monitors.toml --dry-run  # detect only, no delivery

Output is a JSON report. Exit code is 1 when any anomaly was found (0 = clean, 2 = error), so a cron wrapper can react to it.

Email delivery reads SMTP from the environment: MEASURE_SMTP_HOST, MEASURE_SMTP_PORT, MEASURE_SMTP_USER, MEASURE_SMTP_PASSWORD, MEASURE_SMTP_FROM.

Schedule it

System cron — every hour:

0 * * * * cd /path/to/work && measure-monitor run --config monitors.toml >> monitor.log 2>&1

Claude Code /schedule — a cloud routine that runs the check and reacts to the result in natural language (no config file needed; the agent has both MCPs connected). Example prompt to schedule:

Every hour: use paid-media get_metric_observations for spend and roas across all platforms; for any anomaly, deliver a summary with the alerts engine.

Both modes respect the ecosystem rule: products never import each other — only this orchestrator depends on more than one.

How it fits the ecosystem

  • Source of truth for detection: measure_sdk.detect_anomaly — the same brain every product uses, so results are comparable across platforms.
  • Extensible: as GA4 / SEO products expose get_metric_observations, point a monitor at them; the runner is source-agnostic (it depends only on the Observation contract).

Metadata

Release files for measure-monitor 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for measure-monitor 0.1.0
File Size Uploaded Provenance Actions
measure_monitor-0.1.0.tar.gz 9.2 kB With provenance Details for measure_monitor-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for measure-monitor 0.1.0
File Interpreter ABI Platform Actions
measure_monitor-0.1.0-py3-none-any.whl Python 3 none any Details for measure_monitor-0.1.0-py3-none-any.whl

Total release size: 18.4 kB

Release files / measure_monitor-0.1.0.tar.gz

Download URL measure_monitor-0.1.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
411051ab36203e53749deef3b3923149f368acc12327af8495f2babec57c049a
BLAKE2b-256 checksum
How to use checksums
19731f0f660b7df4f46cea983d06778393fec659fb79ccdc51b87293ee292d2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 9, 2026.

Transparency log

Release files / measure_monitor-0.1.0-py3-none-any.whl

Download URL measure_monitor-0.1.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96bd4da9127684a488f17c4b7494c864859312dad52be094b72bdd93cbae7bfe
BLAKE2b-256 checksum
How to use checksums
4337b4a840e5344d5f504dcd54a7389ac176c1840be107e373f892719d9e6b7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 9, 2026.

Transparency log

Security for measure-monitor 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for measure_monitor-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page