Skip to content
PluginImported

mcp-tunnels

Connect Claude to a private MCP server through an Anthropic MCP tunnel. Drives the Docker Compose quickstart end to end: certificates, proxy config, cloudflared, and a verifiable sample server.

Imported description, not reviewed yet

This item came from its original repository and was only scanned automatically; no editor has written an Arabic description for it yet. Read its content yourself before you rely on it. This page is not indexed by search engines until it is reviewed.

Download

Files: 4 · Size: 32 KB

Download the ZIP

The file carries the license of the original source.

Install

Plugins are installed from a plugin marketplace in Claude Code, not by copying files. Download the package to read its content and its license.

Instructions

mcp-tunnels

Connect Claude to an MCP server running inside your private network through an Anthropic MCP tunnel — no inbound ports, no public exposure, no IP allowlisting on your origin. Traffic flows over an outbound-only connection.

Research preview. MCP tunnels is provided "as-is" with no uptime or support commitment and depends on a third-party transport provider (Cloudflare). Review the security model before sending anything sensitive.

Commands

/create-docker-mcp-tunnel [deployment-dir]

Drives the MCP tunnels quickstart end to end on your machine, using Docker Compose with manually supplied credentials (the shortest path for local testing). It walks you through the parts only you can do in the Claude Console and runs everything else for you:

  1. Preflight — checks Docker, Docker Compose, OpenSSL, and outbound connectivity.
  2. Create the tunnel (Console) — you create it and copy the domain; the token stays out of the chat and goes into a locked-down, gitignored .env.
  3. Certificates — generates a CA and a server certificate with OpenSSL, with the exact extensions the tunnel requires.
  4. Register the CA (Console) — you upload ca.crt; the tunnel goes Active.
  5. Upstream — scaffolds a verifiable FastMCP sample server, or wires up an MCP server you already have.
  6. Proxy config + Compose — writes mcp-proxy.yaml and a docker-compose.yaml with digest-pinned images and the cloudflared agent.
  7. Start and verify — brings the stack up and checks the proxy and tunnel logs.
  8. Call it from Claude — shows you how to reach the server from Managed Agents and the Messages API.

It also carries a troubleshooting matrix (TLS handshake failures, the routes-must-be-a-map gotcha, the tls.key permission issue, the config-is-not-hot-reloaded trap, upstream IP validation) and the operational basics for token rotation and certificate renewal.

Usage:

/create-docker-mcp-tunnel
/create-docker-mcp-tunnel ~/work/my-tunnel

Copying the CA certificate to another machine

You register the CA in the Console from a browser, which is often a different machine than the one running the stack (for example, the tunnel runs in a remote homespace but you upload ca.crt from your laptop or devbox). Only the certificate (<deployment-dir>/data/ca.crt, ~1 KB PEM) leaves the host — never data/ca.key or data/tls.key.

For a file this small, the simplest path is to print it and paste it into the Console's certificate field directly:

cat <deployment-dir>/data/ca.crt   # default: ~/mcp-tunnel/data/ca.crt

To copy it as a file with scp, run the command from whichever machine can SSH to the other (scp can't relay between two remotes). Pulling from a homespace onto your devbox — if you've run coder config-ssh, the host is coder.<workspace>:

scp coder.<workspace>:<deployment-dir>/data/ca.crt .
# generic form: scp <homespace-ssh-host>:~/mcp-tunnel/data/ca.crt .

Or push from the host to the devbox, if the host can reach it:

scp <deployment-dir>/data/ca.crt <user>@<devbox-host>:~/

What gets built

A small container stack on your host:

ContainerRole
mcp-proxyAnthropic's proxy. Terminates inner TLS with a cert you control, validates upstream IPs, routes by hostname.
cloudflaredThe tunnel agent. Outbound-only to the Anthropic tunnel edge; shares the proxy's network namespace.
hello-mcp (optional)A FastMCP sample server, only if you don't have an MCP server to expose yet.

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

Requirements

  • Docker and Docker Compose.
  • OpenSSL 1.1.1 or newer.
  • A Claude Console role that can manage MCP tunnels.
  • Outbound access to api.anthropic.com:443 and the tunnel edge on 7844 TCP/UDP. No inbound ports are opened.

Scope and next steps

This plugin targets the manual-credentials, single-host, local-testing path. For a hardened single-host deployment (non-root, read-only rootfs, dropped capabilities), a Kubernetes deployment, or programmatic access via Workload Identity Federation, see the official deployment guides: Deploy with Docker Compose / Deploy with Helm.

Author

Anthropic (support@anthropic.com)

License

See LICENSE.

Files

  • folder.claude-plugin323 B
    • plugin.json323 B
  • foldercommands16 KB
    • create-docker-mcp-tunnel.md16 KB
  • LICENSE11 KB
  • README.md4.8 KB

What the automatic scan found

We scanned the files automatically when they were imported. This is what the scan pointed at. It does not mean the item is harmful, and it does not mean it is safe: read it yourself.

  • Needs a lookReads a .env file or secrets

    In file plugins/mcp-tunnels/README.md, line 28

  • Needs a lookReads a .env file or secrets

    In file plugins/mcp-tunnels/commands/create-docker-mcp-tunnel.md, line 110

Comments (0)

No comments yet. Be the first.

Sign in to comment. Commenting comes at level 1 (Member).

Report

Similar items

  • PluginImported

    agent-sdk-dev

    Claude Agent SDK Development Plugin

    Apache-2.0Files: 6

  • PluginImported

    block-no-verify

    PreToolUse hook that prevents AI agents from using --no-verify, --no-gpg-sign, and other bypass flags that skip git hooks

    MITFiles: 4

  • PluginImported

    claude-code-setup

    Analyze codebases and recommend tailored Claude Code automations such as hooks, skills, MCP servers, and subagents.

    Apache-2.0Files: 10

  • PluginImportedContains scripts

    dgx-spark-ops

    NVIDIA DGX Spark (GB10 Grace Blackwell) environment operations: aarch64/CUDA-13 stack setup, training gotcha preflights, and unified-memory/thermal management for local ML workloads

    MITFiles: 13

  • PluginImportedContains scriptsContains hooks

    gh-cli

    Intercepts GitHub URL fetches (WebFetch and MCP fetch tools) and curl/wget commands, redirecting to the authenticated gh CLI.

    CC-BY-SA-4.0Files: 19