In the rapidly evolving landscape of software development, integrating modern AI tools is essential to boosting productivity and enhancing the developer experience. One such advancement is the integration of Docker’s Model Context Protocol (MCP) Toolkit with Visual Studio Code’s GitHub Copilot Agent Mode.
This powerful combination transforms how developers interact with containerized applications, enabling autonomous coding workflows that seamlessly manage Docker environments with enhanced security, improved discoverability, and increased automation.As a Docker Captain, I’ve worked extensively with containerized development workflows. In this article, we’ll guide you through setting up and using the Docker MCP Toolkit with Copilot Agent Mode in VS Code, providing practical steps and examples.
What Is the Docker MCP Toolkit?
The Docker MCP Toolkit enables hosting and managing MCP servers—modular tool endpoints that run inside Docker containers. These servers expose APIs for specific development tasks, such as retrieving GitHub issue data or automating continuous integration (CI) workflows.
These tools are designed with the following goals:
- Security: Run in isolated containers with strict access controls.
- Reusability: Modular components can be reused across multiple projects.
- Discoverability: Automatically discoverable by tools like GitHub Copilot.
Each MCP server adheres to a standard request-response specification, ensuring predictable and safe interactions with AI agents.
Prerequisites
Make sure you have the following before you begin:
- Docker Desktop v4.43 (latest recommended)
- Visual Studio Code
- GitHub Copilot extension for VS Code
- GitHub Copilot with Chat and Agent Mode enabled
- GitHub Personal Access Token (optional, for GitHub-related tools)
Step-by-Step Integration Guide
1. Enable the MCP Toolkit in Docker Desktop
MCP Toolkit is now integrated with Docker Desktop. Open Docker Desktop and find it by navigating to the MCP Toolkit tab.

Figure 1: MCP Toolkit is now integrated with Docker Desktop
2. Start an MCP Server
You can launch an MCP server either from Docker Desktop’s UI or using the CLI. One common choice is the GitHub Official MCP server, which exposes tools for interacting with GitHub repositories. We will open Docker Desktop and start it from the user interface.
- Open Docker Desktop > MCP Toolkit.
- Select GitHub Official from the list.
- Configure it with your GitHub token and start the server.

Figure 2: Docker Desktop showing the configuration of the GitHub Official MCP server
3. Start the MCP Gateway
- Open Docker Desktop > MCP Toolkit (BETA).
- Within the MCP Toolkit, locate the Clients tab.
- Scroll to Other MCP Clients and copy the suggested command:
docker mcp gateway run

Figure 4: Docker Desktop showing how to enable MCP Gateway
This command initializes the gateway and makes your MCP server tools discoverable to clients like VS Code.
4. Connect MCP to Visual Studio Code
- In VS Code, open the Command Palette and press Ctrl + Shift + P (or Cmd + Shift + P on macOS)
- Select “Add MCP Server” and paste the gateway command.

Figure 5: VS Code command displaying how to add an MCP Server
- Paste the previously copied
docker mcp gateway run
command when prompted.

Figure 6: VS Code displaying the Docker MCP gateway run command
This establishes a connection between your VS Code Copilot Agent Mode and the Docker MCP Toolkit (running through Docker Desktop). Once applied to your workspace, Copilot will register approximately 30 MCP tools, all running in containers.
5. Configure and Use Copilot Agent Mode
To configure Copilot Agent Mode, we have two options available:
Option 1: Enable via Copilot Chat Panel (GUI)
- Ensure GitHub Copilot is installed and signed in.
- Open the Copilot Chat panel, either through Copilot Labs or GitHub Copilot Chat.
- Enable Agent Mode:
- Use the dropdown or toggle in the chat panel to activate Agent Mode.
- This mode allows Copilot to access external tools like those provided by the MCP Toolkit and intelligently reason over them.

Figure 7: GitHub Copilot activating Agent mode
Option 2: Enable via mcp CLI Commands (Manual Setup)
You can also configure Agent Mode by running mcp CLI commands directly in a terminal. This is useful for scripting, headless environments, or if you prefer a command-line setup.
- Run the following command to start the gateway manually:
docker mcp gateway run
This procedure will facilitate the exposure of the gateway, thereby allowing Copilot in Visual Studio Code to establish a connection.
In Visual Studio Code, access the mcp.json configuration file to add the running gateway or confirm it is set to use the same endpoint. Restart Visual Studio Code or refresh the Copilot Agent connection to apply the changes.
6. Explore and Test
Try prompts like:
– “List open issues in this GitHub repo”
– “Trigger the CI pipeline for the latest commit”
Copilot routes these tasks to the correct containerized tool and returns results automatically.

Conclusion
Integrating the Docker MCP Toolkit with Copilot Agent Mode in Visual Studio Code offers developers a scalable, modular, and secure method for automating development tasks using containerized AI tools. This workflow represents a significant advancement in creating intelligent, context-aware development environments that simplify repetitive tasks and enhance efficiency.
Learn more
- Review the official Docker MCP Toolkit Documentation
- Review the capabilities and setup for GitHub Copilot in VS Code