DEV Community

Atsushi Suzuki
Atsushi Suzuki

Posted on • Edited on

68

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

Note: This extension was recently renamed to Docker MCP Toolkit.

Image description

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

Neon image

Build better on Postgres with AI-Assisted Development Practices

Compare top AI coding tools like Cursor and Windsurf with Neon's database integration. Generate synthetic data and manage databases with natural language.

Read more →

Top comments (4)

Collapse
 
avxkim profile image
Alexander Kim

Wha'ts the benefit of using docker image here? modelcontextprotocol.io/quickstart... we can use just node

Collapse
 
suzuki0430 profile image
Atsushi Suzuki

Thanks for the comment! The main benefits are that it doesn't depend on the host environment and it simplifies the MCP Clients configuration. Of course, using Node directly is also totally fine.

Collapse
 
coastalbee profile image
Breana

I found this when researching Docker's with already having node and npm running. Maybe it helps answer your question?

"Docker simplifies the deployment and management of MCP servers, provides isolation and portability, and integrates seamlessly with Claude Desktop...

You can run both Docker and npm server configurations simultaneously. They are not mutually exclusive; instead, they can complement each other effectively. Here’s how you can manage both:

  1. Running npm Inside Docker You can run an npm server inside a Docker container. This is a common practice where you create a Docker image that includes Node.js and your application code. You can then run npm commands within that container."
Collapse
 
mr_yohokobo_6f5d902fb58 profile image
Mr. Yoho Kobo

I was 30 hours in and gave up. You are my hero. Thanks

Image of Quadratic

Python + AI + Spreadsheet

Chat with your data and get insights in seconds with the all-in-one spreadsheet that connects to your data, supports code natively, and has built-in AI.

Try Quadratic free

👋 Kindness is contagious

If this article connected with you, consider tapping ❤️ or leaving a brief comment to share your thoughts!

Okay