Repository avatar
Other Tools
v1.0.0
active

a2a-task-orchestrator-mcp

io.github.khoap1220-hue/a2a-task-orchestrator-mcp

Zero-dep A2A v1.0.1 task FSM orchestrator, multi-agent agent-card DAG & SSRF webhook guard.

Documentation

a2a-task-orchestrator-mcp

a2a-task-orchestrator-mcp Architecture Banner

Official Anthropic MCP Registry .mcpb Bundle CI Status A2A v1.0.1 Task FSM MIT License

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 NameRead-OnlyPurpose & Enforced Invariants
orchestrator_create_taskNo (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_taskNoTransition 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_artifactNoScrub raw secrets/cards (SPEC_CLASS_14) and append an A2A Artifact chained with SHA-256 (prev_artifact_sha256 -> artifact_sha256).
orchestrator_validate_push_webhookNoBlock 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_dagYesValidate 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_lineageYesTenant-scoped (WHERE tenant_id = ?) audit query returning current task state, full CAS transition history, and cryptographic verify_artifact_chain verification.
orchestrator_render_mermaid_traceYesRender GitHub-compatible Mermaid stateDiagram-v2 (task FSM trail) or flowchart LR (multi-agent DAG critical path & scope findings).

3 Slash Prompts & 2 Built-in Resources

TypeIdentifierDescription
Promptdesign-and-validate-a2a-dagModel a multi-agent workflow DAG, audit scopes & agent-card URLs, and render a Mermaid flowchart LR.
Promptaudit-push-notification-webhookAudit a pushNotificationConfig URL for SSRF, HMAC-SHA256 signature posture, and replay safety.
Promptinspect-task-fsm-audit-trailVerify a tenant task's CAS transition log, SHA-256 artifact chain, and stateDiagram-v2 trace.
Resourcea2a-orch://spec/v1.0.1-task-fsm-matrixComplete JSON matrix of A2A v1.0.1 states, allowed transitions, CAS locks, and S4-REJECT-005 rules.
Resourcea2a-orch://playbooks/zero-toctou-webhook-walSQLite-WAL tuning, DLP hash-chain verification, and SSRF/HMAC webhook playbook (Webhooks Reference).

Official A2A v1.0.1 Task FSM Matrix

Current StateAllowed target_state TransitionsTerminal Lock
TASK_STATE_SUBMITTEDWORKING, INPUT_REQUIRED, AUTH_REQUIRED, COMPLETED, FAILED, CANCELED, REJECTEDMutable (CAS)
TASK_STATE_WORKINGINPUT_REQUIRED, AUTH_REQUIRED, COMPLETED, FAILED, CANCELEDMutable (CAS)
TASK_STATE_INPUT_REQUIREDWORKING, FAILED, CANCELEDMutable (CAS)
TASK_STATE_AUTH_REQUIREDWORKING, FAILED, CANCELED, REJECTEDMutable (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)

# Works immediately with zero install (0 external dependencies)
uvx --from https://github.com/khoap1220-hue/a2a-task-orchestrator-mcp/releases/latest/download/a2a_task_orchestrator_mcp-1.0.0-py3-none-any.whl a2a-task-orchestrator-mcp selftest --json
claude mcp add a2a-task-orchestrator -- uvx --from https://github.com/khoap1220-hue/a2a-task-orchestrator-mcp/releases/latest/download/a2a_task_orchestrator_mcp-1.0.0-py3-none-any.whl a2a-task-orchestrator-mcp-server
{
  "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

Engineering & Ecosystem Links

License

Released under the MIT License.

MCPB
https://github.com/khoap1220-hue/a2a-task-orchestrator-mcp/releases/download/v1.0.0/a2a-task-orchestrator-mcp.mcpb
Install Command
# mcpb: https://github.com/khoap1220-hue/a2a-task-orchestrator-mcp/releases/download/v1.0.0/a2a-task-orchestrator-mcp.mcpb