Skip to main content

The shared core of the Measure MCP ecosystem: domain models, enums, Health Score, OAuth/auth, config, logging, Google clients, permissions, cost control, MCP utilities, adapters and the `measure` CLI.

Project description

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).

Project details


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.1.4.tar.gz (53.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.1.4-py3-none-any.whl (58.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: measure_sdk-0.1.4.tar.gz
  • Upload date:
  • Size: 53.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for measure_sdk-0.1.4.tar.gz
Algorithm Hash digest
SHA256 dd973c26c62b7448969593d5c0b3e505c5290d08bb6d96718a0584d853d44477
MD5 9725ffaf9cb839ca401077d422be6af1
BLAKE2b-256 c413417e74a03f78405ad6e71f846a64804f576bd4144747064a5dee30be71c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for measure_sdk-0.1.4.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.1.4-py3-none-any.whl.

File metadata

  • Download URL: measure_sdk-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 58.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for measure_sdk-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 db835dae25246756d0362b1dafe8a4c0600b359967d074430759daddd2dbbee1
MD5 469af6b3395adbd37c712c9a246a2bf3
BLAKE2b-256 fbd8d8a3413c94c816cc35214692f8d805a358eec92a8ba737ed131e04cea4fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for measure_sdk-0.1.4-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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page