Create SSH Tunnels to your remote hosts and host as an MCP Server for Agentic AI!
pip install tunnel-manager==3.2.0 Copy PIP instructions
Documentation — Installation, deployment, usage across the API, CLI, and MCP and agent interfaces are maintained in the official documentation.
Tunnel Manager is a production-grade Agent and Model Context Protocol (MCP) server designed to interface directly with Create SSH Tunnels to the operator's remote hosts and host as an MCP Server for Agentic AI!.
This agent wraps the Create SSH Tunnels to the operator's remote hosts and host as an MCP Server for Agentic AI! API. The operator can interact with it programmatically or via its integrated execution entrypoints.
Detailed instructions on how to use the underlying API wrappers, extended schema bindings, and developer SDK references are maintained in docs/index.md.
This server use dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.
Auto-generated from the live MCP server — do not edit by hand.
8 action-routed tool(s) · 6 verbose 1:1 tool(s). Each is enabled unless its TOOL toggle is set false; MCP_TOOL_MODE selects the surface (intent default — the six verb-tools, granular set loaded on demand · condensed action-routed · verbose 1:1 · both). Auto-generated — do not edit.
Detailed tool schemas, parameter shapes, and validation constraints are preserved in docs/usage.md.
The operator can configure tool filtering via multiple input channels:
When query strings or parameters are supplied, an LLM-free Knowledge Graph resolution layer (using DynamicToolOrchestrator) matches query intents against known tool tags, names, or descriptions, with safe fallback and automated 24-hour background cache refreshing.
Install the connector-focused [mcp] extra. Examples use tunnel-manager[mcp] to add FastMCP / FastAPI through agent-connector-sdk[mcp]; the required Agent Utilities core still carries epistemic-graph[full]. The [agent-runtime] extra additionally enables model orchestration.
{ "mcpServers": { "tunnel-manager-mcp": { "command": "uvx", "args": [ "--from", "tunnel-manager[mcp]", "tunnel-manager-mcp" ], "env": { "MCP_TOOL_MODE": "intent", "FILETOOL": "True", "HOSTTOOL": "True", "INGESTTOOL": "True", "INVENTORYTOOL": "True", "OPERATIONSTOOL": "True", "REMOTETOOL": "True", "SECURITYTOOL": "True", "SYSTEMTOOL": "True", "TUNNEL_IDENTITY_FILE": "~/.ssh/id_ed25519", "TUNNEL_INVENTORY_GROUP": "all", "TUNNEL_KG_INGEST": "true", "TUNNEL_KNOWN_HOSTS": "~/.ssh/known_hosts", "TUNNEL_MANAGER_HEALTH_AGGREGATE_S": "3600", "TUNNEL_MANAGER_HEALTH_INGEST": "true", "TUNNEL_MANAGER_HOSTS": "r510,r710,r820,rw710", "TUNNEL_MAX_THREADS": "6", "TUNNEL_PARALLEL": "False", "TUNNEL_REMOTE_PORT": "22" } } } } Runtime references require an alias-aware launcher such as Arbora. Other launchers must omit those entries and inject the resolved values through their own runtime secret boundary.
{ "mcpServers": { "tunnel-manager-mcp": { "url": "http://localhost:8000/tunnel-manager-mcp/mcp" } } } Run a reviewed container image as a least-privilege stdio child (no listener or published port):
docker run -i --rm \ --read-only \ --cap-drop=ALL \ --security-opt=no-new-privileges \ --pids-limit=256 \ --tmpfs /tmp:rw,noexec,nosuid,nodev,size=64m \ -e TRANSPORT=stdio \ -e MCP_TOOL_MODE=intent \ -e FILETOOL=True \ -e HOSTTOOL=True \ -e INGESTTOOL=True \ -e INVENTORYTOOL=True \ -e OPERATIONSTOOL=True \ -e REMOTETOOL=True \ -e SECURITYTOOL=True \ -e SYSTEMTOOL=True \ -e TUNNEL_IDENTITY_FILE=~/.ssh/id_ed25519 \ -e TUNNEL_INVENTORY_GROUP=all \ -e TUNNEL_KG_INGEST=true \ -e TUNNEL_KNOWN_HOSTS=~/.ssh/known_hosts \ -e TUNNEL_MANAGER_HEALTH_AGGREGATE_S=3600 \ -e TUNNEL_MANAGER_HEALTH_INGEST=true \ -e TUNNEL_MANAGER_HOSTS=r510,r710,r820,rw710 \ -e TUNNEL_MAX_THREADS=6 \ -e TUNNEL_PARALLEL=False \ -e TUNNEL_REMOTE_PORT=22 \ registry.example.invalid/tunnel-manager@sha256: tunnel-manager-mcp For containerized network HTTP, supply an authenticated TLS ingress (or direct server TLS), exact MCP_ALLOWED_HOSTS, and an exact trusted-proxy CIDR policy through the operator-owned deployment profile. The generator does not emit an unauthenticated non-loopback listener.
Auto-generated from the code-read env surface (MCP_TOOL_MODE + package vars) — do not edit.
tunnel-manager can run as a local stdio process or container, or behind a remote network boundary. The Deployment guide carries the detailed transport contract.
tunnel-manager works from a single shared YAML inventory that maps short host aliases (e.g. edge-node) to their SSH connection details. Every ecosystem surface reads the same file — the HostManager API, the tunnel-manager CLI, the MCP server, container-manager-mcp (its cm_* host aliases), and the ssh-bootstrap skill — so the operator define the operator's fleet once.
Location — ~/.config/agent-connector-sdk/inventory.yml (.yml preferred). A legacy inventory.yaml at the same path is still read when no .yml exists, so existing installs keep working. Override with TUNNEL_INVENTORY.
tunnel-manager inventory init # write a commented inventory.yml template (--force to overwrite) tunnel-manager inventory doctor # validate hosts/groups; --fix migrates legacy .yaml -> .yml tunnel-manager inventory show # print the resolved path + host/group summary Full schema, every host field, the copy-paste template, and override options live in the Inventory guide.
44 package + 14 inherited variable(s). Auto-generated from .env.example + the shared agent-connector-sdk set — do not edit.
Every variable the server reads, grouped by purpose. See .env.example for a copy-paste starting point.
Each action-routed tool can be disabled individually via its toggle env var (set to false). The full list is in the Available MCP Tools table above (HOSTTOOL, REMOTETOOL, INVENTORYTOOL, OPERATIONSTOOL, SYSTEMTOOL, FILETOOL, SECURITYTOOL).
This repository features a fully integrated Pydantic AI Graph Agent. It communicates over the Agent Control Protocol (ACP) and interacts smoothly with the Agent Web UI (AG-UI) and Terminal interface.
# Set credentials export TUNNEL_IDENTITY_FILE="your_value" export DEBUG="your_value" export PYTHONUNBUFFERED="your_value" # Run the agent server tunnel-manager-agent --provider openai --model-id gpt-4o Docker Compose Orchestration The following docker/agent.compose.yml configures the Agent, Web UI, and Terminal Interface together:
version: '3.8' services: tunnel-manager-mcp: image: example/tunnel-manager:mcp container_name: tunnel-manager-mcp hostname: tunnel-manager-mcp restart: always env_file: - ../.env environment: - PYTHONUNBUFFERED=1 - HOST=0.0.0.0 - PORT=8000 - TRANSPORT=streamable-http ports: - "8000:8000" healthcheck: test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"] interval: 30s timeout: 10s retries: 3 start_period: 10s logging: driver: json-file options: max-size: "10m" max-file: "3" tunnel-manager-agent: image: example/tunnel-manager@sha256: container_name: tunnel-manager-agent hostname: tunnel-manager-agent restart: always depends_on: - tunnel-manager-mcp env_file: - ../.env command: [ "tunnel-manager-agent" ] environment: - PYTHONUNBUFFERED=1 - HOST=0.0.0.0 - PORT=9002 - MCP_URL=http://tunnel-manager-mcp:8000/mcp - PROVIDER=${PROVIDER:-openai} - MODEL_ID=${MODEL_ID:-gpt-4o} - ENABLE_WEB_UI=True - ENABLE_OTEL=True ports: - "9002:9002" healthcheck: test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:9002/health')"] interval: 30s timeout: 10s retries: 3 start_period: 10s logging: driver: json-file options: max-size: "10m" max-file: "3" Detailed graph node architecture explanations, custom skill configurations, and agentic trace guides are available in docs/deployment.md.
Built directly upon the enterprise-ready agent-connector-sdk core, standard security parameters are fully supported:
Pick the extra that matches what the operator want to run:
# Connector-focused MCP server (includes the shared graph engine) uv pip install "tunnel-manager[mcp]" # Agent runtime (adds model orchestration to the shared graph engine) uv pip install "tunnel-manager[agent]" # Everything (development) uv pip install "tunnel-manager[all]" # or: python -m pip install "tunnel-manager[all]" Container images (:mcp vs :agent) One multi-stage docker/Dockerfile builds two right-sized images, selected by --target:
docker build --target mcp -t example/tunnel-manager:mcp docker/ # connector-focused MCP server docker build --target agent -t example/tunnel-manager:agent-local docker/ # agent runtime docker/mcp.compose.yml runs the connector-focused :mcp server; docker/agent.compose.yml runs the agent (immutable agent digest) with a co-located :mcp sidecar.
Both [mcp] and [agent] carry the epistemic-graph engine through the required Agent Utilities core dependency (epistemic-graph[full]). The [mcp] extra keeps the server connector-focused; [agent] also enables model orchestration. Local deployments can use the bundled engine. For production or shared state, run epistemic-graph as a dedicated database service and configure the runtime to use it. Deployment recipes (single-node + Raft HA), connection configuration, and architecture diagrams are documented in the epistemic-graph deployment guide.
The complete documentation is published as the official documentation site and is the recommended reference for installation, deployment, and day-to-day operation.
AGENTS.md is the canonical contributor/agent guidance.
Maintained by the project contributor team. Package metadata intentionally uses a role address rather than personal identity.
Contributions are welcome! Please ensure code quality by running local checks before submitting pull requests:
Provision this package with the consolidated agent-connector-sdk-deployment workflow. It selects an installed-package, editable-source, or immutable-container path; records only runtime secret and TLS-profile references in AgentConfig; and runs doctor, registration, policy, observability, and rollback gates. Ask your agent to "deploy tunnel-manager with agent-connector-sdk-deployment".
The repository embeds no deployment profile, credential value, certificate path, or environment-specific endpoint. Supply those at runtime through AgentConfig and the configured secret provider.
This package ships a compact canonical skill surface with specialist procedures kept as referenced workflows. The current MCP tools, skill metadata, connector_manifest.yml, ontology, mappings, shapes, fixtures, migrations, tool-schema fingerprints, and certification metadata form one versioned capability contract. Validate them together; do not rely on stale tool names or historical per-task skill wrappers.
Runtime endpoints, credentials, certificate trust, tenant identity, retention, and observability policy are deployment inputs and are never packaged values. See Configuration, trust, and privacy before enabling a network transport, connector ingestion, Arbora delegation, or trace export.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




