Skip to main content
Glama

a2a-task-orchestrator-mcp

a2a-task-orchestrator-mcp (v1.0.0) is a zero-dependency (dependencies = [], 100% Python >= 3.10 stdlib) SQLite-WAL A2A v1.0.1 Task Finite State Machine Orchestrator, Multi-Agent agent-card Execution DAG Validator, and SSRF / Replay-Safe Push-Webhook Guard packaged as a 1-click .mcpb v0.3 desktop bundle.

Multi-agent A2A deployments routinely fail in production due to TOCTOU task-state resurrection races, cross-tenant state leakage, confused-deputy scope escalation across delegated agent-card nodes, and SSRF/replay vulnerabilities in pushNotificationConfig webhooks. a2a-task-orchestrator-mcp enforces deterministic state, topology, and webhook invariants locally in < 30ms cold-boot latency with zero pip C-extension friction:

  • Optimistic CAS A2A v1.0.1 Task FSM (0 TOCTOU Resurrection): Enforces all 8 official A2A v1.0.1 TaskState values with atomic Compare-And-Swap (expected_version) locking in SQLite-WAL and deterministically rejects any transition out of terminal states (COMPLETED, FAILED, CANCELED, REJECTED).

  • Strict SPEC_CLASS_13 Multi-Tenant Isolation & SPEC_CLASS_14 DLP Hash Chains: Rejects empty or wildcard tenant_id values (*, %, all), deduplicates task creation via (tenant_id, idempotency_key), scrubs raw Bearer tokens / API keys / PEM private keys / Luhn payment cards / CVVs before persistence, and links every A2A Artifact in a SHA-256 hash chain (prev_artifact_sha256 -> artifact_sha256).

  • Kahn Multi-Agent DAG & Scope-Attenuation Validator: Detects dependency cycles via Kahn's topological sort, computes critical-path latency budgets (timeout_ms DP), flags S4-REJECT-005 / non-HTTPS agent-card URLs, and catches confused-deputy scope widening (child_scopes - parent_scopes).

  • SSRF & Replay-Safe Push-Webhook Guard: Blocks 127.0.0.0/8, RFC 1918 (10/8, 172.16/12, 192.168/16), AWS/GCP IMDS (169.254.0.0/16), IPv6 loopback/ULA (::1, fc00::/7), non-HTTPS schemes, and URL credentials while verifying/minting constant-time HMAC-SHA256 X-A2A-Notification-Signature headers and (tenant_id, delivery_id) replay locks.

  • Zero-Env Lazy Boot: If A2A_ORCHESTRATOR_DB_PATH is unset, empty, or an unexpanded ${user_config.db_path} placeholder, the server boots in < 30ms with 0 disk writes and defaults lazily to :memory: when stateful tools are invoked.


7 Deterministic MCP Tools

Tool Name

Read-Only

Purpose & Enforced Invariants

orchestrator_create_task

No (idempotent)

Create a tenant-isolated (SPEC_CLASS_13) A2A v1.0.1 task in TASK_STATE_SUBMITTED (version = 1) with context_id and (tenant_id, idempotency_key) deduplication (CLAIMED_NEW vs DEDUPED_EXISTING).

orchestrator_transition_task

No

Transition across the 8 official A2A v1.0.1 states using atomic optimistic expected_version CAS locking; deterministically blocks terminal resurrection (TERMINAL_STATE_IMMUTABLE).

orchestrator_append_artifact

No

Scrub raw secrets/cards (SPEC_CLASS_14) and append an A2A Artifact chained with SHA-256 (prev_artifact_sha256 -> artifact_sha256).

orchestrator_validate_push_webhook

No

Block SSRF targets (IMDS/loopback/RFC1918/IPv6/credentials), mint or constant-time verify X-A2A-Notification-Signature (HMAC-SHA256), and enforce (tenant_id, delivery_id) replay locks.

orchestrator_validate_agent_dag

Yes

Validate multi-agent DAGs via Kahn's topological sort: catch cycles, compute critical-path SLA latency, enforce S4-REJECT-005 HTTPS agent-card rules, and block child_scopes - parent_scopes escalation.

orchestrator_inspect_task_lineage

Yes

