Skip to main content

measure-sdk

The single shared library of the Measure MCP ecosystem.

Every Measure MCP product (measure-analytics-mcp, measure-paid-media-mcp, …) depends on this package and only this package. It carries the common domain model and infrastructure so the products never duplicate either.

from measure_sdk import AuditFinding, Report, HealthScore, CostEstimate, Severity
from measure_sdk.infra import PermissionPolicy, get_logger
from measure_sdk.mcp import build_server, ServerContext, tool_errors

Two layers

measure_sdk.domain — shared domain model

Canonical, reusable models and enums every MCP consumes instead of redefining:

Group Symbols
Findings & reports AuditFinding (alias Finding), Issue, Recommendation, Report (alias AuditReport)
Health HealthScore, HealthCheck, Grade, compute_health_score, score_from_findings, grade_for
Cost & validation CostEstimate, ValidationResult
Alerts Alert, AlertType, Comparator, Channel, ChannelType, Condition
Execution ExecutionPlan, PlannedChange, ChangeAction
Resources Connection, Entity, Metric, PlatformResource
Enums Severity, Priority, Category

The Health Score is a standard 0-100 measure (from_checks weighted average or from_findings penalty model) so platform health is comparable across MCPs.

measure_sdk.infra — shared infrastructure

Module Responsibility
infra.config Typed settings from env / .env (Pydantic Settings).
infra.logging Structured logging (console or JSON).
infra.errors Exception hierarchy mapped to MCP tool errors.
infra.auth OAuth-first credential resolution (ADC / service account / OAuth) + scopes, session, discovery.
infra.permissions Read-only-by-default policy and write-confirmation gating.
infra.cost_control Reusable cost-guardrail policy and byte humaniser.
infra.audit Append-only audit log of every privileged action.
infra.google Lazily-constructed, cached Google API clients.

Plus measure_sdk.mcp (build_server, ServerContext, tool_errors, and the shared auth tools measure_login / auth_status / auth_doctor every server inherits), measure_sdk.adapters (OpenAI / Gemini ↔ MCP translation) and measure_sdk.cli (the measure login / measure doctor command).

Nothing here ever persists credentials — secrets are resolved at runtime and held only in memory.

Authentication

Users sign in with their own Google account via the installed-app OAuth flow — from inside the assistant (measure_login) or the CLI (measure login). See docs/authentication.md for the full setup (create the OAuth client, consent screen, test users, scaling).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

measure_sdk-0.2.1.tar.gz (57.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

measure_sdk-0.2.1-py3-none-any.whl (61.7 kB view details)

Uploaded Python 3

File details

Details for the file measure_sdk-0.2.1.tar.gz.

File metadata

  • Download URL: measure_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 57.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for measure_sdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 557611405cf0770272bbbe4b724b0e6189eafb1177e3d70673402529afc0a5c3
MD5 5083bb47b4bec311f1adc68678cee122
BLAKE2b-256 a4cb3ef5e5904c2bbb84abe4c4fff291c19fc95405e67bb96c8141b3c88e6712

See more details on using hashes here.

Provenance

The following attestation bundles were made for measure_sdk-0.2.1.tar.gz:

Publisher: release.yml on measure-mcp/measure-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file measure_sdk-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: measure_sdk-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 61.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for measure_sdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec089978a450a3427acbec8e43310d9a379665e00bfa45a0107ba268440d2da1
MD5 d14b4bd464f3b271b401743153425313
BLAKE2b-256 e01bc0339d1ebab2713e8bd96f1375945817b692783912a0d38c14c706c9e628

See more details on using hashes here.

Provenance

The following attestation bundles were made for measure_sdk-0.2.1-py3-none-any.whl:

Publisher: release.yml on measure-mcp/measure-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

0.1.4

2 files

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