Running MCP Servers Locally with Docker MCP Ecosystem: Dynamic MCP + Kiro (DIY GUIDE)
Puneet Gavri
Published Mar 3, 2026
In the newsletter What MCP Is Not… And Why You Should Start MCPing! , we talked about Model Context Protocol (MCP) architecture, workflow and various use-cases.
In short MCP is an open-source standard that connects AI apps to external systems, enabling them to access data, tools, and workflows.
But the next question is: “Okay, MCP is cool, But how and where do I run these MCP servers?" . In this article we would be talking about one of the most convenient way to run the MCP servers locally.
We will explore how Docker MCP ecosystem makes MCP servers easy to discover, run, and manage locally.
The Pain: MCP Setup Struggle
MCP itself is elegant. The experience of running MCP servers locally? Not so much.
You dig through GitHub, install different runtimes, fix dependency errors, tweak config files, restart things…One server needs Node. Another needs Python. Something else needs a specific setup. And there goes your “quick experiment.”
And Then Docker's MCP Ecosystem Shows Up
Docker MCP ecosystem is made up of three pieces, each handling a different part of the MCP setup headache
MCP Catalog Think of it as a trusted app store for MCP servers. Instead of digging through random GitHub repos, you get verified, versioned Docker containers with proper metadata and security updates and ready to run.
MCP Toolkit Built into Docker Desktop, the Toolkit gives you a simple UI to browse, install, and manage MCP servers. No cloning repos. No manual config edits. Just click, install, and manage.
MCP Gateway The Gateway runs the MCP containers and exposes a single endpoint for all your AI clients. Install a server once, and it’s available everywhere - Claude Desktop, Cursor, VS Code, LM Studio, and more.
Put together, Discovery, setup, and connectivity all live in one place , so you spend less time configuring and more time actually using MCP.
What is cool about this?
- No setup chaos: MCP servers come as containers. You pick one, click install, and it runs and that too "same" on every machine.
- Security and Isolation : Most importantly each server runs in its own container, so tools don’t get free access to your machine or your secrets.
- Trusted starting point: The catalog is curated and signed, so you’re not pulling random code from the internet and hoping for the best.
Great!!! you can add mcp servers with a click. But what happens when you scale??
- When you add an MCP server, it doesn’t come with just one tool , it comes with all of its tools for example github official MCP server has 40 tools, terraform has 9 tools. Every tool definition gets loaded into the model at startup and Your context window starts filling up before real work even begins.
- Most AI models (like Claude or GPT-4) have a fixed limit on how many tools they can "see" at once (often around 128)
- Adding new servers may require config updates and restarts
Dynamic MCP solves this problem and makes the MCP simplicity work at scale!
What is Dynamic MCP?
Dynamic MCP changes the model from “load everything upfront” to load only what you need, when you need it. Instead of preloading all tools:
- The agent searches the MCP Catalog during the conversation and loads only the specific server required for the task
- It can add and configure tools live without the need to restart
- It asks for authentication only when a tool is triggered
- Compared to pre-loading all the tools, token usage is quite low.
When a client connects to the MCP Gateway, it automatically gets access to a small set of built-in management tools. These tools allow the agent to:
- mcp-find - Search for servers in the catalog
- mcp-add - Add a server to the current session
- mcp-config-set - Update a server’s settings
- mcp-remove - Remove a server
- mcp-exec - Run any available tool in the session
- code-mode - Combine multiple MCP tools into a custom JavaScript-powered tool
This capability is enabled automatically when you connect an MCP client to the toolkit. Dynamically added servers only last for the current session. When you start a new session, only the servers saved in your profile will be available.
STEP-BY-STEP Setting up Kiro with Docker MCP Toolkit
Prerequisites:
- Docker Desktop 4.42+ (Windows) or 4.40+ (macOS) installed. If not already use this link to install it Docker Desktop Installation
- Kiro IDE latest version. To install go to https://kiro.dev/download and download Kiro. Once Downloaded, authenticate using one of the method as per the documentation https://kiro.dev/docs/getting-started/authentication/
Steps:
Step 1: Enable Docker MCP Toolkit on Docker Desktop
Open Docker Desktop and enable the MCP Toolkit from the Settings menu.
you should see MCP Toolkit in the left panel. You can see Catalog of curated MCP servers to choose from(as on date 311 and it keeps growing). My Servers tab shows the installed servers. Clients tab shows the list of clients that you can use to connect with the MCP servers. OAuth tab for authentication to MCP servers with existing credentials.
STEP 2: Connect Kiro as client
On your docker desktop MCP toolkit go to Clients tab and click on connect button left to Kiro . Here you can see various other clients available as well like cursor, Codex, Gemini cli , etc.
STEP 3: Restart Kiro and enable mcp agent
Go to Kiro settings
in the search search for "mcp" and Kiro Agent: Configure MCP parameter set it to enable (in case if if it is disabled).
STEP 4: Verify
click on the Kiro icon as below, you would see MCP_DOCKER exposing the tools that we discussed above.
or you can also open the Command Palette (Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS)) and find "Kiro: Open MCP Config" too view the mcp.json where the mcp servers are configured.
in mcp.josn you should see "MCP_DOCKER":{"command":"docker","args":["mcp","gateway","run"]}
what this does is: When Kiro needs to access MCP tools, it executes "docker mcp gateway run", which starts the Docker MCP Gateway which connects Kiro to appropriate mcp server running inside isolated containers. In short, it’s the link that lets Kiro safely use containerised tools via Docker.
If you open the terminal and check the OUTPUT logs:
You would see internal tools (like mcp-find, mcp-add, mcp-remove, mcp-exec etc) getting enabled, which means that the gateway is ready to manage and run MCP servers on the fly.
That's all!! Now you are good to start
STEP 5: Vibe!!
To test the setup, let me give a prompt on Kiro chat to create terraform code for any aws resource and the github action workflow:
PROMPT: "Use the terraform mcp, aws documentation mcp and github mcp to generate production-ready, modular Terraform code for a secure multi-AZ AWS ECS Fargate cluster following AWS Well-Architected security best practices, and also create a GitHub Actions workflow that performs IaC security scanning, Terraform validation, and plan checks before deployment. "
you would see Kiro isn’t just answering. It’s dynamically discovering tools, attaching them to the session, and then using them to fetch accurate AWS documentation before generating your Terraform code.
And (Optionally) if you really want to notice that these mcp servers are running in a container in your local machine....you can!
If you ask Kiro what tools it has or just type /tools , you’ll notice it’s not a massive list. Only the tools needed for that specific task are active. If you check Currently Active MCP Tools (via Docker), you’ll see just those dynamically added servers sitting there. Nothing extra.
It keeps things clean. Only what’s needed, nothing more.
Setting up other Clients with Docker MCP toolkit
The way we have set up Kiro to run MCP servers locally using Docker MCP toolkit, similar process can be followed for various other clients like Claude Code, Claude Desktop, Gemini CLI, Cursor etc.
Conclusion
Running MCP locally doesn’t have to be messy. In this article, we saw how the Docker MCP ecosystem simplifies setup, how Dynamic MCP keeps things scalable, and how easy it is to wire everything up with Kiro. Now it’s just about installing what you need, connecting your client, and building cool stuff.
Top comments (3)
Great guide on Docker MCP setup! One thing that compounds the value of running MCP locally is pairing it with a prompt structuring layer.
If you use Claude Code with MCP, there's a neat trick: add flompt as an MCP server alongside your other tools:
Then your agents can call
decompose_prompt()andcompile_prompt()natively before dispatching to other MCP tools. Essentially a prompt engineering step baked into the agentic pipeline. No API key needed, it's free and open-source.Great guide on the MCP ecosystem! Docker + dynamic MCP loading is a nice pattern for keeping server configs portable across machines.
One MCP server worth adding to your setup: flompt (
claude mcp add flompt https://flompt.dev/mcp/). It exposes three tools —list_block_types,decompose_prompt, andcompile_prompt— so your Claude Code agents can build and structure prompts natively in agentic workflows. No Docker needed, it's a remote HTTP MCP server. Free, open-source, no account.Useful when you're chaining multiple MCP tools and want the prompts driving each step to be properly structured rather than ad-hoc strings.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.