Claude Code with Docker: Local Models, MCP, Sandboxes | Docker

Source

Summary

Docker now offers three integration points for Claude Code: local model execution via Docker Model Runner (Anthropic-compatible API), 300+ containerized MCP servers via Docker MCP Toolkit for tool connectivity, and Docker Sandboxes for safe unsupervised agent execution. Together they form a stack for running AI coding agents with full data control and isolation.

Key Insight

  • Docker Model Runner exposes an Anthropic-compatible API endpoint, so Claude Code can run against local models by setting ANTHROPIC_BASE_URL. This keeps data local and controls cost, though local model quality will lag behind hosted Claude.
  • Docker MCP Toolkit packages 300+ MCP servers as containers on Docker Hub with one-click deployment and automatic credential handling. Practical example shown: converting 15 TODO comments into Jira tickets by chaining GitHub, Filesystem, and Atlassian MCP servers — no manual configuration.
  • Docker Sandboxes are disposable isolated environments where agents can install packages, modify files, delete things, and run Docker containers without touching the host. This is the missing piece for letting agents run with --dangerously-skip-permissions safely.
  • The key architectural insight: separating the agent runtime (sandbox), tool access (MCP), and model backend (local vs hosted) into independent layers gives maximum flexibility. You can mix local models for privacy-sensitive work with hosted models for quality-critical tasks.