Tenant-scoped (WHERE tenant_id = ?) audit query returning current task state, full CAS transition history, and cryptographic verify_artifact_chain verification.

orchestrator_render_mermaid_trace

Yes

Render GitHub-compatible Mermaid stateDiagram-v2 (task FSM trail) or flowchart LR (multi-agent DAG critical path & scope findings).

Related MCP server: ziptask

3 Slash Prompts & 2 Built-in Resources

Type

Identifier

Description

Prompt

design-and-validate-a2a-dag

Model a multi-agent workflow DAG, audit scopes & agent-card URLs, and render a Mermaid flowchart LR.

Prompt

audit-push-notification-webhook

Audit a pushNotificationConfig URL for SSRF, HMAC-SHA256 signature posture, and replay safety.

Prompt

inspect-task-fsm-audit-trail

Verify a tenant task's CAS transition log, SHA-256 artifact chain, and stateDiagram-v2 trace.

Resource

a2a-orch://spec/v1.0.1-task-fsm-matrix

Complete JSON matrix of A2A v1.0.1 states, allowed transitions, CAS locks, and S4-REJECT-005 rules.

Resource

a2a-orch://playbooks/zero-toctou-webhook-wal

SQLite-WAL tuning, DLP hash-chain verification, and SSRF/HMAC webhook playbook (Webhooks Reference).


Official A2A v1.0.1 Task FSM Matrix

Current State

Allowed target_state Transitions

Terminal Lock

TASK_STATE_SUBMITTED

WORKING, INPUT_REQUIRED, AUTH_REQUIRED, COMPLETED, FAILED, CANCELED, REJECTED

Mutable (CAS)

TASK_STATE_WORKING

INPUT_REQUIRED, AUTH_REQUIRED, COMPLETED, FAILED, CANCELED

Mutable (CAS)

TASK_STATE_INPUT_REQUIRED

WORKING, FAILED, CANCELED

Mutable (CAS)

TASK_STATE_AUTH_REQUIRED

WORKING, FAILED, CANCELED, REJECTED

Mutable (CAS)

TASK_STATE_COMPLETED

(none — TERMINAL_STATE_IMMUTABLE)

Immutable

TASK_STATE_FAILED

(none — TERMINAL_STATE_IMMUTABLE)

Immutable

TASK_STATE_CANCELED

(none — TERMINAL_STATE_IMMUTABLE)

Immutable

TASK_STATE_REJECTED

(none — TERMINAL_STATE_IMMUTABLE)

Immutable


Installation & Quick Start

1. 1-Click Claude Desktop Bundle (.mcpb v0.3)

Download a2a-task-orchestrator-mcp.mcpb from the Latest GitHub Release and open it in Claude Desktop. Leave SQLite WAL Database Path blank for zero-config :memory: execution, or set a file path (for example ~/.a2a/orchestrator.sqlite) for persistent WAL storage across sessions.

2. Python Package / mcpServers Config (Claude Desktop, Cursor, Windsurf, VS Code)

pip install a2a-task-orchestrator-mcp
a2a-task-orchestrator-mcp selftest --json
{
  "mcpServers": {
    "a2a-task-orchestrator": {
      "command": "a2a-task-orchestrator-mcp-server",
      "env": {
        "A2A_ORCHESTRATOR_DB_PATH": ":memory:"
      }
    }
  }
}

3. Non-Root Docker Container

docker build -t a2a-task-orchestrator-mcp .
docker run --rm -i a2a-task-orchestrator-mcp

License

Released under the MIT License.

Available Tools

7 tools
orchestrator_append_artifactB

Append a DLP-scrubbed (SPEC_CLASS_14 — redacts raw Bearer tokens, API keys, private keys, Luhn payment cards, and CVVs) A2A Artifact to a task with tamper-evident SHA-256 hash chaining (prev_artifact_sha256 -> artifact_sha256).

Inputs: parts (required), task_id (required), tenant_id (required), name, +2 more.

orchestrator_create_taskA
Idempotent

Create a tenant-isolated (SPEC_CLASS_13 — rejects empty or wildcard tenant_id) A2A v1.0.1 task in TASK_STATE_SUBMITTED with context_id, (tenant_id, idempotency_key) deduplication (CLAIMED_NEW vs DEDUPED_EXISTING), DLP-scrubbed metadata, and initial optimistic lock version = 1.

