v0.5.0
What's Changed
Added
-
Batch Invocations: New
hangar_batch()tool for parallel tool execution- Execute multiple tool invocations in a single API call
- Configurable concurrency (1-20 parallel workers)
- Single-flight pattern for cold starts (one MCP server starts once, not N times)
- Partial success handling (continue on error by default)
- Fail-fast mode (abort on first error)
- Per-call and global timeout support
- Circuit breaker integration (CB OPEN = instant error)
- Response truncation for oversized payloads (10MB per call, 50MB total)
- Eager validation before execution
- Full observability (batch_id, call_id, Prometheus metrics)
-
SingleFlight Pattern: New
SingleFlightclass ininfrastructure/single_flight.py- Ensures a function executes only once for a given key
- Thread-safe implementation with result caching option
- Used for cold start deduplication in batch operations
-
Domain Events: New batch-related domain events
BatchInvocationRequested- When batch startsBatchInvocationCompleted- When batch finishesBatchCallCompleted- Per-call completion
-
Prometheus Metrics: New batch metrics
mcp_hangar_batch_calls_total{result}- Total batch invocationsmcp_hangar_batch_size_histogram- Calls per batch distributionmcp_hangar_batch_duration_seconds- Batch execution timemcp_hangar_batch_concurrency_gauge- Current parallel executionsmcp_hangar_batch_truncations_total{reason}- Response truncationsmcp_hangar_batch_circuit_breaker_rejections_total{MCP server}- CB rejectionsmcp_hangar_batch_cancellations_total{reason}- Batch cancellations
Documentation
- New guide:
docs/guides/BATCH_INVOCATIONS.md
Installation
PyPI:
pip install mcp-hangar==0.5.0Docker:
docker pull ghcr.io/mcp-hangar/mcp-hangar:0.5.0Links
Full Changelog: v0.4.0...v0.5.0