@@ -45,6 +45,7 @@ shows how Docker ties them all together with the following tools:
45
45
Toolkit] ( ../manuals/ai/mcp-catalog-and-toolkit/_index.md ) helps you discover
46
46
and securely run external tools, like APIs and databases, using the Model
47
47
Context Protocol (MCP).
48
+ - [ Docker MCP Gateway] ( /manuals/ai/mcp-gateway/_index.md ) lets you orchestrate and manage MCP servers.
48
49
- [ Docker Cloud] ( /cloud/ ) provides a powerful, GPU-accelerated
49
50
environment to run your AI applications with the same Compose-based
50
51
workflow you use locally.
@@ -112,18 +113,18 @@ To run the application in Docker Cloud, follow these steps:
112
113
and run it.
113
114
114
115
4 . Visit [ http://localhost:8080 ] ( http://localhost:8080 ) . Enter something in the
115
- prompt and hit enter. An agent searches DuckDuckGo and another agent revises the
116
- output.
116
+ prompt and hit enter. An agent searches DuckDuckGo and another agent revises
117
+ the output.
117
118
118
- ![ Screenshot of the application] ( ./images/agentic-ai-app.png )
119
+ ![ Screenshot of the application] ( ./images/agentic-ai-app.png )
119
120
120
121
5 . Press ctrl-c in the terminal to stop the application when you're done.
121
122
122
123
6 . Run the following command to stop Docker Cloud:
123
124
124
- ``` console
125
- $ docker cloud stop
126
- ```
125
+ ``` console
126
+ $ docker cloud stop
127
+ ```
127
128
128
129
## Step 3: Optional. Run the application locally
129
130
@@ -175,37 +176,40 @@ instructions below to help you understand each line.
175
176
services :
176
177
adk :
177
178
build :
178
- context : . # Build from the current directory
179
- dockerfile : Dockerfile # Use the specified Dockerfile
179
+ context : .
180
180
ports :
181
- - " 8080:8080" # Map host port 8080 to container port 8080
181
+ # expose port for web interface
182
+ - " 8080:8080"
182
183
environment :
183
- - MCPGATEWAY_ENDPOINT=http://mcp-gateway:8811/sse # Tell the app where to find the MCP gateway
184
- command : ["web"] # Start the ADK web interface
185
- extra_hosts :
186
- - host.docker.internal:host-gateway # Allow container to reach the host machine
184
+ # point adk at the MCP gateway
185
+ - MCPGATEWAY_ENDPOINT=http://mcp-gateway:8811/sse
187
186
depends_on :
188
- - docker-model-runner # Ensure model service starts before this
189
- - mcp-gateway # Ensure gateway service starts before this
187
+ # model_runner provider starts first then injects environment variables
188
+ # MODEL_RUNNER_MODEL name
189
+ # MODEL_RUNNER_URL OpenAI compatible API endpoint
190
+ - model_runner
190
191
191
- docker-model-runner :
192
+ model_runner :
192
193
provider :
193
- type : model # Use Docker Model Runner to serve a model
194
+ type : model
194
195
options :
195
- model : ai/gemma3-qat:27B-Q4_K_M # Specify the model to run (27B Gemma3 QAT)
196
- environment :
197
- - LLAMA_ARGS=--ctx-size 20000 --jinja -ngl 100 # Runtime options for the model engine
196
+ # pre-pull the model when starting Docker Model Runner
197
+ model : ai/gemma3-qat:27B-Q4_K_M
198
+ # increase context size to handle search results
199
+ context-size : 20000
198
200
199
201
mcp-gateway :
200
- image : docker/agents_gateway:v2 # Run Docker's MCP gateway service
202
+ # agents_gateway secures your MCP servers
203
+ image : docker/agents_gateway:v2
201
204
ports :
202
- - " 8811:8811" # Expose the gateway on port 8811
205
+ - " 8811:8811"
203
206
command :
204
- - --transport=sse # Use SSE (Server-Sent Events) for agent communication
205
- - --servers=duckduckgo # Enable DuckDuckGo tool server for web search
207
+ - --transport=sse
208
+ # add any MCP servers you want to use
209
+ - --servers=duckduckgo
206
210
volumes :
207
- - /var/run/docker.sock:/var/run/docker.sock # Allow gateway to interact with Docker on host
208
-
211
+ # mount docker socket to run MCP containers
212
+ - /var/run/docker.sock:/var/run/docker.sock
209
213
` ` `
210
214
211
215
The first notable element here is the ` provider` section that specifies `type:
@@ -221,10 +225,11 @@ The `options` section defines the specific model to run, in this case,
221
225
The second notable element is `image : docker/agents_gateway:v2`, which indicates
222
226
that the MCP gateway service will use the [docker/agents_gateway:v2
223
227
image](https://hub.docker.com/r/docker/agents_gateway). This image is Docker's
224
- [ open source MCP gateway] ( https://github.com/docker/docker-mcp/ ) that enables your application to connect to MCP servers,
225
- which expose tools that models can call. In this example, it uses the
226
- [ ` duckduckgo ` MCP server] ( https://hub.docker.com/mcp/server/duckduckgo/overview )
227
- to perform web searches.
228
+ open source [MCP Gateway](https://github.com/docker/docker-mcp/) that enables
229
+ your application to connect to MCP servers, which expose tools that models can
230
+ call. In this example, it uses the [`duckduckgo` MCP
231
+ server](https://hub.docker.com/mcp/server/duckduckgo/overview) to perform web
232
+ searches.
228
233
229
234
> [!TIP]
230
235
>
@@ -237,13 +242,6 @@ external tools and services using the Model Context Protocol.
237
242
238
243
# # Step 5: Review the application
239
244
240
- The ` adk ` web application is an agent implementation that connects to the MCP
241
- gateway and a local model through environment variables and API calls. It uses
242
- the [ ADK (Agent Development Kit)] ( https://github.com/google/adk-python ) to
243
- define two agents that evaluate responses, verify claims, and revise answers.
244
- These agents load a language model (served via Docker Model Runner) and connect
245
- to external tools using the Model Context Protocol (MCP).
246
-
247
245
The `adk` web application is an agent implementation that connects to the MCP
248
246
gateway and a local model through environment variables and API calls. It uses
249
247
the [ADK (Agent Development Kit)](https://github.com/google/adk-python) to
@@ -301,6 +299,11 @@ suite of tools:
301
299
- [Docker MCP Catalog and
302
300
Toolkit](../manuals/ai/mcp-catalog-and-toolkit/_index.md) : Launch and manage
303
301
tool integrations that follow the Model Context Protocol (MCP) standard.
302
+ - [Docker MCP Gateway](/manuals/ai/mcp-gateway/_index.md) : Orchestrate and manage
303
+ MCP servers to connect agents to external tools and services.
304
+ - [Docker Compose](../manuals/compose/_index.md) : Define and run multi-container
305
+ applications with a single file, using the same workflow locally and in the
306
+ cloud.
304
307
- [Docker Cloud](/cloud/) : Deploy and scale your application
305
308
in a secure, managed cloud environment.
306
309
0 commit comments