Docker MCP Gateway on Linux without Docker Desktop - Fix 'docker: unknown command: docker mcp', Install the CLI Plugin, Profiles, Claude Code, and What Does Not Work
TL;DR
docker: unknown command: docker mcpmeans the CLI plugin is not installed. Docker Desktop ships it; Docker Engine on a Linux server does not (Docker 28.0.4, Ubuntu 24.04, 2026-11-30).- The fix is one 17.3 MB download: take
docker-mcp-linux-amd64.tar.gzfrom a release tag ofdocker/mcp-gatewayand unpack it into~/.docker/cli-plugins/. The documentedreleases/latestlink returns 404, because every release is marked pre-release. - Old tutorials no longer match the CLI. In v0.44.3
docker mcp server enableanswers "This command is obsolete"; servers now live in profiles:docker mcp catalog pull,docker mcp profile create --name dev --server catalog://...,docker mcp gateway run --profile dev. - The gateway starts each MCP server as its own container (1 CPU, 2 GB,
no-new-privileges) and hands the client one combined tool list: 8 built-in tools, 11 with my two-server profile. - Claude Code:
claude mcp add MCP_DOCKER -- docker mcp gateway run --profile dev, or let Docker write the entry withdocker mcp client connect claude-code --profile dev. - Not working on plain Engine:
docker mcp secret("docker pass has not been installed") anddocker mcp oauth(it looks for a Docker Desktop socket). Servers that need no credentials are fine. - Only need one MCP server, not a gateway? Running a single server's image directly is simpler; the Terraform MCP server post does exactly that.
The Docker documentation describes the MCP Toolkit as "a management interface integrated into Docker Desktop". A Linux server does not run Docker Desktop, so the question is simple: how much of this works with the Engine alone? The gateway page answers in one sentence, "For Docker Engine without Docker Desktop, you'll need to download and install the MCP Gateway separately before you can run it", and three steps. I followed them on 2026-11-30 on Ubuntu 24.04.5 with Docker Engine 28.0.4, docker-mcp v0.44.3 and Claude Code 2.1.332. All output below is from that run.
Table of Content
- What you are installing
- Before - docker mcp is an unknown command
- Install the plugin from its release
- Catalog and profile
- Run the gateway
- Connect Claude Code
- What does not work without Docker Desktop
- What broke when I ran this
- Conclusion
1. What you are installing
Three words get mixed up, so here they are once:
| Term | What it is | Needs Docker Desktop? |
|---|---|---|
| MCP Toolkit | the screens in Docker Desktop for browsing and enabling MCP servers | yes, it is part of Desktop |
| MCP Gateway | the process an AI client talks to; it starts the MCP servers as containers and merges their tools | no |
docker mcp | the CLI plugin that contains the gateway and the commands to manage catalogs, profiles and clients | no, open source |
| MCP Catalog | the list of packaged servers, published as images under mcp/ on Docker Hub | no |
So on a server you install one binary, and the "Toolkit" is whatever you do with it on the command line.
2. Before - docker mcp is an unknown command
This is the state of a machine with Docker Engine and the two plugins that the Engine packages bring along:
1$ docker version --format 'server {{.Server.Version}} client {{.Client.Version}} context {{.Client.Context}}'
2server 28.0.4 client 28.0.4 context default
3
4$ ls /usr/libexec/docker/cli-plugins
5docker-buildx
6docker-compose
7
8$ docker mcp
9docker: unknown command: docker mcp
10
11Run 'docker --help' for more information
12
13$ docker mcp gateway run
14docker: unknown command: docker mcp
15
16Run 'docker --help' for more information
17
18$ docker desktop version
19docker: unknown command: docker desktop
20
21Run 'docker --help' for more information
docker <word> works when a file named docker-<word> sits in one of the CLI plugin directories. Buildx and Compose are there; docker-mcp is not. Nothing is broken, the plugin simply is not part of the Engine packages.
3. Install the plugin from its release
The documentation says to "Download the latest binary from the GitHub releases page" and links releases/latest. That link is the first trap:
1$ curl -s -o /dev/null -w '%{http_code} %{url_effective}\n' -L https://github.com/docker/mcp-gateway/releases/latest
2200 https://github.com/docker/mcp-gateway/releases
3
4$ curl -s -o /dev/null -w '%{http_code}' https://api.github.com/repos/docker/mcp-gateway/releases/latest
5404
6
7$ curl -s -o /dev/null -w '%{http_code} %{url_effective}\n' -L https://github.com/docker/mcp-gateway/releases/latest/download/docker-mcp-linux-amd64.tar.gz
8404 https://github.com/docker/mcp-gateway/releases/latest/download/docker-mcp-linux-amd64.tar.gz
GitHub's "latest" skips pre-releases, and the five newest releases (v0.44.3 back to v0.43.1) are all flagged pre-release. The browser link lands on the release list, the API and the latest/download shortcut return 404. A script has to name the tag:
1$ curl -fsSLO https://github.com/docker/mcp-gateway/releases/download/v0.44.3/docker-mcp-linux-amd64.tar.gz
2
3$ sha256sum docker-mcp-linux-amd64.tar.gz
4e4df4c2dcc013011519da70a546589d8db0c1461a0050070239339675cfca98c docker-mcp-linux-amd64.tar.gz
5
6$ tar -tzvf docker-mcp-linux-amd64.tar.gz
7-rwxr-xr-x runner/runner 46993570 2026-10-26 18:55 docker-mcp
8
9$ mkdir -p /home/runner/.docker/cli-plugins
10$ tar -xzf docker-mcp-linux-amd64.tar.gz -C /home/runner/.docker/cli-plugins
11$ chmod +x /home/runner/.docker/cli-plugins/docker-mcp
12
13$ docker mcp version
14v0.44.3
15
16$ docker info --format '{{range .ClientInfo.Plugins}}{{.Name}} {{.Version}} | {{end}}'
17buildx v0.39.1 | compose v2.38.2 | mcp v0.44.3 |
The archive is 17.3 MB and holds one 47.0 MB binary. The release has no checksum file among its six assets, so there is nothing to run sha256sum -c against; the value above does match the sha256 digest that the GitHub API reports for the asset. For all users of a machine, put the binary in /usr/local/lib/docker/cli-plugins/ instead of the home directory. There are also linux-arm64, darwin and windows builds.
4. Catalog and profile
A fresh install has nothing in it:
1$ docker mcp catalog ls
2No catalogs found. Use `docker mcp catalog create` or `docker mcp catalog pull <oci-reference>` to create a catalog.
3
4$ docker mcp profile ls
5No profiles found. Use `docker mcp profile create --name <name>` to create a profile.
6
7Tip: Get started quickly with a starter template:
8 docker mcp template list View available templates
9 docker mcp template use <id> Create a profile from a template
The project's README says profiles are "enabled automatically in Docker Desktop" and have to be switched on elsewhere, so that comes first. Then the catalog, then a profile that picks servers out of it:
1$ docker mcp feature enable profiles
2Feature 'profiles' enabled successfully.
3
4This feature enables profile management tools.
5When enabled, the cli provides commands for managing profiles:
6 - docker mcp profile <subcommand> ...
7
8This also enables the --profile flag for the docker mcp gateway run command.
9
10$ docker mcp catalog pull mcp/docker-mcp-catalog
11Catalog mcp/docker-mcp-catalog:latest pulled
12
13$ docker mcp catalog ls
14Reference | Digest | Title
15mcp/docker-mcp-catalog:latest | 833a860dd74edd55b291060afe3f7ea725bc747d56a6acdea211db63181019cf | Docker MCP Catalog
16
17$ docker mcp profile create --name dev --server catalog://mcp/docker-mcp-catalog/duckduckgo
18Created profile dev with 1 servers
19
20$ docker mcp profile server add dev --server catalog://mcp/docker-mcp-catalog/fetch
21Added 1 server(s) to profile dev
22
23$ docker mcp profile ls
24ID Name
25---- ----
26dev dev
The catalog held 308 servers when I pulled it. I picked two that need no API key, a DuckDuckGo search server and a URL fetcher. docker mcp profile show dev prints the result as YAML, with each server pinned to an image digest such as mcp/duckduckgo@sha256:5617c4c6..., not to a moving tag.
| Step | Command in v0.44.3 | Older command, and what it does now |
|---|---|---|
| Get the server list | docker mcp catalog pull mcp/docker-mcp-catalog | docker mcp catalog init (prints the help text now) |
| Choose servers | docker mcp profile create --name dev --server catalog://... | docker mcp server enable duckduckgo ("This command is obsolete") |
| See the choice | docker mcp profile show dev | docker mcp server ls ("This command is obsolete") |
| Start it | docker mcp gateway run --profile dev | docker mcp gateway run |
5. Run the gateway
docker mcp gateway run speaks MCP on standard input and output, which is how a client starts it. To see what a client sees, I sent it the standard initialize and tools/list messages with a small Python script. With no profile, the gateway offers only its own management tools:
1$ docker mcp gateway run
2initialize -> {"protocolVersion": "2025-06-18", "serverInfo": {"name": "Docker AI MCP Gateway", "version": "2.0.1"}, "capabilities": ["logging", "prompts", "resources", "tools"]}
3tools/list -> 8 tool(s)
Those eight are mcp-find, mcp-add, mcp-remove, mcp-exec, mcp-config-set, mcp-create-profile, mcp-activate-profile and code-mode: the agent can search the catalog and add servers to its own session. With the profile the list grows to 11, the eight plus search and fetch_content from the DuckDuckGo server and fetch from the fetch server. The gateway's log shows what it does to get there:
1- Using images:
2 - mcp/duckduckgo@sha256:5617c4c60f48f47556c0735de7a73f6abd731c132c65ec8c720b511819c9f88f
3 - mcp/fetch@sha256:1a7a0996a565a0b8ca5c41b42830d4e5f334d33f851596bbd9debb2beedb22d3
4- Verifying images [mcp/duckduckgo mcp/fetch]
5> Images verified in 324.78341ms
6> Images pulled in 1.833384ms
7- Those servers are enabled: duckduckgo, fetch
8- Listing MCP tools...
9 - Running mcp/fetch with [run --rm -i --init --security-opt no-new-privileges --cpus 1 --memory 2Gb --pull never -l docker-mcp=true -l docker-mcp-tool-type=mcp -l docker-mcp-name=fetch -l docker-mcp-transport=stdio]
10 - Running mcp/duckduckgo with [run --rm -i --init --security-opt no-new-privileges --cpus 1 --memory 2Gb --pull never -l docker-mcp=true -l docker-mcp-tool-type=mcp -l docker-mcp-name=duckduckgo -l docker-mcp-transport=stdio]
11 > duckduckgo: (2 tools)
12 > fetch: (1 tools) (1 prompts)
13> 3 tools listed in 1.300312906s
(I left out the DuckDuckGo server's own startup lines between the two halves.) This is the part I like about the design: every server is a short-lived container with one CPU, 2 GB of memory and no-new-privileges, its image signature is verified, and when the client disconnects docker ps -a is empty again. The two images are 178 MB and 283 MB on disk.
Over HTTP the same gateway serves several clients, and here it protects itself:
1$ docker mcp gateway run --profile dev --transport streaming --port 8811
2...
3> Initialized in 1.81562442s
4> Start streaming server on port 8811
5> Gateway URL: http://localhost:8811/mcp
6> Use Bearer token: Authorization: Bearer <token>
7
8$ curl -s -i -m 10 -X POST http://127.0.0.1:8811/mcp -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' -d '{"jsonrpc":"2.0","id":1,"method":"initialize", ...}'
9HTTP/1.1 401 Unauthorized
10Content-Type: text/plain; charset=utf-8
11Www-Authenticate: Bearer realm="MCP Gateway"
12X-Content-Type-Options: nosniff
13Date: Mon, 30 Nov 2026 04:06:23 GMT
14Content-Length: 13
15
16Unauthorized
With the Authorization: Bearer header from the log, the same request returns HTTP/1.1 200 OK with Content-Type: text/event-stream and an Mcp-Session-Id. The gateway prints a new random token at every start (I replaced it with <token> above, and shortened the JSON body in the curl line); the release notes say MCP_GATEWAY_AUTH_TOKEN sets a fixed one, which is what you want behind a reverse proxy.
6. Connect Claude Code
Two ways, same result. By hand, with Claude Code's own command (Claude Code MCP documentation):
1$ claude mcp add MCP_DOCKER -- docker mcp gateway run --profile dev
2Added stdio MCP server MCP_DOCKER with command: docker mcp gateway run --profile dev to local config
3File modified: /home/runner/.claude.json [project: /tmp/dockermcp/proj2]
4
5$ claude mcp list
6Checking MCP server health…
7MCP_DOCKER: docker mcp gateway run --profile dev - ✔ Connected
8MCP_TYPO: docker mcp gatewayy run - ✘ Failed to connect — CONNECTION_CLOSED: Connection closed
claude mcp list really starts the gateway, which really starts the two containers, so "Connected" means the whole chain works. MCP_TYPO is an entry I added with a misspelt subcommand to see the failure.
Or let Docker write the client configuration:
1$ docker mcp client connect claude-code --profile dev
2=== Project-wide MCP Configurations (/tmp/dockermcp/proj) ===
3 ● claude-code: connected
4 MCP_DOCKER: Docker MCP Catalog (gateway server) (stdio)
5 ● crush: disconnected
6 ● cursor: no mcp configured
7 ● kiro: no mcp configured
8 ● vscode: no mcp configured
9You might have to restart 'claude-code'.
10Tip: Your client is now connected! Use docker mcp tools ls to see your available tools
In this repository the .mcp.json entry already existed from an earlier claude mcp add --scope project, and Docker reported it as connected. With --global the status went from "disconnected" to "connected", and afterwards the top level of ~/.claude.json had an MCP_DOCKER entry with the command docker mcp gateway run --profile dev. The client list is long (claude-code, claude-desktop, cline, codex, continue, cursor, gemini, vscode, zed and more). One Claude Code detail: a server that arrives through a project .mcp.json shows as ⏸ Pending approval (run claude to approve) in claude mcp list until you have approved it once in an interactive session.
7. What does not work without Docker Desktop
| Feature | On plain Docker Engine | Message |
|---|---|---|
| Plugin, catalog, profiles, gateway (stdio and HTTP) | works | - |
| Servers without credentials (search, fetch, ...) | work | - |
docker mcp secret ls / set | fails | docker pass has not been installed |
| Secrets inside the gateway | skipped with a warning | Failed to fetch secrets from secrets engine: secrets engine is not available |
docker mcp oauth ls | fails | dial unix /home/runner/.docker/desktop/tools.sock: connect: no such file or directory |
docker mcp server enable, server ls | removed | This command is obsolete. |
The secrets row is the one that matters. Most interesting servers in the catalog (GitHub, databases, cloud providers) want a token, and the gateway expects to get it from Docker's secrets engine, which Desktop brings along. On my machine the socket it looks for, ~/.cache/docker-secrets-engine/engine.sock, does not exist. There is a separate docker/secrets-engine project whose v0.11.2 release has .deb packages for Debian and Ubuntu; that is presumably where docker pass comes from on Linux, but I did not install or test it, so I will not claim it closes the gap.
The README also mentions export DOCKER_MCP_IN_CONTAINER=1 for "Docker Desktop is not running" errors on Docker CE. The commands I ran before setting it (version, feature ls, catalog ls, profile ls, tools ls) already worked without it, so on this machine it was not needed for them.
8. What broke when I ran this
My first install script found no release at all. I asked the GitHub API for releases/latest, got 404, and the script carried on with an empty URL, so every later docker mcp command still said "unknown command". The cause is in section 3: all releases are pre-releases. The fix was to list releases?per_page=5 and take the first tag.
Half the commands I knew are gone. I wrote the first version of my test with the older command set: docker mcp catalog init, docker mcp server enable duckduckgo, docker mcp server ls. In v0.44.3 the first prints the help text and exits 0, the other two say "This command is obsolete. See docker mcp profile server ...". Because catalog init exits 0, a provisioning script built on it reports success and leaves an empty catalog behind.
The search tool answered with nothing. Through the gateway I called search with the query "jhooq terraform". It returned, as a normal result: "No results were found for your search query. This could be due to DuckDuckGo's bot detection or the query returned no matches." My run came from a cloud machine, which may well be the reason. The plumbing worked, the answer was empty, and an agent would have to cope with that.
The bearer token test failed because of my own grep. I pulled the token out of the gateway log with a pattern that matched the words "Bearer token" in "Use Bearer token:", sent the literal word token, and got the same 401 as with no header. Second attempt with the right pattern: 200. If you script against the HTTP gateway, set MCP_GATEWAY_AUTH_TOKEN yourself instead of scraping the log.
docker mcp client ls needs a git repository. Outside one it stops with "could not find root project root (use --global flag to update global configuration)". Inside a repository it works, and --global works anywhere.
--servers is a different mode. docker mcp gateway run --servers duckduckgo gave a clean list of 2 tools, but its log says "dynamic-tools disabled when using --servers flag" and it read the catalog from a desktop.docker.com URL, not from the one I had pulled. Profiles are the path the current CLI wants you on.
9. Conclusion
docker: unknown command: docker mcpis a missing CLI plugin, nothing more. Downloaddocker-mcp-linux-amd64.tar.gzfrom a release tag into~/.docker/cli-plugins/.- Enable profiles, pull the catalog, create a profile, run
docker mcp gateway run --profile <name>. - Point the client at that command; for Claude Code it is one
claude mcp addline andclaude mcp listproves it. - Each server runs as a container with 1 CPU and 2 GB; over HTTP the gateway demands a bearer token.
- Plan around secrets: on plain Engine they do not work out of the box, so start with servers that need none.
If the Docker installation itself is the problem, installing Docker on Ubuntu and permission denied on the Docker daemon socket come first. For building an MCP server of your own rather than running packaged ones, see an MCP server for Claude on Bedrock.
Did this save you a debugging session? Stay in the loop -
- Subscribe on YouTube - every post here has a screen-recorded companion video.
- Code on GitHub - the repositories, Terraform and scripts behind these posts.