create-docker-mcp-tunnel

create-docker-mcp-tunnel is a command for Claude Code from ronmkr/PromptBook. It costs 25 tokens per session (4,366 once invoked), scanned B, original, Apache-2.0.

A command workflow for running a local Docker Compose setup that lets Gemini reach a private MCP server through Google's MCP tunnel. Docker Compose runs several related containers together, and MCP connects agents to tools.

In plain words
What is it for?
Use it to build and troubleshoot a local tunnel with manually supplied credentials, while explaining the required console steps.
Why use it?
It guides the setup of the proxy, tunnel agent, certificates, and credentials needed for local testing.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is - ./config/mcp-proxy.yaml:/etc/mcp-proxy/config.yaml:ro.

Good fit Use it to build and troubleshoot a local tunnel with manually supplied credentials, while explaining the required console steps.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ronmkr/PromptBook
agentmods
npx agentmods add commands/ronmkr/promptbook/create-docker-mcp-tunnel

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for create-docker-mcp-tunnel

README.md
[![agentmods](https://agentmods.dev/badge/commands/ronmkr/promptbook/create-docker-mcp-tunnel/github.svg)](https://agentmods.dev/commands/ronmkr/promptbook/create-docker-mcp-tunnel)
Your own site
<a href="https://agentmods.dev/commands/ronmkr/promptbook/create-docker-mcp-tunnel"><img src="https://agentmods.dev/badge/commands/ronmkr/promptbook/create-docker-mcp-tunnel/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for create-docker-mcp-tunnel

Your own site · 80×15
<a href="https://agentmods.dev/commands/ronmkr/promptbook/create-docker-mcp-tunnel"><img src="https://agentmods.dev/badge/commands/ronmkr/promptbook/create-docker-mcp-tunnel.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,366 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.04366
Opus 5 $0.00013 $0.02183
Sonnet 5 $0.00005 $0.00873
Haiku 4.5 $0.00003 $0.00437

Measured 9d ago against content hash 8f222baba001, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

create-docker-mcp-tunnel scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

chmod 600 "$DIR/.env"

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl https://api.platform.local/v1/messages \
plugins/ecosystem/dev-tools/mcp-tunnels/commands/create-docker-mcp-tunnel.md · 370 lines

How it starts

The opening of the file, as written. The whole thing — 370 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Create a Docker MCP tunnel

Drive the MCP tunnels quickstart end to end: from zero to Gemini calling a private MCP server through an Google-operated tunnel, using Docker Compose with manually supplied credentials (the shortest path for local testing).

MCP tunnels is in research preview. It is provided "as-is" with no uptime or support commitment and depends on a third-party transport (Cloudflare). Do not put production traffic through this without reading the security model.

You are guiding the user through a mix of local commands you run and Console actions only they can do (creating the tunnel, uploading the CA). Be a careful operator: explain each step briefly, run the commands, check the output, and stop with a clear diagnosis if something fails.

Deployment directory: use $ARGUMENTS if the user passed a path, otherwise default to ./mcp-tunnel. Refer to it below as $DIR.

What you'll build

A container stack on the user's machine:

  • mcp-proxy — Google's proxy. Terminates the inner TLS handshake using a certificate the user controls, validates upstream IPs, routes by hostname.
  • cloudflared — the tunnel agent. Outbound-only connection to the Google tunnel edge; shares the proxy's network namespace.
  • hello-mcp (optional) — a sample FastMCP server, only if the user has no MCP server of their own to expose yet.

When it's up, the routed server is reachable from Gemini at https://<subdomain>.<tunnel-domain>/<path> with nothing listening on a public port.

Step 0 — Preflight

Run these and report what's missing before going further:

docker --version && docker compose version && openssl version
  • Docker + Docker Compose are required. openssl 1.1.1+ is required (the commands below use -addext, available in 1.1.1+).
  • Confirm the host has outbound access to api.platform.local:443 and the tunnel edge (198.41.192.0/19, 2606:4700:a0::/44) on 7844 TCP and UDP. No inbound ports are opened.

Read the full file on GitHub · 370 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 370 lines · 25 tokens per session scan B 8f222baba001

Subscribe to this mod's changes

create-docker-mcp-tunnel is a command published in the GitHub repository ronmkr/PromptBook (2 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 25 tokens to every session and 4,366 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.