DEV Community

Atsushi Suzuki
Atsushi Suzuki

Posted on

18

The Easiest Way to Set Up MCP with Claude Desktop and Docker Desktop

I'd like to share my experience setting up Model Context Protocol (MCP) integration between Claude Desktop and Docker Desktop, which turned out to be much easier than I expected. I hope this guide will be helpful, as I couldn't find similar articles. If this is already covered elsewhere, I apologize.

Since there are already many articles about MCP, I'll skip the explanation of basic terminology.

https://modelcontextprotocol.io/introduction

Preparation

Upgrade Docker Desktop to the latest version (shown in the image is 4.39.0).
Docker Desktop screenshot

Download the desktop version of Claude.

https://claude.ai/download

Setup

Install Extension in Docker Desktop

Launch Docker Desktop and select "Extensions" from the left menu.
Either type "AI Tools" in the search bar or browse the categories to find and install "Labs: AI Tools for Devs."

Extensions screenshot

Configure MCP Clients

Open the installed "Labs: AI Tools for Devs" and click on the gear icon (highlighted in the red box in the upper right corner) to access the MCP Clients settings.

AI Tools screenshot

In the settings screen, select the "MCP Clients" tab and click the "Connect" button for "Claude Desktop."

MCP Clients settings

This will automatically write the necessary settings to Claude Desktop's MCP server configuration file claude_desktop_config.json.

{
  "mcpServers": {
    "MCP_DOCKER": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "alpine/socat",
        "STDIO",
        "TCP:host.docker.internal:8811"
      ]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Restart Claude Desktop and open "Settings > Developer" tab. Confirm that the MCP server settings are correctly reflected and showing a "running" status.

Claude Desktop settings

Adding and Using Tools

Return to "Labs: AI Tools for Devs" and add the tools you want to use. For this example, I'll add Chrome tools.

Adding Chrome tools

Update Claude Desktop (refresh with CMD + R) and click on the MCP integration icon highlighted in the red box at the bottom of the screen.

Claude Desktop MCP icon

Select "Chrome web scraper" from the "Select integration service" dropdown.

Select Chrome web scraper

Let's try entering the following to get Toyota's current stock price and today's change percentage from Yahoo! Finance:

URL: https://finance.yahoo.co.jp/quote/7203.T
Extract Toyota's current stock price and today's change percentage.
Enter fullscreen mode Exit fullscreen mode

Input screenshot

When running for the first time, you'll be asked for permission to use the tool. Click "Allow."

Permission dialog

The execution results will be displayed as follows. Claude generates a response based on the information obtained from the webpage.

Result screenshot

Although they require API keys or tokens, integration with GitHub, Slack, and Notion can also be set up easily in a similar way.

If you're interested in trying MCP, please give this a try.

Side Note

I was able to configure Cursor in MCP Clients, but while it shows as "running" on the Cursor side, it doesn't show as "connected" on the Docker Desktop side, which is causing issues. I'll update this article when I find a solution.

Reference

Exploring the Docker Desktop Extension for MCP servers

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Eliminate Context Switching and Maximize Productivity

Pieces.app

Pieces Copilot is your personalized workflow assistant, working alongside your favorite apps. Ask questions about entire repositories, generate contextualized code, save and reuse useful snippets, and streamline your development process.

Learn more

👋 Kindness is contagious

If you found this article helpful, please give a ❤️ or share a friendly comment!

Got it