-
Notifications
You must be signed in to change notification settings - Fork 8.1k
guides: add claude-code-mcp user guide #23733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
guides: add claude-code-mcp user guide #23733
Conversation
❌ Deploy Preview for docsdocker failed. Why did it fail? →
|
dvdksn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this works well as a guide in docker docs. I appreciate that it could be useful to show a practical/concrete use case for MCP toolkit with real-world tools and applications. But this guide currently reads a lot more like a blog post than a helpful tutorial. And the demonstrated use case is not very easy to follow - it requires either creating or having already set up a Jira project. I'd recommend a use case that's more approachable.
|
@dvdksn Claude Code + Docker MCP Toolkit + Docker Hub MCP server to search images and generate a docker-compose.yml |
|
@karanveersingh5623 yes that sounds better! |
|
@dvdksn |
dvdksn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @karanveersingh5623, this looks much better to me, thanks! Left some comments. Additionally:
- Can you please change the
bashcode blocks toconsole(including a prompt character) - this is a convention we use. Sorry if that wasn't clearly documented, I'll review that. - Please keep screenshots to a minimum. I realize they're sometimes useful to help bridge the connection between a written guide and a UI but they are also prone to going out of date and being hard to parse generally. So let's remove as many as we can please. And for the ones we need to keep: please compress them. Either to a smaller png or to webp/avif (https://squoosh.app/ is great for this)
| 2. Select **MCP Toolkit** | ||
| 3. Go to the **Catalog** tab | ||
| 4. Search for **Docker Hub** | ||
| 5. Click the **Docker Hub MCP server** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 5. Click the **Docker Hub MCP server** | |
| 5. Select the **Docker Hub** MCP server |
| 3. Go to the **Catalog** tab | ||
| 4. Search for **Docker Hub** | ||
| 5. Click the **Docker Hub MCP server** | ||
| 6. Select **+ Add** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 6. Select **+ Add** | |
| 6. Add the MCP server, then open the **Configuration** tab | |
| 7. Enter your Docker Hub username | |
| 8. [Create a read-only personal access token](/security/access-tokens/#create-a-personal-access-token) and enter your access token under **Secrets** | |
| 9. Save the configuration |
| # Install Claude Code | ||
| curl -fsSL https://claude.ai/install.sh | sh | ||
| - Docker Desktop installed | ||
| - Docker Desktop updated with MCP Toolkit support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to MCP toolkit setup as a prerequisite and remove it from the guide steps: https://docs.docker.com/ai/mcp-catalog-and-toolkit/get-started/#setup
|
|
||
| ### Option A: OAuth Authentication (recommended) | ||
| ```bash | ||
| claude code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| claude code | |
| claude |
| - `jira_create_issue` | ||
| - `jira_add_comment` | ||
| - `jira_batch_create_issues` | ||
| Verify the connection: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already verify the connection later with the /mcp command so no need for this here
| Choose stable, commonly used tags such as the Node LTS version and a recent major Postgres version. | ||
| Alternatively, you can set the token from the CLI: | ||
| Generate a docker-compose.yml with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Generate a docker-compose.yml with: | |
| Generate a compose.yaml file with: |
| Include: | ||
| - Environment variables for Postgres | ||
| - A shared bridge network | ||
| - Healthchecks where appropriate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a good addition. Since we're anyway using the hub mcp server, claude can look up the specific digest and include it in the compose file.
| - Healthchecks where appropriate | |
| - Healthchecks where appropriate | |
| - Pin the image version using the tag + index digest |
| --- | ||
|
|
||
| **Important:** Only grant access to directories you are comfortable with Claude Code reading. The Filesystem MCP server is restricted to these paths for safety. | ||
| ## 8. Save the generated docker-compose.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this - claude will most likely create a file anyway, especially if specified in the prompt.
| ``` | ||
|
|
||
| 1. Clone the repository: | ||
| Verify it: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again verifying with cat is superfluous since claude code will present the file before saving it.
| Alternatively, you can set the token from the CLI: | ||
| Generate a docker-compose.yml with: | ||
| - app: running on port 3000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're expecting claude code to bind mount a directory into the app container. There is no guarantee that it would do that without a prompt. Especially when there isn't yet an app directory with source code. I think this instruction would benefit from:
- Creating the node.js app before initializing the compose file, ensuring claude code can see the app code in the workspace
- Prompting claude to ensure that the
appcompose service actually bind mounts the app directory and invokes the appropriate CMD.
Description
This PR adds a new guide under content/guides/genai-claude-code-mcp/ titled “How to Add MCP Servers to Claude Code with Docker MCP Toolkit.”
The guide walks users through connecting Claude Code to the Docker MCP Toolkit and demonstrates a complete real-world automation workflow powered by MCP servers. It follows the Docker documentation style and includes:
Setup and connection of Claude Code to the Docker MCP Gateway
Configuration of Atlassian (Jira), GitHub, and Filesystem MCP servers
Automatic credential handling via Docker Desktop
A full end-to-end demo converting TODO comments into Jira tasks using:
Filesystem MCP (code scanning)
GitHub MCP (git blame + author extraction)
Atlassian MCP (issue creation)
All accompanying screenshots under the Images/ directory
Markdown structured according to the existing style in the Docker docs guides
This guide expands the Generative AI section and provides developers with a practical reference on using Claude Code with the growing ecosystem of MCP servers.
Related issues or tickets
NA
Reviews
Notes for reviewers:
The guide follows the exact structure of other GenAI guides.
Images are optimized and placed in content/guides/genai-claude-code-mcp/Images/.
The tutorial has been tested end-to-end with latest Docker Desktop MCP Toolkit
No changes made to existing guides or layouts.
Technical review
Editorial review
Product review