### Initialize Node.js Project Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/e2b-sandboxes Sets up a new directory and initializes a Node.js project. This is the first step before installing dependencies. ```bash mkdir mcp-e2b-quickstart cd mcp-e2b-quickstart npm init -y ``` -------------------------------- ### Install E2B and Dotenv Dependencies Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/e2b-sandboxes Installs the necessary Node.js packages, e2b for sandbox interaction and dotenv for managing environment variables. ```bash npm install e2b dotenv ``` -------------------------------- ### Example Client Configuration for MCP Gateway Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/get-started This JSON configuration shows how to set up a client to connect to the MCP Toolkit gateway. It specifies the command to run and the profile to use. ```json { "servers": { "MCP_DOCKER": { "command": "docker", "args": ["mcp", "gateway", "run", "--profile", "my_profile"], "type": "stdio" } } } ``` -------------------------------- ### Run example workflow in Python Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/e2b-sandboxes This Python code snippet demonstrates how to create an E2B sandbox, configure MCP tools for Notion and GitHub, and run a prompt to search Notion and create a GitHub issue. Ensure to replace `owner/repo` with your actual GitHub username and repository name. ```python import os import asyncio import shlex from dotenv import load_dotenv from e2b import Sandbox load_dotenv() async def example_workflow(): print("Creating sandbox...\n") sbx = await Sandbox.beta_create( envs={ "ANTHROPIC_API_KEY": os.getenv("ANTHROPIC_API_KEY"), }, mcp={ "notion": { "internalIntegrationToken": os.getenv("NOTION_INTEGRATION_TOKEN"), }, "githubOfficial": { "githubPersonalAccessToken": os.getenv("GITHUB_TOKEN"), }, }, ) mcp_url = sbx.beta_get_mcp_url() mcp_token = await sbx.beta_get_mcp_token() print("Sandbox created successfully\n") # Wait for MCP servers to initialize await asyncio.sleep(3) print("Connecting Claude to MCP gateway...\n") def on_stdout(output): print(output, end='') def on_stderr(output): print(output, end='') await sbx.commands.run( f'claude mcp add --transport http e2b-mcp-gateway {mcp_url} --header "Authorization: Bearer {mcp_token}"', timeout_ms=0, on_stdout=on_stdout, on_stderr=on_stderr ) print("\nRunning example: Search Notion and create GitHub issue...\n") prompt = """Using Notion and GitHub MCP tools: 1. Search my Notion workspace for databases 2. Create a test issue in owner/repo titled "MCP Toolkit Test" with description "Testing E2B + Docker MCP integration" 3. Confirm both operations completed successfully""" # Escape single quotes for shell escaped_prompt = prompt.replace("'", "'\\''") await sbx.commands.run( f"echo '{escaped_prompt}' | claude -p --dangerously-skip-permissions", timeout_ms=0, on_stdout=on_stdout, on_stderr=on_stderr ) await sbx.kill() if __name__ == "__main__": try: asyncio.run(example_workflow()) except Exception as e: print(f"Error: {e}") ``` -------------------------------- ### Test MCP Server Connection with a Prompt Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/get-started Submit a prompt using the 'claude' command to test the connection to your installed MCP servers. This example invokes the GitHub MCP server. ```console $ claude "Use the GitHub MCP server to show me my open pull requests" ``` -------------------------------- ### Run example workflow in TypeScript Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/e2b-sandboxes This TypeScript code snippet demonstrates how to create an E2B sandbox, configure MCP tools for Notion and GitHub, and run a prompt to search Notion and create a GitHub issue. Ensure to replace `owner/repo` with your actual GitHub username and repository name. ```typescript import "dotenv/config"; import { Sandbox } from "e2b"; async function exampleWorkflow(): Promise { console.log("Creating sandbox...\n"); const sbx: Sandbox = await Sandbox.create({ envs: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY as string, }, mcp: { notion: { internalIntegrationToken: process.env .NOTION_INTEGRATION_TOKEN as string, }, githubOfficial: { githubPersonalAccessToken: process.env.GITHUB_TOKEN as string, }, }, }); const mcpUrl = sbx.getMcpUrl(); const mcpToken = await sbx.getMcpToken(); console.log("Sandbox created successfully\n"); // Wait for MCP servers to initialize await new Promise((resolve) => setTimeout(resolve, 3000)); console.log("Connecting Claude to MCP gateway...\n"); await sbx.commands.run( `claude mcp add --transport http e2b-mcp-gateway ${mcpUrl} --header "Authorization: Bearer ${mcpToken}"`, { timeoutMs: 0, onStdout: console.log, onStderr: console.log, }, ); console.log("\nRunning example: Search Notion and create GitHub issue...\n"); const prompt: string = `Using Notion and GitHub MCP tools: 1. Search my Notion workspace for databases 2. Create a test issue in owner/repo titled "MCP Toolkit Test" with description "Testing E2B + Docker MCP integration" 3. Confirm both operations completed successfully`; await sbx.commands.run( `echo '${prompt.replace(/'/g, "'\\''")}' | claude -p --dangerously-skip-permissions`, { timeoutMs: 0, onStdout: console.log, onStderr: console.log, }, ); await sbx.kill(); } exampleWorkflow().catch(console.error); ``` -------------------------------- ### Execute Python workflow script Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/e2b-sandboxes Command to run the Python example workflow. ```bash $ python workflow.py ``` -------------------------------- ### Execute TypeScript workflow script Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/e2b-sandboxes Command to run the TypeScript example workflow using `tsx`. ```bash $ npx tsx index.ts ``` -------------------------------- ### Configure MCP Toolkit in OpenCode Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/get-started The OpenCode configuration file (`~/.config/opencode/opencode.json`) specifies the MCP Toolkit setup. Ensure `MCP_DOCKER` is configured with `type: local` and `enabled: true`. ```json { "mcp": { "MCP_DOCKER": { "type": "local", "command": ["docker", "mcp", "gateway", "run"], "enabled": true } }, "$schema": "https://opencode.ai/config.json" } ``` ```console $ opencode "Use the GitHub MCP server to show me my open pull requests" ``` -------------------------------- ### Get Specific Tag Details Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Retrieve detailed information about a particular tag within a repository. Replace '' and '' accordingly. ```bash $ docker ai "Show me details about the '' tag in the '' repository" ``` -------------------------------- ### Test MCP Server Connection with Claude Desktop Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/get-started Submit a prompt to Claude Desktop to test the connection with an installed MCP server. Ensure the MCP_DOCKER server is listed and enabled in the Search and tools menu. ```plaintext Use the GitHub MCP server to show me my open pull requests ``` -------------------------------- ### Get Docker Hub Repository Details Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Retrieve detailed information about a specific repository in your Docker Hub account. Replace '' with the actual repository name. ```bash $ docker ai "Show me information about my '' repository" ``` -------------------------------- ### Add .env and node_modules to .gitignore Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/e2b-sandboxes Configures the .gitignore file to prevent sensitive credentials and installed modules from being committed to version control. ```bash echo ".env" >> .gitignore echo "node_modules/" >> .gitignore ``` -------------------------------- ### Add MCP Server to Session Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/dynamic-mcp Use the `mcp-add` tool to add a specified MCP server to the current session. The MCP Toolkit handles the installation and running of the server automatically. ```plaintext Add the postgres mcp server ``` -------------------------------- ### Convert Dockerfile to Use Hardened Image Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Get assistance in updating your Dockerfile to utilize a Docker hardened image, improving security. This feature may require a subscription. ```bash $ docker ai "Can you help me update my Dockerfile to use a docker hardened image instead of the current one" ``` -------------------------------- ### Create Catalog from Scratch Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Create a new catalog from scratch, specifying the desired servers to include from various sources. ```bash $ docker mcp catalog create registry.example.com/mcp/data-tools:latest \ --title "Data Analysis Tools" \ --server catalog://mcp/docker-mcp-catalog/sequentialthinking \ --server catalog://mcp/docker-mcp-catalog/brave \ --server docker://registry.example.com/mcp/analytics:latest ``` -------------------------------- ### Display MCP Gateway help Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/mcp-gateway Run this command to display the help information for the MCP Gateway CLI. ```bash docker mcp --help ``` -------------------------------- ### Connect a Named Client to a Profile Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Connect a supported client to a specific profile. This creates a configuration file in the current directory. ```bash $ docker mcp client connect --profile ``` ```bash $ docker mcp client connect vscode --profile my-project ``` -------------------------------- ### Tag and Customize Docker Catalog Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Use the Docker catalog as a base, tag it with a new reference, and then add or remove servers. ```bash $ docker mcp catalog tag mcp/docker-mcp-catalog \ registry.example.com/mcp/company-tools:latest ``` -------------------------------- ### Create E2B Sandbox with Notion and GitHub MCP Servers (Python) Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/e2b-sandboxes This Python script demonstrates how to initialize an E2B sandbox with MCP servers for Notion and GitHub. It requires environment variables for API keys and tokens. The script connects Claude to the MCP gateway after sandbox creation. ```python import os import asyncio from dotenv import load_dotenv from e2b import Sandbox load_dotenv() async def quickstart(): print("Creating E2B sandbox with Notion and GitHub MCP servers...\n") sbx = await Sandbox.beta_create( envs={ "ANTHROPIC_API_KEY": os.getenv("ANTHROPIC_API_KEY"), }, mcp={ "notion": { "internalIntegrationToken": os.getenv("NOTION_INTEGRATION_TOKEN"), }, "githubOfficial": { "githubPersonalAccessToken": os.getenv("GITHUB_TOKEN"), }, }, ) mcp_url = sbx.beta_get_mcp_url() mcp_token = await sbx.beta_get_mcp_token() print("Sandbox created successfully!") print(f"MCP Gateway URL: {mcp_url}\n") # Wait for MCP initialization await asyncio.sleep(1) # Connect Claude to MCP gateway print("Connecting Claude to MCP gateway...") def on_stdout(output): print(output, end='') def on_stderr(output): print(output, end='') await sbx.commands.run( f'claude mcp add --transport http e2b-mcp-gateway {mcp_url} --header "Authorization: Bearer {mcp_token}"", timeout_ms=0, on_stdout=on_stdout, on_stderr=on_stderr ) print("\nConnection successful! Cleaning up...") await sbx.kill() if __name__ == "__main__": try: asyncio.run(quickstart()) except Exception as e: print(f"Error: {e}") ``` ```bash $ python index.py ``` -------------------------------- ### List Servers in a Catalog Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli List all servers contained within a specified catalog OCI reference. ```bash $ docker mcp catalog server ls registry.example.com/mcp/company-tools:latest ``` -------------------------------- ### Browse the catalog Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Lists available servers and their IDs from a specified catalog. ```bash $ docker mcp catalog server ls mcp/docker-mcp-catalog ``` -------------------------------- ### Create .env File for Credentials Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/e2b-sandboxes Creates a .env file to store sensitive API keys and tokens. Ensure these are kept secure and not committed to version control. ```bash cat > .env << 'EOF' E2B_API_KEY=your_e2b_api_key_here ANTHROPIC_API_KEY=your_anthropic_api_key_here NOTION_INTEGRATION_TOKEN=ntn_your_notion_integration_token_here GITHUB_TOKEN=ghp_your_github_pat_here EOF ``` -------------------------------- ### Push Catalog to Distribute Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Push a catalog to an OCI registry to make it available for distribution to team members. ```bash $ docker mcp catalog push ``` -------------------------------- ### Connect VSCode MCP Client to Project Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/toolkit Run this command in your terminal to create a .vscode/mcp.json file in your project directory, connecting VSCode to your MCP profile. Remember to add this file to your .gitignore. ```bash docker mcp client connect vscode --profile my_profile ``` ```console echo ".vscode/mcp.json" >> .gitignore ``` -------------------------------- ### List All Tags for a Repository Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Display all available tags for a given repository on Docker Hub. Replace '' with the target repository. ```bash $ docker ai "Show me all tags for my '' repository" ``` -------------------------------- ### Show Catalog Details Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Display the contents and configuration of a specified catalog. ```bash $ docker mcp catalog show registry.example.com/mcp/data-tools:latest ``` -------------------------------- ### Create a Docker Hub Repository Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Use this command to create a new repository in your Docker Hub namespace. Ensure you have the necessary permissions. ```bash $ docker ai "Create a repository in my namespace" ``` -------------------------------- ### Configure Docker Hub MCP Server for Claude Desktop (Public Repos) Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Add this configuration to your `claude_desktop_config.json` for public repository access. Ensure the path to the server executable is correct. ```json { "mcpServers": { "docker-hub": { "command": "node", "args": ["/FULL/PATH/TO/YOUR/docker-hub-mcp-server/dist/index.js", "--transport=stdio"] } } } ``` -------------------------------- ### Import Profile from Version Control Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Import a profile from a JSON file that has been stored in version control. ```bash $ docker mcp profile import .docker/mcp-profile.json ``` -------------------------------- ### Add Private Servers to Catalog Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Add your own private servers, packaged as Docker images, to a catalog. ```bash $ docker mcp catalog server add registry.example.com/mcp/company-tools:latest \ --server docker://registry.example.com/mcp/internal-api:latest \ --server docker://registry.example.com/mcp/data-pipeline:latest ``` -------------------------------- ### Configure Docker Hub MCP Server for Claude Desktop (Authenticated) Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Add this configuration to your `claude_desktop_config.json` for authenticated access. Provide your Docker Hub username and personal access token (PAT). ```json { "mcpServers": { "docker-hub": { "command": "node", "args": ["/FULL/PATH/TO/YOUR/docker-hub-mcp-server/dist/index.js", "--transport=stdio", "--username=YOUR_DOCKER_HUB_USERNAME"], "env": { "HUB_PAT_TOKEN": "YOUR_DOCKER_HUB_PERSONAL_ACCESS_TOKEN" } } } } ``` -------------------------------- ### Catalog and Server Management Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Commands for browsing the catalog, adding, listing, removing, and configuring servers within profiles. ```APIDOC ## Browse the catalog ### Description Lists available servers from a specified catalog. ### Command `docker mcp catalog server ls ` ### Parameters * **** (string) - Required - The reference to the catalog (e.g., `mcp/docker-mcp-catalog`). ``` ```APIDOC ## Add servers to a profile ### Description Adds one or more servers to an MCP profile. Servers can be referenced from catalogs, Docker images, community registries, or local files. ### Command `docker mcp profile server add --server ` ### Parameters * **** (string) - Required - The ID of the profile to add servers to. * **--server** (string) - Required - The URI of the server to add. Supported formats include `catalog:///`, `docker://:`, `https:///v0/servers/`, and `file://`. ``` ```APIDOC ## List servers ### Description Lists servers associated with MCP profiles. Can list all servers or filter by profile. ### Command `docker mcp profile server ls [--filter profile=]` ### Parameters * **--filter profile** (string) - Optional - Filters the list to show servers only for the specified profile. ``` ```APIDOC ## Remove a server ### Description Removes one or more servers from an MCP profile. ### Command `docker mcp profile server remove --name ` ### Parameters * **** (string) - Required - The ID of the profile from which to remove servers. * **--name** (string) - Required - The name of the server to remove. Can be specified multiple times to remove multiple servers. ``` ```APIDOC ## Configure server settings ### Description Manages configuration settings for servers within a profile, allowing setting, getting, and deleting key-value pairs. ### Command `docker mcp profile config --set .=` `docker mcp profile config --get-all` `docker mcp profile config --del .` ### Parameters * **** (string) - Required - The ID of the profile containing the server. * **--set** (string) - Sets a configuration key-value pair for a server. Format: `.=`. * **--get-all** - Retrieves all configuration settings for all servers in the profile. * **--del** (string) - Deletes a specific configuration key for a server. Format: `.`. ``` -------------------------------- ### List Docker Hub Repositories Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp List all repositories within your Docker Hub namespace. This helps in managing your stored images. ```bash $ docker ai "List all repositories in my namespace" ``` -------------------------------- ### Run Gateway with Custom Catalog Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Run the MCP gateway using a specified custom catalog instead of the default Docker catalog. ```bash $ docker mcp gateway run --catalog ``` -------------------------------- ### Configure server settings Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Sets, retrieves, or deletes configuration values for servers within a profile. Server-specific keys and values are defined by each server's documentation. ```bash $ docker mcp profile config --set .= ``` ```bash $ docker mcp profile config --get-all ``` ```bash $ docker mcp profile config --del . ``` -------------------------------- ### List profiles Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Lists all existing MCP profiles. ```bash $ docker mcp profile list ``` -------------------------------- ### Connect client manually (Claude Desktop config) Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Configures Claude Desktop to connect to the MCP Gateway over stdio. This format is specific to Claude Desktop's configuration. ```json { "mcpServers": { "MCP_DOCKER": { "command": "docker", "args": ["mcp", "gateway", "run", "--profile", "web-dev"] } } } ``` -------------------------------- ### List servers in a profile Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Lists all servers across all profiles or filters servers by a specific profile. ```bash $ docker mcp profile server ls ``` ```bash $ docker mcp profile server ls --filter profile=web-dev ``` -------------------------------- ### Push Profile to OCI Registry Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Share a local profile as an OCI artifact to a compatible registry. Authentication credentials are not included. ```bash $ docker mcp profile push web-dev registry.example.com/profiles/web-dev:v1 ``` -------------------------------- ### Create E2B Sandbox with Notion and GitHub MCP Servers (TypeScript) Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/e2b-sandboxes Use this TypeScript code to create an E2B sandbox with pre-configured MCP servers for Notion and GitHub. Ensure you have the necessary API keys and tokens set up in your environment variables. ```typescript import "dotenv/config"; import { Sandbox } from "e2b"; async function quickstart(): Promise { console.log("Creating E2B sandbox with Notion and GitHub MCP servers...\n"); const sbx: Sandbox = await Sandbox.create({ envs: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY as string, }, mcp: { notion: { internalIntegrationToken: process.env .NOTION_INTEGRATION_TOKEN as string, }, githubOfficial: { githubPersonalAccessToken: process.env.GITHUB_TOKEN as string, }, }, }); const mcpUrl = sbx.getMcpUrl(); const mcpToken = await sbx.getMcpToken(); console.log("Sandbox created successfully!"); console.log(`MCP Gateway URL: ${mcpUrl}\n`); // Wait for MCP initialization await new Promise((resolve) => setTimeout(resolve, 1000)); // Connect Claude to MCP gateway console.log("Connecting Claude to MCP gateway..."); await sbx.commands.run( `claude mcp add --transport http e2b-mcp-gateway ${mcpUrl} --header "Authorization: Bearer ${mcpToken}"`, { timeoutMs: 0, onStdout: console.log, onStderr: console.log, }, ); console.log("\nConnection successful! Cleaning up..."); await sbx.kill(); } quickstart().catch(console.error); ``` ```bash $ npx tsx index.ts ``` -------------------------------- ### List MCP Servers with Gemini Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/get-started Run `gemini mcp list` to view active MCP servers. The MCP_DOCKER server should be listed as 'Connected'. ```console $ gemini mcp list Configured MCP servers: ✓ MCP_DOCKER: docker mcp gateway run (stdio) - Connected ``` ```console $ gemini "Use the GitHub MCP server to show me my open pull requests" ``` -------------------------------- ### List Tags with Architecture Filtering Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Filter and list tags for a repository based on specific architecture support, such as amd64. Replace '' with the repository name. ```bash $ docker ai "List tags for in the '' repository that support amd64 architecture" ``` -------------------------------- ### Connect client manually (JSON config) Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Configures a client to run the MCP Gateway over stdio using a JSON configuration. This is useful for clients not listed in Docker Desktop. ```json { "servers": { "MCP_DOCKER": { "command": "docker", "args": ["mcp", "gateway", "run", "--profile", "web-dev"], "type": "stdio" } } } ``` -------------------------------- ### Run Gateway with Custom Catalog and Specific Servers Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Run the MCP gateway with a custom catalog, enabling only specific servers from that catalog. ```bash $ docker mcp gateway run --catalog \ --servers --servers ``` -------------------------------- ### Pull a Custom Catalog using CLI Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/catalog Import a custom MCP catalog into your local environment using its OCI registry reference via the command line. ```bash $ docker mcp catalog pull ``` -------------------------------- ### Make MCP Gateway binary executable Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/mcp-gateway Before using the MCP Gateway binary, ensure it has execute permissions. This command is for Linux and macOS. ```bash $chmod +x ~/.docker/cli-plugins/docker-mcp ``` -------------------------------- ### List Available Docker Hardened Images Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Query for the most secure image options available for running specific applications, like Node.js. This requires a subscription. ```bash $ docker ai "What is the most secure image I can use to run a node.js application?" ``` -------------------------------- ### Configure Docker Hub MCP Server for VS Code (Authenticated) Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Add this configuration to your User Settings (JSON) in Visual Studio Code for authenticated access. Provide your Docker Hub username and personal access token (PAT). ```json { "mcpServers": { "docker-hub": { "command": "node", "args": ["/FULL/PATH/TO/YOUR/docker-hub-mcp-server/dist/index.js", "--transport=stdio"], "env": { "HUB_USERNAME": "YOUR_DOCKER_HUB_USERNAME", "HUB_PAT_TOKEN": "YOUR_DOCKER_HUB_PERSONAL_ACCESS_TOKEN" } } } } ``` -------------------------------- ### View MCP Servers in Continue Terminal UI Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/get-started Launch the Continue terminal UI with `cn` and use the `/mcp` command to view active MCP servers. The MCP_DOCKER server should appear with a 'connected' status. ```plaintext MCP Servers ➤ đŸŸĸ MCP_DOCKER (🔧75 📝3) 🔄 Restart all servers âšī¸ Stop all servers 🔍 Explore MCP Servers Back ↑/↓ to navigate, Enter to select, Esc to go back ``` ```console $ cn "Use the GitHub MCP server to show me my open pull requests" ``` -------------------------------- ### List MCP Servers with Codex Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/get-started Use the `codex mcp list` command to view active MCP servers and their statuses. The MCP_DOCKER server should be listed as enabled. ```console $ codex mcp list Name Command Args Env Cwd Status Auth MCP_DOCKER docker mcp gateway run - - enabled Unsupported ``` ```console $ codex "Use the GitHub MCP server to show me my open pull requests" ``` -------------------------------- ### Push Customized Catalog Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Push the modified catalog to an OCI registry after making changes. ```bash $ docker mcp catalog push registry.example.com/mcp/company-tools:latest ``` -------------------------------- ### Query Docker Hub Repositories with Gordon Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Use Gordon client to ask for repositories in your Docker Hub namespace. Ensure Gordon is connected to the Docker Hub MCP server. ```text What repositories are in my namespace? ``` -------------------------------- ### Run MCP Gateway with a Specific Profile Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/profiles Use the `--profile` flag to specify which profile the MCP Gateway should use when running. This is useful for isolating server configurations for different tasks. ```bash $ docker mcp gateway run --profile web-dev ``` -------------------------------- ### Run MCP Gateway from CLI Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/get-started Use this command to run the MCP gateway with your profile from the terminal. Configure your client to run this command. ```plaintext docker mcp gateway run --profile my_profile ``` -------------------------------- ### Push Image to Docker Hub Repository Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Push a local image to your specified Docker Hub repository. Replace '' and '' with your actual image and repository names. ```bash $ docker ai "Push my to my repository" ``` -------------------------------- ### Create a profile Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Creates a new MCP profile. The profile ID is used to reference the profile in subsequent commands. ```bash $ docker mcp profile create --name ``` ```bash $ docker mcp profile create --name web-dev ``` -------------------------------- ### View a profile Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Displays the details of a specific MCP profile. ```bash $ docker mcp profile show ``` -------------------------------- ### Configure VSCode MCP Client Globally Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/toolkit Insert this JSON configuration into your VSCode User mcp.json to enable MCP Toolkit integration globally. This sets up a Docker MCP gateway for a specified profile. ```json { "mcp": { "servers": { "MCP_DOCKER": { "command": "docker", "args": [ "mcp", "gateway", "run", "--profile", "my_profile" ], "type": "stdio" } } } } ``` -------------------------------- ### Check MCP Extension Status with Goose CLI Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/get-started Run `goose info -v` to check the status of the `mcpdocker` extension. The status should show `enabled: true`. ```console $ goose info -v â€Ļ mcpdocker: args: - mcp - gateway - run available_tools: [] bundled: null cmd: docker description: The Docker MCP Toolkit allows for easy configuration and consumption of MCP servers from the Docker MCP Catalog enabled: true env_keys: [] envs: {} name: mcpdocker timeout: 300 type: stdio ``` ```plaintext Use the GitHub MCP server to show me my open pull requests ``` -------------------------------- ### Check if a Specific Tag Exists Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Verify the existence of a specific tag for a given repository. Replace '' with the repository name and 'v1.2.0' with the tag. ```bash $ docker ai "Check if version 'v1.2.0' exists for my 'my-web-app' repository" ``` -------------------------------- ### Find Active Docker Hub Repositories Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Show your most recently updated repositories to identify active projects. ```bash $ docker ai "Show me my most recently updated repositories" ``` -------------------------------- ### Run MCP Gateway Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Runs the MCP Gateway with a specified profile or the default profile if none is provided. ```bash $ docker mcp gateway run --profile ``` -------------------------------- ### Verify MCP Gateway Signatures Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/faqs Use this command to verify attestations when using MCP images with the Docker MCP gateway. Ensure the gateway is properly configured. ```bash docker mcp gateway run --verify-signatures ``` -------------------------------- ### Search Official Docker Hub Images Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Use this command to search for official images on Docker Hub. Specify keywords to find relevant images. ```bash $ docker ai "Search for official nginx images on Docker Hub" ``` ```bash $ docker ai "Search for minimal Node.js images with small footprint" ``` ```bash $ docker ai "Show me the latest tag details for go" ``` ```bash $ docker ai "Search for production ready database images" ``` ```bash $ docker ai "Help me find the right Ubuntu version for my project" ``` -------------------------------- ### Enable Dynamic MCP Tools Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/dynamic-mcp Use this command to re-enable the dynamic tools feature after it has been disabled. ```console $ docker mcp feature enable dynamic-tools ``` -------------------------------- ### Verify MCP Server Connection Status Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/get-started Run this command in your project directory to check if the MCP_DOCKER server is connected. The output should indicate a 'Connected' status. ```console $ claude mcp list Checking MCP server health... MCP_DOCKER: docker mcp gateway run - ✓ Connected ``` -------------------------------- ### Profile Management Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Commands for managing MCP profiles, including creation, listing, viewing, and removal. ```APIDOC ## Create a profile ### Description Creates a new MCP profile with a specified ID. ### Command `docker mcp profile create --name ` ### Parameters * **--name** (string) - Required - The unique identifier for the profile. ``` ```APIDOC ## List profiles ### Description Lists all available MCP profiles. ### Command `docker mcp profile list` ``` ```APIDOC ## View a profile ### Description Displays the details of a specific MCP profile. ### Command `docker mcp profile show ` ### Parameters * **** (string) - Required - The ID of the profile to view. ``` ```APIDOC ## Remove a profile ### Description Removes an MCP profile and all its associated server configurations. This action is irreversible. ### Command `docker mcp profile remove ` ### Parameters * **** (string) - Required - The ID of the profile to remove. ``` -------------------------------- ### Manage MCP Server Credentials Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/faqs CLI commands for managing credentials stored within the Docker Desktop VM for MCP servers. Credentials are not removed upon server uninstallation. ```bash docker mcp secret ls ``` ```bash docker mcp secret rm ``` ```bash docker mcp oauth revoke ``` -------------------------------- ### Configure AI Client for Specific Profile Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/profiles Specify which profile an AI client should use by configuring the MCP Gateway command arguments. This allows different clients to connect to different profiles. ```json { "mcpServers": { "MCP_DOCKER": { "command": "docker", "args": ["mcp", "gateway", "run", "--profile", "claude-work"] } } } ``` ```json { "mcp": { "servers": { "MCP_DOCKER": { "command": "docker", "args": ["mcp", "gateway", "run", "--profile", "vscode-dev"], "type": "stdio" } } } } ``` -------------------------------- ### Add servers to a profile Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Adds servers to an MCP profile using various URI formats. Servers can be referenced from OCI catalogs, Docker images, community registries, or local files. ```bash $ docker mcp profile server add \ --server catalog:/// ``` ```bash $ docker mcp profile server add web-dev \ --server catalog://mcp/docker-mcp-catalog/github-official \ --server catalog://mcp/docker-mcp-catalog/playwright ``` ```bash $ docker mcp profile server add my-profile \ --server file://./my-server.yaml ``` -------------------------------- ### Find Stale Docker Hub Repositories Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Locate repositories that have not been updated recently, based on push activity. Helps in cleaning up old or unused repositories. ```bash $ docker ai "Which of my repositories haven't had any pushes in the last 60 days?" ``` -------------------------------- ### Export Profile to Version Control Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Export a profile to a JSON file for storage in version control. This is useful for project-specific configurations. ```bash $ mkdir -p .docker $ docker mcp profile export web-dev .docker/mcp-profile.json ``` -------------------------------- ### Gateway Management Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Commands for running the MCP Gateway, with options to specify a profile or use the default. ```APIDOC ## Run the MCP Gateway ### Description Starts the MCP Gateway. By default, it uses the default profile. You can specify a profile to run the gateway with. ### Command `docker mcp gateway run [--profile ]` ### Parameters * **--profile** (string) - Optional - The ID of the profile to use when running the gateway. ``` -------------------------------- ### Pull Profile from OCI Registry Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Retrieve a profile shared via an OCI registry. ```bash $ docker mcp profile pull registry.example.com/mcp/team-standard:latest ``` -------------------------------- ### Search for MCP Servers Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/dynamic-mcp Use the `mcp-find` tool to search the MCP Catalog for servers based on name or description. This is useful for discovering available MCP servers for specific tasks. ```plaintext What MCP servers can I use for working with SQL databases? ``` -------------------------------- ### Find Largest Docker Hub Repository Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Identify the repository consuming the most space in your Docker Hub account. Useful for storage management. ```bash $ docker ai "Which of my repositories takes up the most space?" ``` -------------------------------- ### Add MCP Configuration to Gitignore Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Add the generated MCP configuration file to your .gitignore to prevent it from being committed to version control. ```bash $ echo ".vscode/mcp.json" >> .gitignore ``` -------------------------------- ### Find Most Recently Pushed Tag Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Identify the most recently pushed tag for a specific repository. Useful for tracking the latest deployments. Replace '' with the repository name. ```bash $ docker ai "What's the most recent tag pushed to my '' repository?" ``` -------------------------------- ### Remove Server from Catalog Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Remove a specific server by name from a catalog. ```bash $ docker mcp catalog server remove \ registry.example.com/mcp/company-tools:latest \ --name ``` -------------------------------- ### Configure ES Modules in package.json Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/e2b-sandboxes Updates the package.json file to enable ES module support in a Node.js project. This is necessary for using import/export syntax. ```json { "name": "mcp-e2b-quickstart", "version": "1.0.0", "type": "module", "scripts": { "start": "node index.js" } } ``` -------------------------------- ### Update MCP Catalog Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/faqs Run this command to update your local MCP catalog to display remote servers. Refresh the Docker Desktop Catalog tab after the update. ```bash $ docker mcp catalog update ``` -------------------------------- ### Pull Latest PostgreSQL Image Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/hub-mcp Use this command to pull the latest version of the PostgreSQL image from Docker Hub. ```bash $ docker ai "Pull the latest postgres image" ``` -------------------------------- ### Push and Pull MCP Profiles Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/faqs Commands for sharing MCP profiles with your team via OCI-compliant registries. Note that credentials are not included in shared profiles. ```bash docker mcp profile push my-profile registry.example.com/profiles/my-profile:v1 ``` ```bash docker mcp profile pull registry.example.com/profiles/my-profile:v1 ``` -------------------------------- ### Disable Dynamic MCP Tools Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/dynamic-mcp Use this command to disable the dynamic tools feature if you prefer to use only statically configured MCP servers. ```console $ docker mcp feature disable dynamic-tools ``` -------------------------------- ### Remove a profile Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Removes an MCP profile and all its associated server configurations and settings. This action is irreversible. ```bash $ docker mcp profile remove ``` -------------------------------- ### Remove a server from a profile Source: https://docs.docker.com/ai/mcp-catalog-and-toolkit/cli Removes one or more servers from an MCP profile. ```bash $ docker mcp profile server remove --name ``` ```bash $ docker mcp profile server remove web-dev \ --name github-official \ --name playwright ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.