Saga Compensation Planner

Saga Compensation Planner MCP Connector for Claude

A+

Orchestrates deterministic recovery paths for distributed transactions using the Saga pattern.

3 tools Official Updated Oct 1, 2026 Official Vinkius Partner

This MCP server provides a deterministic orchestration engine for managing distributed transactions via the Saga pattern. When a multi-agent transaction fails, this tool calculates the exact reverse-order compensation sequence required to revert the system to a consistent state. It determines the necessary compensation steps, calculates total recovery time, and evaluates the final saga state (such as COMPENSATED or REQUIRES_MANUAL_INTERVENTION). Use plan_compensation_sequence to map out recovery paths, get_saga_metadata to retrieve correlation IDs and idempotency keys, and evaluate_saga_status to assess the outcome of compensation attempts.

saga-patterntransaction-managementerror-recoverydistributed-transactionsorchestrator

3 tools expose this connector's capabilities to your AI agent.

evaluate_saga_status

Determines the high-level status of the transaction based on the outcome of the compensation attempts

get_saga_metadata

Retrieves the unique tracking identifiers used to maintain the lifecycle of the specific saga instance

plan_compensation_sequence

Calculates the exact order of compensation actions and the total projected time required to revert the transaction

See how to talk to your AI agent using Saga Compensation Planner.

Calculate the compensation plan for a saga where the failure occurred at step index 2, given these steps: [{stepId: '1', agentId: 'A', action: 'reserve', compensationAction: 'cancel', timeoutMs: 500}, {stepId: '2', agentId: 'B', action: 'pay', compensationAction: 'refund', timeoutMs: 1000}]

The compensation sequence will execute 'refund' for step 2, then 'cancel' for step 1. The total compensation time is 1500ms.

What is the current status of a saga if all compensation attempts were successful?

The saga state is COMPENSATED.

How do I get the idempotency keys for my saga steps?

You can use the `get_saga_metadata` tool to retrieve the unique stepIdempotencyKeys for each step in your saga.

The compensation sequence provides the exact, reverse-order list of actions needed to undo successful steps after a transaction failure, ensuring system consistency.

Related Connectors