Cycles Ap2 Python

development MCP Server

Cycles runtime authority guard for Google AP2 (Agent Payments Protocol) — reserve, commit, release around AP2 payment mandates to prevent mandate reuse, double-spend, and concurrent checkout attempts.

Verified
developmentdevelopmentpythongcp
5 views0 stars0 forksApache-2.0

Why This Matters

Discovered via github-topic:mcp and last synced 3mo ago.

Verified
Source
github-topic:mcp
Stars
0
Last synced
3mo ago
Install
Check source

Install

Install instructions not detected yet

Check the source repository for the latest setup steps.

View source instructions
10
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (10)

AP2GuardCommitUncertain

Commit outcome is unknown after the body ran. Covers terminal status codes (`RESERVATION_FINALIZED`, `RESERVATION_EXPIRED`, `IDEMPOTENCY_MISMATCH`), transport-level failures (`error_code="TRANSPORT_ERROR"`), 5xx server errors (`error_code="SERVER_ERROR"` or specific code), uncaught exceptions during commit (`error_code="COMMIT_RAISED"`, original chained via `__cause__`), and — **async only** — `asyncio.CancelledError` mid-flight (`error_code="COMMIT_CANCELLED"`, original chained via `__cause__`). **No auto-release** — the POST may have mutated Cycles before the failure. Reconcile with PSP

AP2DryRunResult

Raised from `__enter__` when `dry_run=True` — carries the decision payload; the `with` body never executes

AP2CurrencyError

Non-USD mandate in v0.1 (subclass of `ValueError`)

Exception

When

Package

Purpose

AP2GuardError

Base for all AP2-guard errors

AP2GuardCommitFailed

Commit was rejected with an unrecognized code after the body ran. Check `.released` (bool) and `.release_error` (string \

Scenario

Outcome

AP2MandateError

Adapter input is malformed — NaN, infinity, sub-micro precision, missing payee, etc. (subclass of `ValueError`)

AP2GuardDenied

Cycles returned `DENY` or the reserve POST failed