Manage Docker containers and images from Claude Code.
## Docker MCP Server for Claude Code
Connect Claude Code to Docker via Model Context Protocol.
### .claude/mcp-servers.json
```json
{
"mcpServers": {
"docker-mcp": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-docker"],
"env": {
"DOCKER_TOKEN": "${env:DOCKER_TOKEN}"
}
}
}
}
```
### Available Tools
Once connected, Claude Code can:
- Query Docker data directly
- Create and update resources
- Monitor status and events
- Automate common workflows
### Setup
1. Install the MCP server package
2. Set your DOCKER_TOKEN environment variable
3. Add the config to `.claude/mcp-servers.json`
4. Restart Claude Code to activate
### Security Notes
- Never commit tokens to version control
- Use environment variables for all secrets
- Review MCP server permissions carefully
- Limit scope to what's neededFree to copy and use. Compatible with Claude Code, Claude 4 Opus.
Copy this prompt into your Claude Code project. Customize bracketed variables for your specific setup.
Initial release
Sign in and download this prompt to leave a review.