mirror of https://github.com/docker/docs.git
Merge pull request #22330 from rumpl/gordon-mcp-server
Gordon: docs about MCP built-in tools and its MCP server capabilities
This commit is contained in:
parent
fe639f9b30
commit
9020de21a0
|
|
@ -79,6 +79,7 @@ exceptions:
|
|||
- LTS
|
||||
- MAC
|
||||
- MCP
|
||||
- mcp
|
||||
- MDM
|
||||
- MDN
|
||||
- MSI
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@ params:
|
|||
{{< summary-bar feature_name="Ask Gordon" >}}
|
||||
|
||||
Ask Gordon is your personal AI assistant embedded in Docker Desktop and the
|
||||
Docker CLI. It's designed to streamline your workflow and help you make the
|
||||
most of the Docker ecosystem.
|
||||
Docker CLI. It's designed to streamline your workflow and help you make the most
|
||||
of the Docker ecosystem.
|
||||
|
||||
## What is Ask Gordon?
|
||||
|
||||
Ask Gordon is a suite of AI-powered capabilities integrated into Docker's
|
||||
tools. These features, currently in Beta, are not enabled by default, and are
|
||||
not production-ready. You may also encounter the term "Docker AI" as a broader
|
||||
Ask Gordon is a suite of AI-powered capabilities integrated into Docker's tools.
|
||||
These features, currently in Beta, are not enabled by default, and are not
|
||||
production-ready. You may also encounter the term "Docker AI" as a broader
|
||||
reference to this technology.
|
||||
|
||||
The goal of Ask Gordon is to make Docker's tools for managing images and
|
||||
|
|
@ -33,9 +33,8 @@ images. For example, you can ask Gordon to help you identify vulnerabilities in
|
|||
your project or how to optimize a Dockerfile in your local repository. This
|
||||
tight integration ensures responses are practical and actionable.
|
||||
|
||||
> [!NOTE]
|
||||
> Ask Gordon is powered by Large Language Models (LLMs). Like all LLM-based
|
||||
> tools, its responses may sometimes be inaccurate. Always verify the
|
||||
> [!NOTE] Ask Gordon is powered by Large Language Models (LLMs). Like all
|
||||
> LLM-based tools, its responses may sometimes be inaccurate. Always verify the
|
||||
> information provided.
|
||||
|
||||
### What data does Gordon access?
|
||||
|
|
@ -43,20 +42,21 @@ tight integration ensures responses are practical and actionable.
|
|||
When you use Ask Gordon, the data it accesses depends on the context of your
|
||||
query:
|
||||
|
||||
- Local files: If you use the `docker ai` command, Ask Gordon can access
|
||||
files and directories in the current working directory where the command is
|
||||
- Local files: If you use the `docker ai` command, Ask Gordon can access files
|
||||
and directories in the current working directory where the command is
|
||||
executed. In Docker Desktop, if you ask about a specific file or directory in
|
||||
the **Ask Gordon** view, you'll be prompted to select the relevant context.
|
||||
- Local images: Gordon integrates with Docker Desktop and can view all images
|
||||
in your local image store. This includes images you've built or pulled from a
|
||||
- Local images: Gordon integrates with Docker Desktop and can view all images in
|
||||
your local image store. This includes images you've built or pulled from a
|
||||
registry.
|
||||
|
||||
To provide accurate responses, Ask Gordon may send relevant files, directories,
|
||||
or image metadata to the Gordon backend along with your query. This data
|
||||
transfer occurs over the network but is never stored persistently or shared
|
||||
with third parties. It is used exclusively to process your request and
|
||||
formulate a response. For more information about privacy terms and conditions
|
||||
for Docker AI, review [Gordon's Supplemental Terms](https://www.docker.com/legal/docker-ai-supplemental-terms/).
|
||||
transfer occurs over the network but is never stored persistently or shared with
|
||||
third parties. It is used exclusively to process your request and formulate a
|
||||
response. For more information about privacy terms and conditions for Docker AI,
|
||||
review [Gordon's Supplemental
|
||||
Terms](https://www.docker.com/legal/docker-ai-supplemental-terms/).
|
||||
|
||||
All data transferred is encrypted in transit.
|
||||
|
||||
|
|
@ -107,7 +107,8 @@ After signing in to your Docker Account, enable the Docker AI feature:
|
|||
3. Check the **Enable Docker AI** checkbox.
|
||||
|
||||
The Docker AI terms of service agreement is displayed. You must agree to the
|
||||
terms before you can enable the feature. Review the terms and select **Accept and enable** to continue.
|
||||
terms before you can enable the feature. Review the terms and select **Accept
|
||||
and enable** to continue.
|
||||
|
||||
4. Select **Apply & restart**.
|
||||
|
||||
|
|
@ -117,22 +118,21 @@ The primary interfaces to Docker's AI capabilities are through the **Ask
|
|||
Gordon** view in Docker Desktop, or if you prefer to use the CLI: the `docker
|
||||
ai` CLI command.
|
||||
|
||||
If you've used an AI chatbot before, these interfaces will be pretty familiar
|
||||
to you. You can chat with the Docker AI to get help with your Docker tasks.
|
||||
If you've used an AI chatbot before, these interfaces will be pretty familiar to
|
||||
you. You can chat with the Docker AI to get help with your Docker tasks.
|
||||
|
||||
### Contextual help
|
||||
|
||||
Once you've enabled the Docker AI features, you'll also find references to
|
||||
**Ask Gordon** in various other places throughout the Docker Desktop user
|
||||
interface. Whenever you encounter a button with the "sparkles" (✨) icon in the
|
||||
user interface, you can use the button to get contextual support from Ask
|
||||
Gordon.
|
||||
Once you've enabled the Docker AI features, you'll also find references to **Ask
|
||||
Gordon** in various other places throughout the Docker Desktop user interface.
|
||||
Whenever you encounter a button with the "sparkles" (✨) icon in the user
|
||||
interface, you can use the button to get contextual support from Ask Gordon.
|
||||
|
||||
## Example workflows
|
||||
|
||||
Ask Gordon is a general-purpose AI assistant created to help you with all your
|
||||
Docker-related tasks and workflows. If you need some inspiration, here are a
|
||||
few ways things you can try:
|
||||
Docker-related tasks and workflows. If you need some inspiration, here are a few
|
||||
ways things you can try:
|
||||
|
||||
- [Troubleshoot a crashed container](#troubleshoot-a-crashed-container)
|
||||
- [Get help with running a container](#get-help-with-running-a-container)
|
||||
|
|
@ -222,7 +222,8 @@ If you've enabled Ask Gordon and you want to disable it again:
|
|||
4. Select **Apply & restart**.
|
||||
|
||||
If you want to disable Ask Gordon for your entire Docker organization, using
|
||||
[Settings Management](/manuals/security/for-admins/hardened-desktop/settings-management/_index.md),
|
||||
[Settings
|
||||
Management](/manuals/security/for-admins/hardened-desktop/settings-management/_index.md),
|
||||
add the following property to your `admin-settings.json` file:
|
||||
|
||||
```json
|
||||
|
|
@ -234,7 +235,8 @@ add the following property to your `admin-settings.json` file:
|
|||
}
|
||||
```
|
||||
|
||||
Alternatively, you can disable all Beta features by setting `allowBetaFeatures` to false:
|
||||
Alternatively, you can disable all Beta features by setting `allowBetaFeatures`
|
||||
to false:
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 150 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 129 KiB |
|
|
@ -1,142 +0,0 @@
|
|||
---
|
||||
title: MCP
|
||||
description: Learn how to use MCP servers with Gordon
|
||||
keywords: ai, mcp, gordon
|
||||
---
|
||||
|
||||
## What is MCP?
|
||||
|
||||
Anthropic recently announced the [Model Context Protocol](https://www.anthropic.com/news/model-context-protocol) (MCP) specification, an open protocol that standardises how applications provide context to large language models. MCP functions as a client-server protocol, where the client (e.g., an application like Gordon) sends requests, and the server processes those requests to deliver the necessary context to the AI.
|
||||
|
||||
Gordon, along with other MCP clients like Claude Desktop, can interact with MCP servers running as containers. Docker has partnered with Anthropic to build container images for the [reference implementations](https://github.com/modelcontextprotocol/servers/) of MCP servers, available on Docker Hub under [the mcp namespace](https://hub.docker.com/u/mcp).
|
||||
|
||||
## Simple MCP server usage with Gordon
|
||||
|
||||
When you run the `docker ai` command in your terminal to ask a question, Gordon looks for a `gordon-mcp.yml` file in your working directory for a list of MCP servers that should be used when in that context. The `gordon-mcp.yml` file is a Docker Compose file that configures MCP servers as Compose services for Gordon to access.
|
||||
|
||||
The following minimal example shows how you can use the [mcp-time server](https://hub.docker.com/r/mcp/time) to provide temporal capabilities to Gordon. For more information, you can check out the [source code and documentation](https://github.com/modelcontextprotocol/servers/tree/main/src/time).
|
||||
|
||||
1. Create the `gordon-mcp.yml` file and add the time server:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
time:
|
||||
image: mcp/time
|
||||
```
|
||||
|
||||
2. With this file you can now ask Gordon to tell you the time in another timezone:
|
||||
|
||||
```bash
|
||||
$ docker ai 'what time is it now in kiribati?'
|
||||
|
||||
• Calling get_current_time
|
||||
|
||||
The current time in Kiribati (Tarawa) is 9:38 PM on January 7, 2025.
|
||||
|
||||
```
|
||||
|
||||
|
||||
As you can see, Gordon found the MCP time server and called its tool when needed.
|
||||
|
||||
## Advanced usage
|
||||
|
||||
Some MCP servers need access to your filesystem or system environment variables. Docker Compose can help with this. Since `gordon-mcp.yml` is a Compose file you can add bind mounts using the regular Docker Compose syntax, which makes your filesystem resources available to the container:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
fs:
|
||||
image: mcp/filesystem
|
||||
command:
|
||||
- /rootfs
|
||||
volumes:
|
||||
- .:/rootfs
|
||||
```
|
||||
|
||||
The `gordon-mcp.yml` file adds filesystem access capabilities to Gordon and since everything runs inside a container Gordon only has access to the directories you specify.
|
||||
|
||||
Gordon can handle any number of MCP servers. For example, if you give Gordon access to the internet with the `mcp/fetch` server:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
fetch:
|
||||
image: mcp/fetch
|
||||
fs:
|
||||
image: mcp/filesystem
|
||||
command:
|
||||
- /rootfs
|
||||
volumes:
|
||||
- .:/rootfs
|
||||
```
|
||||
|
||||
You can now ask things like:
|
||||
|
||||
```bash
|
||||
$ docker ai can you fetch rumpl.dev and write the summary to a file test.txt
|
||||
|
||||
• Calling fetch ✔️
|
||||
• Calling write_file ✔️
|
||||
|
||||
The summary of the website rumpl.dev has been successfully written to the file test.txt in the allowed directory. Let me know if you need further assistance!
|
||||
|
||||
|
||||
$ cat test.txt
|
||||
The website rumpl.dev features a variety of blog posts and articles authored by the site owner. Here's a summary of the content:
|
||||
|
||||
1. **Wasmio 2023 (March 25, 2023)**: A recap of the WasmIO 2023 conference held in Barcelona. The author shares their experience as a speaker and praises the organizers for a successful event.
|
||||
|
||||
2. **Writing a Window Manager in Rust - Part 2 (January 3, 2023)**: The second part of a series on creating a window manager in Rust. This installment focuses on enhancing the functionality to manage windows effectively.
|
||||
|
||||
3. **2022 in Review (December 29, 2022)**: A personal and professional recap of the year 2022. The author reflects on the highs and lows of the year, emphasizing professional achievements.
|
||||
|
||||
4. **Writing a Window Manager in Rust - Part 1 (December 28, 2022)**: The first part of the series on building a window manager in Rust. The author discusses setting up a Linux machine and the challenges of working with X11 and Rust.
|
||||
|
||||
5. **Add docker/docker to your dependencies (May 10, 2020)**: A guide for Go developers on how to use the Docker client library in their projects. The post includes a code snippet demonstrating the integration.
|
||||
|
||||
6. **First (October 11, 2019)**: The inaugural post on the blog, featuring a simple "Hello World" program in Go.%
|
||||
|
||||
```
|
||||
|
||||
## What’s next?
|
||||
|
||||
Now that you’ve learned how to use MCP servers with Gordon, here are a few ways you can get started:
|
||||
|
||||
- Experiment: Try integrating one or more of the tested MCP servers into your `gordon-mcp.yml` file and explore their capabilities.
|
||||
1. Explore the ecosystem: Check out the [reference implementations on GitHub](https://github.com/modelcontextprotocol/servers/) or browse the [Docker Hub MCP namespace](https://hub.docker.com/u/mcp) for additional servers that might suit your needs.
|
||||
2. Build your own: If none of the existing servers meet your needs, or you’re curious about exploring how they work in more detail, consider developing a custom MCP server. Use the [MCP specification](https://www.anthropic.com/news/model-context-protocol) as a guide.
|
||||
3. Share your feedback: If you discover new servers that work well with Gordon or encounter issues with existing ones, [share your findings to help improve the ecosystem.](https://docker.qualtrics.com/jfe/form/SV_9tT3kdgXfAa6cWa)
|
||||
|
||||
With MCP support, Gordon offers powerful extensibility and flexibility to meet your specific use cases whether you’re adding temporal awareness, file management, or internet access.
|
||||
|
||||
### List of known working MCP Servers
|
||||
|
||||
These are the MCP servers that have been tested successfully with Gordon:
|
||||
|
||||
- `mcp/time`
|
||||
- `mcp/fetch`
|
||||
- `mcp/filesystem`
|
||||
- `mcp/postgres`
|
||||
- `mcp/git`
|
||||
- `mcp/sqlite`
|
||||
- `mcp/github`
|
||||
|
||||
### List of untested MCP servers
|
||||
|
||||
These are the MCP servers that were not tested but should work if given the appropriate API tokens:
|
||||
|
||||
- `mcp/brave-search`
|
||||
- `mcp/gdrive`
|
||||
- `mcp/slack`
|
||||
- `mcp/google-maps`
|
||||
- `mcp/gitlab`
|
||||
- `mcp/everything`
|
||||
- `mcp/aws-kb-retrieval-server`
|
||||
- `mcp/sentry`
|
||||
|
||||
### List of MCP servers that don’t work with Gordon
|
||||
|
||||
These are the MCP servers that are currently unsupported:
|
||||
|
||||
- `mcp/sequentialthinking` - The tool description is too long
|
||||
- `mcp/puppeteer` - Puppeteer sends back images and Gordon doesn’t know how to handle them, it only handles text responses from tools
|
||||
- `mcp/everart` - Everart sends back images and Gordon doesn’t know how to handle them, it only handles text responses from tools
|
||||
- `mcp/memory` - There is no way to configure the server to use a custom path for its knowledge base
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
title: MCP
|
||||
description: Learn how to use MCP servers with Gordon
|
||||
keywords: ai, mcp, gordon, docker desktop, docker, llm,
|
||||
grid:
|
||||
- title: Built-in tools
|
||||
description: Use the built-in tools.
|
||||
icon: construction
|
||||
link: /desktop/features/gordon/mcp/built-in-tools
|
||||
- title: MCP configuration
|
||||
description: Configure MCP tools on a per-project basis.
|
||||
icon: manufacturing
|
||||
link: /desktop/features/gordon/mcp/yaml
|
||||
- title: MCP Server
|
||||
description: Use Gordon as an MCP server
|
||||
icon: dns
|
||||
link: /desktop/features/gordon/mcp/gordon-mcp-server/
|
||||
---
|
||||
|
||||
## What is MCP?
|
||||
|
||||
[Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) is
|
||||
an open protocol that standardizes how applications provide context and extra
|
||||
functionality to large language models. MCP functions as a client-server
|
||||
protocol, where the client, for example an application like Gordon, sends
|
||||
requests, and the server processes those requests to deliver the necessary
|
||||
context to the AI. This context may be gathered by the MCP server by executing
|
||||
some code to perform an action and getting the result of the action, calling
|
||||
external APIs, etc.
|
||||
|
||||
Gordon, along with other MCP clients like Claude Desktop or Cursor, can interact
|
||||
with MCP servers running as containers.
|
||||
|
||||
{{< grid >}}
|
||||
|
|
@ -0,0 +1,236 @@
|
|||
---
|
||||
title: Built-in tools
|
||||
description: How to use Gordon's built-in tools
|
||||
keywords: ai, mcp, gordon
|
||||
---
|
||||
|
||||
Gordon comes with an integrated toolbox providing access to various system tools
|
||||
and capabilities. These tools extend Gordon's functionality by allowing it to
|
||||
interact with the Docker Engine, Kubernetes, Docker Scout's security scanning,
|
||||
and other developer utilities. This documentation covers the available tools,
|
||||
their configuration, and usage patterns.
|
||||
|
||||
## Configuration
|
||||
|
||||
Tools can be configured globally in the toolbox, making them accessible
|
||||
throughout the Gordon interfaces, including both Docker Desktop and the CLI.
|
||||
|
||||
To configure:
|
||||
|
||||
1. On the **Ask Gordon** view in Docker Desktop, select the `Toolbox` button in the bottom left of the input area.
|
||||
|
||||

|
||||
|
||||
2. Choose the tools you want to make available. Selecting a card lets you view extra information regarding each tool and what it does.
|
||||
|
||||

|
||||
|
||||
For more information on the possible tools, see [Reference](#reference).
|
||||
|
||||
## Usage examples
|
||||
|
||||
This section provides task-oriented examples for common operations with Gordon
|
||||
tools.
|
||||
|
||||
### Managing Docker containers
|
||||
|
||||
#### List and monitor containers
|
||||
|
||||
```console
|
||||
# List all running containers
|
||||
$ docker ai "Show me all running containers"
|
||||
|
||||
# List containers using specific resources
|
||||
$ docker ai "List all containers using more than 1GB of memory"
|
||||
|
||||
# View logs from a specific container
|
||||
$ docker ai "Show me logs from my running api-container from the last hour"
|
||||
```
|
||||
|
||||
#### Manage container lifecycle
|
||||
|
||||
```console
|
||||
# Run a new container
|
||||
$ docker ai "Run a nginx container with port 80 exposed to localhost"
|
||||
|
||||
# Stop a specific container
|
||||
$ docker ai "Stop my database container"
|
||||
|
||||
# Clean up unused containers
|
||||
$ docker ai "Remove all stopped containers"
|
||||
```
|
||||
|
||||
### Working with Docker images
|
||||
|
||||
```console
|
||||
# List available images
|
||||
$ docker ai "Show me all my local Docker images"
|
||||
|
||||
# Pull a specific image
|
||||
$ docker ai "Pull the latest Ubuntu image"
|
||||
|
||||
# Build an image from a Dockerfile
|
||||
$ docker ai "Build an image from my current directory and tag it as myapp:latest"
|
||||
|
||||
# Clean up unused images
|
||||
$ docker ai "Remove all my unused images"
|
||||
```
|
||||
|
||||
### Managing Docker volumes
|
||||
|
||||
```console
|
||||
# List volumes
|
||||
$ docker ai "List all my Docker volumes"
|
||||
|
||||
# Create a new volume
|
||||
$ docker ai "Create a new volume called postgres-data"
|
||||
|
||||
# Backup data from a container to a volume
|
||||
$ docker ai "Create a backup of my postgres container data to a new volume"
|
||||
```
|
||||
|
||||
### Kubernetes operations
|
||||
|
||||
```console
|
||||
# Create a deployment
|
||||
$ docker ai "Create an nginx deployment and make sure it's exposed locally"
|
||||
|
||||
# List resources
|
||||
$ docker ai "Show me all deployments in the default namespace"
|
||||
|
||||
# Get logs
|
||||
$ docker ai "Show me logs from the auth-service pod"
|
||||
```
|
||||
|
||||
### Security analysis
|
||||
|
||||
|
||||
```console
|
||||
# Scan for CVEs
|
||||
$ docker ai "Scan my application for security vulnerabilities"
|
||||
|
||||
# Get security recommendations
|
||||
$ docker ai "Give me recommendations for improving the security of my nodejs-app image"
|
||||
```
|
||||
|
||||
### Development workflows
|
||||
|
||||
```console
|
||||
# Analyze and commit changes
|
||||
$ docker ai "Look at my local changes, create multiple commits with sensible commit messages"
|
||||
|
||||
# Review branch status
|
||||
$ docker ai "Show me the status of my current branch compared to main"
|
||||
```
|
||||
|
||||
## Reference
|
||||
|
||||
This section provides a comprehensive listing of the built-in tools you can find
|
||||
in Gordon's toolbox.
|
||||
|
||||
### Docker tools
|
||||
|
||||
Tools to interact with your Docker containers, images, and volumes.
|
||||
|
||||
#### Container management
|
||||
|
||||
| Name | Description |
|
||||
|------|-------------|
|
||||
| `list_containers` | List all Docker containers |
|
||||
| `remove_containers` | Remove one or more Docker containers |
|
||||
| `stop_container` | Stop a running Docker container |
|
||||
| `fetch_container_logs` | Retrieve logs from a Docker container |
|
||||
| `run_container` | Run a new Docker container |
|
||||
|
||||
#### Volume management
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `list_volumes` | List all Docker volumes |
|
||||
| `remove_volume` | Remove a Docker volume |
|
||||
| `create_volume` | Create a new Docker volume |
|
||||
|
||||
#### Image management
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `list_images` | List all Docker images |
|
||||
| `remove_images` | Remove Docker images |
|
||||
| `pull_image` | Pull an image from a registry |
|
||||
| `push_image` | Push an image to a registry |
|
||||
| `build_image` | Build a Docker image |
|
||||
| `tag_image` | Tag a Docker image |
|
||||
| `inspect` | Inspect a Docker object |
|
||||
|
||||
### Kubernetes tools
|
||||
|
||||
Tools to interact with your Kubernetes cluster
|
||||
|
||||
#### Pods
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `list_pods` | List all pods in the cluster |
|
||||
| `get_pod_logs` | Get logs from a specific pod |
|
||||
|
||||
#### Deployment management
|
||||
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `list_deployments` | List all deployments |
|
||||
| `create_deployment` | Create a new deployment |
|
||||
| `expose_deployment` | Expose a deployment as a service |
|
||||
| `remove_deployment` | Remove a deployment |
|
||||
|
||||
#### Service management
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `list_services` | List all services |
|
||||
| `remove_service` | Remove a service |
|
||||
|
||||
#### Cluster information
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `list_namespaces` | List all namespaces |
|
||||
| `list_nodes` | List all nodes in the cluster |
|
||||
|
||||
### Docker Scout tools
|
||||
|
||||
Security analysis tools powered by Docker Scout.
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `search_for_cves` | Analyze a Docker image, a project directory, or other artifacts for vulnerabilities using Docker Scout CVEs.search for cves |
|
||||
| `get_security_recommendations` | Analyze a Docker image, a project directory, or other artifacts for base image update recommendations using Docker Scout. |
|
||||
|
||||
### Developer tools
|
||||
|
||||
General-purpose development utilities.
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `fetch` | Retrieve content from a URL |
|
||||
| `get_command_help` | Get help for CLI commands |
|
||||
| `run_command` | Execute shell commands |
|
||||
| `filesystem` | Perform filesystem operations |
|
||||
| `git` | Execute git commands |
|
||||
|
||||
### AI model tools
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| `list_models` | List all available AI models |
|
||||
| `pull_model` | Download an AI model |
|
||||
| `run_model` | Query a model with a prompt |
|
||||
| `remove_model` | Remove an AI model |
|
||||
|
||||
### AI Tool Catalog
|
||||
|
||||
When the [AI Tool
|
||||
Catalog](https://open.docker.com/extensions/marketplace?extensionId=docker/labs-ai-tools-for-devs)
|
||||
Docker Desktop extension is installed, all the tools enabled in the catalog are
|
||||
available for Gordon to use. After installation, you can enable the usage of the
|
||||
AI Tool Catalog tools in the toolbox section of Gordon.
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
title: Gordon as an MCP server
|
||||
description: How to use Gordon as an MCP server
|
||||
keywords: ai, mcp, gordon
|
||||
---
|
||||
|
||||
## Gordon as an MCP server
|
||||
|
||||
In addition to functioning as an MCP client, Gordon can also act as an MCP
|
||||
server. This means that all the tools configured in the toolbox section of
|
||||
Gordon can be exposed to another MCP client like Claude Desktop, Cursor and
|
||||
others.
|
||||
|
||||
To use Gordon’s built-in tools in other MCP clients, configure your client of
|
||||
choice to use the `docker ai mcpserver` command. This allows Gordon to serve its
|
||||
built-in tools via the MCP protocol for various clients.
|
||||
|
||||
For example, to enable Gordon’s tools in Claude Desktop, add the following
|
||||
configuration to the Claude configuration file:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"gordon": {
|
||||
"command": "docker",
|
||||
"args": ["ai", "mcpserver"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This setup ensures that Claude Desktop can communicate with Gordon as an MCP
|
||||
server, leveraging its built-in tools. You can follow the [Claude Desktop
|
||||
documentation](https://modelcontextprotocol.io/quickstart/user) to explore
|
||||
further.
|
||||
|
||||
### Tool permissions and security
|
||||
|
||||
These tools operate with the same permissions as the user running the
|
||||
application.
|
||||
|
||||
Any potentially destructive tool call, changing files, deleting images or
|
||||
stopping containers will ask for your confirmation before proceeding.
|
||||
|
||||

|
||||
|
|
@ -0,0 +1,171 @@
|
|||
---
|
||||
title: YAML configuration
|
||||
description: Learn how to use MCP servers with Gordon
|
||||
keywords: ai, mcp, gordon
|
||||
---
|
||||
|
||||
Docker has partnered with Anthropic to build container images for the [reference
|
||||
implementations](https://github.com/modelcontextprotocol/servers/) of MCP
|
||||
servers available on Docker Hub under [the mcp
|
||||
namespace](https://hub.docker.com/u/mcp).
|
||||
|
||||
When you run the `docker ai` command in your terminal to ask a question, Gordon
|
||||
looks in the `gordon-mcp.yml` file in your working directory (if present) for a
|
||||
list of MCP servers that should be used when in that context. The
|
||||
`gordon-mcp.yml` file is a Docker Compose file that configures MCP servers as
|
||||
Compose services for Gordon to access.
|
||||
|
||||
The following minimal example shows how you can use the [mcp-time
|
||||
server](https://hub.docker.com/r/mcp/time) to provide temporal capabilities to
|
||||
Gordon. For more information, you can check out the [source code and
|
||||
documentation](https://github.com/modelcontextprotocol/servers/tree/main/src/time).
|
||||
|
||||
Create the `gordon-mcp.yml` file in your working directory and add the time
|
||||
server:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
time:
|
||||
image: mcp/time
|
||||
```
|
||||
|
||||
With this file present, you can now ask Gordon to tell you the time in
|
||||
another timezone:
|
||||
|
||||
```bash
|
||||
$ docker ai 'what time is it now in kiribati?'
|
||||
|
||||
• Calling get_current_time
|
||||
|
||||
The current time in Kiribati (Tarawa) is 9:38 PM on January 7, 2025.
|
||||
|
||||
```
|
||||
|
||||
As you can see, Gordon found the MCP time server and called its tool when
|
||||
needed.
|
||||
|
||||
## Advanced usage
|
||||
|
||||
Some MCP servers need access to your filesystem or system environment variables.
|
||||
Docker Compose can help with this. Since `gordon-mcp.yml` is a Compose file you
|
||||
can add bind mounts using the regular Docker Compose syntax, which makes your
|
||||
filesystem resources available to the container:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
fs:
|
||||
image: mcp/filesystem
|
||||
command:
|
||||
- /rootfs
|
||||
volumes:
|
||||
- .:/rootfs
|
||||
```
|
||||
|
||||
The `gordon-mcp.yml` file adds filesystem access capabilities to Gordon and
|
||||
since everything runs inside a container Gordon only has access to the
|
||||
directories you specify.
|
||||
|
||||
Gordon can handle any number of MCP servers. For example, if you give Gordon
|
||||
access to the internet with the `mcp/fetch` server:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
fetch:
|
||||
image: mcp/fetch
|
||||
fs:
|
||||
image: mcp/filesystem
|
||||
command:
|
||||
- /rootfs
|
||||
volumes:
|
||||
- .:/rootfs
|
||||
```
|
||||
|
||||
You can now ask things like:
|
||||
|
||||
```bash
|
||||
$ docker ai can you fetch rumpl.dev and write the summary to a file test.txt
|
||||
|
||||
• Calling fetch ✔️
|
||||
• Calling write_file ✔️
|
||||
|
||||
The summary of the website rumpl.dev has been successfully written to the file test.txt in the allowed directory. Let me know if you need further assistance!
|
||||
|
||||
|
||||
$ cat test.txt
|
||||
The website rumpl.dev features a variety of blog posts and articles authored by the site owner. Here's a summary of the content:
|
||||
|
||||
1. **Wasmio 2023 (March 25, 2023)**: A recap of the WasmIO 2023 conference held in Barcelona. The author shares their experience as a speaker and praises the organizers for a successful event.
|
||||
|
||||
2. **Writing a Window Manager in Rust - Part 2 (January 3, 2023)**: The second part of a series on creating a window manager in Rust. This installment focuses on enhancing the functionality to manage windows effectively.
|
||||
|
||||
3. **2022 in Review (December 29, 2022)**: A personal and professional recap of the year 2022. The author reflects on the highs and lows of the year, emphasizing professional achievements.
|
||||
|
||||
4. **Writing a Window Manager in Rust - Part 1 (December 28, 2022)**: The first part of the series on building a window manager in Rust. The author discusses setting up a Linux machine and the challenges of working with X11 and Rust.
|
||||
|
||||
5. **Add docker/docker to your dependencies (May 10, 2020)**: A guide for Go developers on how to use the Docker client library in their projects. The post includes a code snippet demonstrating the integration.
|
||||
|
||||
6. **First (October 11, 2019)**: The inaugural post on the blog, featuring a simple "Hello World" program in Go.
|
||||
```
|
||||
|
||||
## What’s next?
|
||||
|
||||
Now that you’ve learned how to use MCP servers with Gordon, here are a few ways
|
||||
you can get started:
|
||||
|
||||
- Experiment: Try integrating one or more of the tested MCP servers into your
|
||||
`gordon-mcp.yml` file and explore their capabilities.
|
||||
- Explore the ecosystem: Check out the [reference implementations on
|
||||
GitHub](https://github.com/modelcontextprotocol/servers/) or browse the
|
||||
[Docker Hub MCP namespace](https://hub.docker.com/u/mcp) for additional
|
||||
servers that might suit your needs.
|
||||
- Build your own: If none of the existing servers meet your needs, or you’re
|
||||
curious about exploring how they work in more detail, consider developing a
|
||||
custom MCP server. Use the [MCP
|
||||
specification](https://www.anthropic.com/news/model-context-protocol) as a
|
||||
guide.
|
||||
- Share your feedback: If you discover new servers that work well with Gordon
|
||||
or encounter issues with existing ones, [share your findings to help improve
|
||||
the ecosystem](https://docker.qualtrics.com/jfe/form/SV_9tT3kdgXfAa6cWa).
|
||||
|
||||
With MCP support, Gordon offers powerful extensibility and flexibility to meet
|
||||
your specific use cases whether you’re adding temporal awareness, file
|
||||
management, or internet access.
|
||||
|
||||
### Compatible MCP servers
|
||||
|
||||
These are MCP servers that have been tested with Gordon and are known to be
|
||||
working:
|
||||
|
||||
- `mcp/time`
|
||||
- `mcp/fetch`
|
||||
- `mcp/filesystem`
|
||||
- `mcp/postgres`
|
||||
- `mcp/git`
|
||||
- `mcp/sqlite`
|
||||
- `mcp/github`
|
||||
|
||||
### Untested (should work with appropriate API tokens)
|
||||
|
||||
These are MCP servers that were not tested but should work if given the
|
||||
appropriate API tokens:
|
||||
|
||||
- `mcp/brave-search`
|
||||
- `mcp/gdrive`
|
||||
- `mcp/slack`
|
||||
- `mcp/google-maps`
|
||||
- `mcp/gitlab`
|
||||
- `mcp/everything`
|
||||
- `mcp/aws-kb-retrieval-server`
|
||||
- `mcp/sentry`
|
||||
|
||||
### Unsupported
|
||||
|
||||
These are MCP servers that are currently known to be unsupported:
|
||||
|
||||
- `mcp/sequentialthinking` - (The tool description is too long)
|
||||
- `mcp/puppeteer` - Puppeteer sends back images and Gordon doesn’t know how to
|
||||
handle them, it only handles text responses from tools
|
||||
- `mcp/everart` - Everart sends back images and Gordon doesn’t know how to
|
||||
handle them, it only handles text responses from tools
|
||||
- `mcp/memory` - There is no way to configure the server to use a custom path
|
||||
for its knowledge base
|
||||
Loading…
Reference in New Issue