Production-grade infrastructure for Model Context Protocol
Project description
MCP Hangar
Parallel MCP tool execution. One interface. 50x faster.
The Problem
Your AI agent calls 5 tools sequentially. Each takes 200ms. That's 1 second of waiting.
Hangar runs them in parallel. 200ms total. Same results, 50x faster.
Quick Start
30 seconds to working MCP providers:
# Install, configure, and start - zero interaction
curl -sSL https://mcp-hangar.io/install.sh | bash && mcp-hangar init -y && mcp-hangar serve
That's it. Filesystem, fetch, and memory providers are now available to Claude.
What just happened?
- Install - Downloaded and installed
mcp-hangarvia pip/uv - Init - Created
~/.config/mcp-hangar/config.yamlwith starter providers - Serve - Started the MCP server (stdio mode for Claude Desktop)
The init -y flag uses sensible defaults:
- Detects available runtimes (uvx preferred, npx fallback)
- Configures starter bundle: filesystem, fetch, memory
- Updates Claude Desktop config automatically
Manual Setup
If you prefer step-by-step:
# 1. Install
pip install mcp-hangar
# or: uv pip install mcp-hangar
# 2. Initialize with wizard
mcp-hangar init
# 3. Start server
mcp-hangar serve
HTTP Mode
# Start with REST API
mcp-hangar serve --http --port 8000
# REST API: http://localhost:8000/api/
Custom Configuration
Create ~/.config/mcp-hangar/config.yaml:
providers:
github:
mode: subprocess
command: [uvx, mcp-server-github]
env:
GITHUB_TOKEN: ${GITHUB_TOKEN}
slack:
mode: subprocess
command: [uvx, mcp-server-slack]
internal-api:
mode: remote
endpoint: "http://localhost:8080"
Claude Desktop is auto-configured by mcp-hangar init. Manual setup:
Add to Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"hangar": {
"command": "mcp-hangar",
"args": ["serve", "--config", "~/.config/mcp-hangar/config.yaml"]
}
}
}
Restart Claude Desktop. Done.
One Interface
hangar_call([
{"provider": "github", "tool": "search_repos", "arguments": {"query": "mcp"}},
{"provider": "slack", "tool": "post_message", "arguments": {"channel": "#dev"}},
{"provider": "internal-api", "tool": "get_status", "arguments": {}}
])
Single call. Parallel execution. All results returned together.
Benchmarks
| Scenario | Sequential | Hangar | Speedup |
|---|---|---|---|
| 15 tools, 2 providers | ~20s | 380ms | 50x |
| 50 concurrent requests | ~15s | 1.3s | 10x |
| Cold start + batch | ~5s | <500ms | 10x |
100% success rate. <10ms framework overhead.
Why It's Fast
Single-flight cold starts. When 10 parallel calls hit a cold provider, it initializes once -- not 10 times.
Automatic concurrency. Configurable parallelism with backpressure. No thundering herd.
Provider pooling. Hot providers stay warm. Cold providers spin up on demand, shut down after idle TTL.
Production Ready
Lifecycle management. Lazy loading, health checks, automatic restart, graceful shutdown.
Circuit breaker. One failing provider doesn't kill your batch. Automatic isolation and recovery.
Observability. Correlation IDs across parallel calls. OpenTelemetry traces, Prometheus metrics.
REST API. Full CRUD for providers, groups, discovery, config, and auth. WebSocket streams for real-time events.
RBAC. Role-based access control with tool-level policies. API key authentication.
Multi-provider. Subprocess, Docker, remote HTTP -- mix them in a single batch call.
Configuration
providers:
fast-provider:
mode: subprocess
command: ["python", "fast.py"]
idle_ttl_s: 300 # Shutdown after 5min idle
health_check_interval_s: 60 # Check health every minute
max_consecutive_failures: 3 # Circuit breaker threshold
docker-provider:
mode: docker
image: my-registry/mcp-server:latest
network: bridge
remote-provider:
mode: remote
endpoint: "https://api.example.com/mcp"
Works Everywhere
- Home lab: 2 providers, zero config complexity
- Team setup: Shared providers, Docker containers
- Enterprise: 50+ providers, observability stack, Kubernetes
Same API. Same reliability. Different scale.
Documentation
License
Core (src/, packages/) is MIT licensed. Enterprise features (enterprise/) are BSL 1.1 licensed.
See LICENSE for MIT terms and enterprise/LICENSE.BSL for BSL terms.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_hangar-1.0.0.tar.gz.
File metadata
- Download URL: mcp_hangar-1.0.0.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a0a1c17ee0488cb68fb09feb43b57cec57657a0bfef25652b17897a6c48ff49
|
|
| MD5 |
1a5205f5f533f372b5634d3ef579bc08
|
|
| BLAKE2b-256 |
9a47fdb83c86443f315dda750808d29b57d627f3cfe56a29bbe987213e365613
|
Provenance
The following attestation bundles were made for mcp_hangar-1.0.0.tar.gz:
Publisher:
release.yml on mcp-hangar/mcp-hangar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_hangar-1.0.0.tar.gz -
Subject digest:
5a0a1c17ee0488cb68fb09feb43b57cec57657a0bfef25652b17897a6c48ff49 - Sigstore transparency entry: 1278102984
- Sigstore integration time:
-
Permalink:
mcp-hangar/mcp-hangar@a04a6ff161406d0e1dfb101ffba69330af2f53d4 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/mcp-hangar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a04a6ff161406d0e1dfb101ffba69330af2f53d4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcp_hangar-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mcp_hangar-1.0.0-py3-none-any.whl
- Upload date:
- Size: 593.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dae3a3eb590f7903534a57f113f5c09d05fd3280729d56fc711db17b7d4502d
|
|
| MD5 |
5109c567fd7a430f9461fc6d0a381b7e
|
|
| BLAKE2b-256 |
9be9ab8d39e144a1dad8d95c26ef78a7fd9d06a1877a953dd1416d67281b53a5
|
Provenance
The following attestation bundles were made for mcp_hangar-1.0.0-py3-none-any.whl:
Publisher:
release.yml on mcp-hangar/mcp-hangar
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_hangar-1.0.0-py3-none-any.whl -
Subject digest:
3dae3a3eb590f7903534a57f113f5c09d05fd3280729d56fc711db17b7d4502d - Sigstore transparency entry: 1278102992
- Sigstore integration time:
-
Permalink:
mcp-hangar/mcp-hangar@a04a6ff161406d0e1dfb101ffba69330af2f53d4 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/mcp-hangar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a04a6ff161406d0e1dfb101ffba69330af2f53d4 -
Trigger Event:
push
-
Statement type: