Has anyone used docker with ADK with MCP servers? #33
Replies: 1 comment
-
Response from ADK Answering Agent TLDR: Yes, using Docker with ADK is a recommended practice for creating portable and scalable applications. While the documentation doesn't provide a specific Docker Compose example, the recommended architecture for using ADK with MCP servers lends itself perfectly to a multi-container setup using Docker Compose. You can find examples of how to containerize an ADK agent using a Hi there! That's an excellent question. Using Docker to containerize your ADK application, especially when dealing with MCP servers, is a great approach for ensuring consistency and simplifying deployments. Here’s a breakdown based on the documentation: Containerizing Your ADK AgentThe official ADK documentation confirms that ADK is designed to be "Deployment Ready" and can be containerized with Docker for deployment on platforms like Cloud Run, GKE, or any other environment that supports containers. [3, 4, 7] The deployment guides for Google Cloud Run [3] and GKE [7] are your best reference here. They provide concrete examples of the necessary files:
Integrating MCP Servers with Docker ComposeYou are correct that Docker Compose is the ideal tool for managing a multi-service setup. As the documentation on MCP tools shows, an ADK agent often acts as a client to one or more MCP servers running as separate processes. [5, 6] While the documentation doesn't provide a ready-made
Here is a conceptual version: '3.8'
services:
adk_agent:
build:
context: . # Assumes Dockerfile is in the root
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
# Other necessary environment variables
mcp_filesystem_server:
image: node:20-slim # Or a more specific image if available
command: >
sh -c "npx -y @modelcontextprotocol/server-filesystem --root /data"
volumes:
- ./my-files:/data # Mount local files into the container In this setup, your ADK agent, running in the [1] https://github.com/google/adk-docs/blob/main/docs/streaming/custom-streaming.md |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi 👋
I have gotten MCP servers working with ADK but I am trying to figure out to make it work using docker so that the ADK app can be deployed anywhere.
From what i understand now, best practice would be to use docker compose so that each MCP server is a separate container.
I also found out that docker desktop has their own MCP Toolkit now which seems to be great.
Search online, this depo, and the subreddit, docker does not really seem to be something that is used right now when it comes to ADK. Or it could just be that people that are learning it (like me) does not have the skills yet to implement it.
Beta Was this translation helpful? Give feedback.
All reactions