How to Run MCP Servers with Docker
When working with Model Context Protocol (MCP) servers, each one might require its own setup, tools, or environment. For a deeper dive into MCP server development tools, check out our detailed guide here.
For example, a GitHub Actions MCP server might require access tokens and GitHub CLI, and one MCP might require uvx
from Python while the other might require npx
from NPM to run the scripts. Managing these different setups manually can be messy, slow, and error-prone.
That’s where Docker makes things easier. It packages everything an MCP server needs into a clean, self-contained container. So you can run it without worrying about setup conflicts.
Let’s dive in and see how it works.
Read Also: 5 Powerful MCP Servers To Transform Your Development Workflow
Installation
First of all, you need to install Docker on your machine. You can find the installation instructions for your operating system on the official Docker website.
After you have it installed, launch the Docker app and you can find the MCP server catalog in the “MCP Toolkit” menu within the app. Here you can find many MCP servers that you can install and run such as DuckDuckGo, Github, and even cURL.

Select which MCP you’d like to install. In this case, I’ll install cURL and the GitHub Official MCP.
Client Configs
Docker MCP supports multiple clients including VS Code, Cursor, Claude, and LM Studio. In this example, I’ll be using LM Studio.
To add the config in LM Studio, go to Program > Install > Edit mcp.json from the right sidebar, as shown below.

Then, add the necessary configuration for the MCP server, as follows.
{ "mcpServers": { "MCP_DOCKER": { "command": "docker", "args": [ "mcp", "gateway", "run" ] } } }
Once it’s saved, the MCP server will appear in Docker’s sidebar, and you can enable it right away.

From here, we can install any MCP server directly using the Docker app, and it will instantly be available in LM Studio. For example, let’s install the official GitHub MCP server.
After adding it, just refresh the server configuration in LM Studio, and you’ll see the GitHub MCP functions such as the create_issue
, create_repository
, etc. listed and ready to use.

Running MCP Servers
Now that we have the MCP server installed, we can try to send a prompt that will trigger these MCP servers to run.
For example, here I will send a prompt: Retrieve headers from hongkiat.com/blog and determine if the page is cached
As we can see below, the MCP server will run the cURL command to retrieve the headers from the specified URL and return the result. In our case here, it can determine that the page is cached from the header x-cache
.

Similarly, we can run the GitHub official MCP server. For example, here I’d like to list all tags of one of my repositories. As we can see below it’s able to list all tags on the repository.

GitHub MCP supports many functions such as creating issues, repositories, and more. So you can easily automate many tasks using this MCP server.
Wrapping Up
MCP servers are powerful tools that can help you automate many tasks in your development workflow. With Docker, you can now run these servers without worrying about setup conflicts or dependencies.
You can just click to install the MCP server you need, and it will be ready to use in your favorite client.