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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd973c26c62b7448969593d5c0b3e505c5290d08bb6d96718a0584d853d44477
|
|
| MD5 |
9725ffaf9cb839ca401077d422be6af1
|
|
| BLAKE2b-256 |
c413417e74a03f78405ad6e71f846a64804f576bd4144747064a5dee30be71c7
|
Provenance
The following attestation bundles were made for measure_sdk-0.1.4.tar.gz:
Publisher:
release.yml on measure-mcp/measure-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
measure_sdk-0.1.4.tar.gz -
Subject digest:
dd973c26c62b7448969593d5c0b3e505c5290d08bb6d96718a0584d853d44477 - Sigstore transparency entry: 2109122854
- Sigstore integration time:
-
Permalink:
measure-mcp/measure-sdk@1e53ef1873efe52b43561e6e35205af34c4349c0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/measure-mcp
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1e53ef1873efe52b43561e6e35205af34c4349c0 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db835dae25246756d0362b1dafe8a4c0600b359967d074430759daddd2dbbee1
|
|
| MD5 |
469af6b3395adbd37c712c9a246a2bf3
|
|
| BLAKE2b-256 |
fbd8d8a3413c94c816cc35214692f8d805a358eec92a8ba737ed131e04cea4fb
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
measure_sdk-0.1.4-py3-none-any.whl -
Subject digest:
db835dae25246756d0362b1dafe8a4c0600b359967d074430759daddd2dbbee1 - Sigstore transparency entry: 2109123384
- Sigstore integration time:
-
Permalink:
measure-mcp/measure-sdk@1e53ef1873efe52b43561e6e35205af34c4349c0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/measure-mcp
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1e53ef1873efe52b43561e6e35205af34c4349c0 -
Trigger Event:
workflow_dispatch
-
Statement type: