
How to add Docker MCP Server to Cursor
Community server to manage Docker containers, images, volumes, and Compose stacks via agents. Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 15, 2026 · 720★ · stdio · no auth
Cursor config for Docker MCP Server
uvx mcp-server-docker{
"mcpServers": {
"docker-mcp-server": {
"command": "uvx",
"args": [
"mcp-server-docker"
]
}
}
}Requires `uv` (the Python package runner). Install it from https://docs.astral.sh/uv/ if `uvx` is not found.
Setup steps
- 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the Docker MCP Server config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of Docker MCP Server's tools to confirm it's connected.
Before you start
- A running Docker daemon (local via the Docker socket, or a remote daemon reachable over SSH)
- Python with the `uv`/`uvx` package manager (or Docker, to run the server itself as a container)
- No API key required — it uses your local Docker engine permissions
- An MCP-capable client such as Claude Desktop
What Docker MCP Server can do in Cursor
list_containersList Docker containers, including stopped ones.
create_containerCreate a container from an image without starting it.
run_containerCreate and start a container in one step.
recreate_containerStop, remove, and re-create a container (used by the compose flow).
start_containerStart an existing stopped container.
stop_containerStop a running container.
remove_containerRemove a container.
fetch_container_logsRetrieve logs from a container.
Security
Full access to the Docker daemon is effectively root-equivalent on the host, so only connect it to a Docker context you trust the agent to control. When containerized it requires mounting the Docker socket, which grants broad host privileges.
Docker MCP Server + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Docker MCP Server config there under the "mcpServers" key and restart the client.
Is Docker MCP Server safe to use with Cursor?
Full access to the Docker daemon is effectively root-equivalent on the host, so only connect it to a Docker context you trust the agent to control. When containerized it requires mounting the Docker socket, which grants broad host privileges.
Does it need an API key?
No. It talks directly to your local Docker daemon and inherits your Docker permissions. There is no token to configure.
Can it manage a remote Docker host?
Yes. It supports connecting to a remote Docker daemon over SSH, so you can drive a remote host from a local agent.
Can it run privileged containers?
No. The server intentionally does not support privileged options like --privileged or --cap-add/--cap-drop, and it warns against storing sensitive data in container configurations.