Inputs: tenant_id (required), idempotency_key (required), title, task_id, +4 more.

orchestrator_inspect_task_lineageB
Read-onlyIdempotent

Execute a strict tenant-scoped query (WHERE tenant_id = ?) returning current A2A v1.0.1 task state, full optimistic CAS transition audit trail, and cryptographic verify_artifact_chain status.

Inputs: task_id (required), tenant_id (required).

orchestrator_render_mermaid_traceA
Read-onlyIdempotent

Render a clean GitHub-compatible Mermaid stateDiagram-v2 (task transition audit trail or canonical A2A v1.0.1 FSM) or flowchart LR visualization (validated multi-agent DAG highlighting critical path and scope-widening edges).

Inputs: mode, edges, nodes, task_id, +2 more.

orchestrator_transition_taskA

Enforce the official 8-state A2A v1.0.1 Task Finite State Machine (TASK_STATE_SUBMITTED, TASK_STATE_WORKING, TASK_STATE_INPUT_REQUIRED, TASK_STATE_AUTH_REQUIRED, TASK_STATE_COMPLETED, TASK_STATE_FAILED, TASK_STATE_CANCELED, TASK_STATE_REJECTED) using atomic optimistic expected_version Compare-And-Swap (CAS) locking — deterministically rejecting transitions out of terminal states to eliminate TOCTOU resurrection bugs.

Inputs: task_id (required), tenant_id (required), target_state (required), expected_version (required), +2 more.

orchestrator_validate_agent_dagA
Read-onlyIdempotent

Static & runtime validator for multi-agent A2A execution DAGs (nodes[] with agent_card_url, scopes[], timeout_ms; edges[] from -> to) — runs Kahn's topological sort to catch cycles, computes critical-path latency budget, flags S4-REJECT-005 / non-HTTPS agent-card URLs, and flags confused-deputy scope widening (child_scopes - parent_scopes).

Inputs: nodes (required), edges, max_budget_ms.

orchestrator_validate_push_webhookA

Audit A2A pushNotificationConfig webhook URLs and event payloads — blocking SSRF (127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16 AWS/GCP IMDS, ::1, fc00::/7, non-HTTPS schemes, and embedded URL credentials) while verifying or minting constant-time HMAC-SHA256 X-A2A-Notification-Signature headers and (tenant_id, delivery_id) replay-lock deduplication.

Inputs: tenant_id (required), webhook_url (required), payload, delivery_id, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool targets a distinct operation in the A2A lifecycle: task creation, FSM transition, artifact append, webhook validation, DAG validation, lineage inspection, and visualization rendering. The two validation tools are clearly separated by target (push webhook vs. agent DAG), so an agent should not confuse them.

    Naming Consistency5/5

    All tools use a consistent `orchestrator_` prefix followed by snake_case verb_noun phrasing such as `create_task`, `transition_task`, and `validate_agent_dag`. The convention is predictable throughout the set.

    Tool Count5/5

    Seven tools is a well-scoped set for task orchestration, comfortably within the 3-15 ideal range. Each tool contributes a distinct lifecycle, validation, inspection, or rendering capability without obvious redundancy.

    Completeness4/5

    The surface covers core task lifecycle operations, artifact integrity, webhook and DAG validation, lineage inspection, and trace rendering. Minor gaps exist around task listing/search and possibly metadata updates, but the main orchestration workflows are covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      Enables AI agents to manage task state over MCP, including statuses, dependencies, leases, and versioning, with a token-efficient wire format and SQLite storage.
      8
      14
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables coding assistants to create versioned work contracts, claim tasks with durable leases, record checkpoints and decisions, and hand off unfinished work to another supported agent. Provides independently observed verification receipts and cross-agent continuity through a local-first MCP STDIO server.
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP hosts to run auditable multi-agent work through a SQLite task registry, DAG orchestration, three collaboration modes (pipeline, iterative refinement, and proposal voting), human-in-the-loop approvals, an enforced sandbox, compliance scanning, and long-term memory. Exposes these capabilities as 36 tools so every consequential step stays gated behind a human checkpoint.
      AGPL 3.0