Ever felt scared that AI will rummage through your files and find
and use API keys or admin accounts you had no desire of allowing to touch?
Fear not. domcp is a Docker-for-MCPs.
It wraps MCP server commands (uvx, npx, pipx) in a container,
proxying stdio or exposing HTTP ports transparently. Only the working
directory is mounted into the container by default, nothing else! Host
environment variables are not forwarded unless you opt in with
patterns.
Isolating MCP servers [Mirror from GitLab]
Estrelas
1
Ferramentas
—
Disponibilidade
—
-e/--expose-env
Synopsis
domcp [OPTIONS] -- <COMMAND>...
Description
domcp generates a Dockerfile for the given command, builds a container
image, and runs it with restricted permissions. The docker image is cached
for subsequent invocations.
The MCP transport mode (stdio or HTTP/SSE) is detected automatically
from command flags and any environment variables that domcp will pass into the container.
The container engine is auto-detected, supporting podman and docker.
Client Configuration
Just prepend your MCP startup command with domcp [options] --.
Example claude_desktop_config.json:
Development version can be installed by cloning this repo and executing:
cargo install --path .
Don't forget it requires podman or docker as an underlying container engine.
Options
--engine <ENGINE> Container engine (default: auto-detect)
-w, --workdir <DIR> Working directory to mount (default: $PWD)
--no-workdir Don't mount any working directory
-v, --extra-mount <PATH> Additional directory to mount (repeatable)
-e, --expose-env <PATTERN> Expose host env vars matching PATTERN (repeatable; prefixes like `ATLASSIAN_*`)
--network <MODE> Network mode (default: engine default)
-i, --install <PKG> Extra package to install (repeatable)
-p, --port <HOST:CONTAINER> Port mapping (repeatable; auto-added for HTTP)
--rebuild Force image rebuild
--no-user-map Don't map host UID/GID into container
--dry-run Print generated Dockerfile and exit
-h, --help Print help
-V, --version Print version
domcp scans command arguments and environment values exposed via -e/--expose-env to choose between
stdio and HTTP mode. The first matching rule wins:
--transport sse|streamable-http|http HTTP (port from --port or 8080)
--port <N> HTTP on port N
--transport=<val> / --port=<N> combined forms, same as above
MCP_TRANSPORT=sse|http|streamable-http HTTP via environment
PORT|MCP_PORT|FASTMCP_PORT=<N> HTTP on port N via environment
(none of the above) stdio
In HTTP mode domcp automatically:
adds -p PORT:PORT
adds EXPOSE to the Dockerfile
Security
Default isolation:
Only $PWD is mounted (at the same path inside the container)
No host environment variables are forwarded unless explicitly exposed
Use --no-workdir if the server needs no filesystem access
Use --network none if the server needs no network access
Runs as host UID:GID
No --privileged flag
Images built locally from official base images
Known issues
On the first run domcp needs to generate a Dockerfile, pull the base image,
let it install the runtime, then the MCP server inside the container, then run
the container. These steps can take a while on the first run, especially
if the network bandwidth is limited, so set the timeouts appropriately.
License
Copyright (C) 2026 Oleg `Kanedias` Chernovskiy
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Ainda não há lista de ferramentas. Servidores remotos recebem uma após a primeira verificação de saúde.
Perguntas frequentes
Perguntas
Como instalo Domcp?
Copie nesta página a configuração stdio para Cursor, Claude Desktop, Claude Code ou VS Code. Ela usa a instalação do publicador, não um proxy do PlugMCP.
Domcp precisa de uma chave de API?
Este registro não lista nenhuma variável de ambiente obrigatória.
Qual transporte Domcp usa?
Domcp roda localmente via stdio.
Quando Domcp foi verificado pela última vez?
Última verificação: 2026-10-28. Isolating MCP servers [Mirror from GitLab]