
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 (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.1Task FSM (0TOCTOU Resurrection): Enforces all 8 official A2Av1.0.1TaskStatevalues 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_13Multi-Tenant Isolation &SPEC_CLASS_14DLP Hash Chains: Rejects empty or wildcardtenant_idvalues (*,%,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 A2AArtifactin 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_msDP), flagsS4-REJECT-005/ non-HTTPSagent-cardURLs, 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-timeHMAC-SHA256X-A2A-Notification-Signatureheaders and(tenant_id, delivery_id)replay locks. - Zero-Env Lazy Boot: If
A2A_ORCHESTRATOR_DB_PATHis unset, empty, or an unexpanded${user_config.db_path}placeholder, the server boots in< 30mswith0disk 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). |
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)
# 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
- A2A v1.0.1 & MCP IQ Benchmark Hub: https://khoaphan.dev/a2a-iq/
- Idempotent & SSRF-Safe Webhook Architecture: https://khoaphan.dev/webhooks/
- Transparent Written-First A2A Engineering Services: https://khoaphan.dev/services/?ref=gh-a2a-task-orchestrator-mcp — Operated as a 100% written, asynchronous A2A engineering workflow via GitHub PRs/Specs, Email (
khoa@khoaphan.dev), and In-App Messaging with Code-First PoCs and automated test suites upfront.
License
Released under the MIT License.
https://github.com/khoap1220-hue/a2a-task-orchestrator-mcp/releases/download/v1.0.0/a2a-task-orchestrator-mcp.mcpb# mcpb: https://github.com/khoap1220-hue/a2a-task-orchestrator-mcp/releases/download/v1.0.0/a2a-task-orchestrator-mcp.mcpbRelated Servers
io.github.khoap1220-hue/a2a-iq-mcp
Zero-dep 8-Dimension A2A v1.0 & MCP Agent IQ Benchmark (8 tools, leaderboard, JCS & x402).
io.github.khoap1220-hue/a2a-registry-bridge-mcp
Zero-dep A2A v1.0.1 <-> MCP bridge, registry search & pure-Python Ed25519 + JCS AgentCard signer.
io.github.khoap1220-hue/a2a-wiki
Offline BM25 A2A v1.0.1, agent-card JWS, MCPB v0.3 & x402/AP2 documentation wiki for LLMs.