---
title: "Building AI Agents with Docker MCP Toolkit: A Developer’s Real-World Setup"
description: "A GitHub repository question-answering agent is built by running the GitHub MCP Gateway (docker/mcp-gateway) as a container under Docker Compose and connecting a Python agent to it over streamable-http via MCPTools."
url: "https://swe.quest/articles/building-ai-agents-with-docker-mcp-toolkit-a-developer-s-real-world-setup-988aee07496da75c"
canonical: "https://www.docker.com/blog/docker-mcp-ai-agent-developer-setup/"
source: "Docker"
published: "2025-08-19"
difficulty: "medium"
kind: "How-to"
reading_minutes: 6
tags: ["ai-agents","containers","llms"]
---

# Building AI Agents with Docker MCP Toolkit: A Developer’s Real-World Setup

A post on [Docker](https://swe.quest/sources/docker.md), published 2025-08-19, 6 min read, How-to. Original: [https://www.docker.com/blog/docker-mcp-ai-agent-developer-setup/](https://www.docker.com/blog/docker-mcp-ai-agent-developer-setup/)

## Summary

A GitHub repository question-answering agent is built by running the GitHub MCP Gateway (docker/mcp-gateway) as a container under Docker Compose and connecting a Python agent to it over streamable-http via MCPTools. The gateway lists files, fetches content and searches code, and GPT-4o reasons over the results. Setup takes a few commands: store a GitHub token with \`docker mcp secret set\`, run \`docker compose up\`, then run app.py. The main argument is that containerized MCP connectors keep integration code out of the agent and give consistent environments, and new tools such as Jira or Slack can be added as extra Compose services.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- Docker Compose basics ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- Python ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- LLM API usage ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))

## Keywords

Docker MCP Toolkit, MCP Gateway, Docker Compose, Model Context Protocol, GPT-4o, GitHub

## Related posts

- [Breaking Free From AI Vendor Lock-in: Integrating GitHub Models with Docker cagent](https://swe.quest/articles/breaking-free-from-ai-vendor-lock-in-integrating-github-models-with-docker-8fc971be1201fa24.md): Docker · 2025-12-11 · Medium · 7 min read · AI agents, LLMs, Containers
  Docker cagent, an open-source multi-agent runtime driven by declarative YAML, can use GitHub Models as a custom OpenAI-compatible provider.
- [Dynamic MCPs with Docker: Stop Hardcoding Your Agents’ World](https://swe.quest/articles/dynamic-mcps-with-docker-stop-hardcoding-your-agents-world-a530a7120388ea63.md): Docker · 2025-11-06 · Medium · 11 min read · AI agents, LLMs, Sandboxing & isolation, Containers, Developer tools
  Docker MCP Gateway now exposes primordial tools (mcp-find, mcp-add) that let agents search a curated catalog of 270+ MCP servers, add them to the live session, and trigger OAuth or elicitation flows, instead of hand-editing JSON config and restarting.
- [Build and Distribute AI Agents and Workflows with cagent](https://swe.quest/articles/build-and-distribute-ai-agents-and-workflows-with-cagent-f30c9f0bbad13e54.md): Docker · 2025-09-18 · Medium · 7 min read · AI agents, Developer tools, Containers, Open source
  cagent is Docker's open-source command-line runtime that defines AI agents (model, instructions, persona and MCP tools) in a single YAML file and distributes them through OCI registries such as Docker Hub.
- [How to Add MCP Servers to ChatGPT with Docker MCP Toolkit](https://swe.quest/articles/how-to-add-mcp-servers-to-chatgpt-with-docker-mcp-toolkit-8e8db1704dea266e.md): Docker · 2025-12-12 · Medium · 21 min read · AI agents, Containers, LLMs
  Docker MCP Toolkit lets ChatGPT's Developer Mode call real tools by running MCP servers in isolated containers behind a Docker MCP Gateway exposed to ChatGPT via an ngrok tunnel.
- [How to add MCP Servers to Claude Desktop with Docker MCP Toolkit](https://swe.quest/articles/how-to-add-mcp-servers-to-claude-desktop-with-docker-mcp-toolkit-2bef3464ab3fe16c.md): Docker · 2025-10-27 · Medium · 18 min read · AI agents, Containers, AI for coding, Developer tools
  Docker Desktop's MCP Toolkit connects Claude Desktop to containerized MCP servers through a single claude\_desktop\_config.json entry that runs \`docker mcp gateway run\`, a gateway that routes tool calls from Claude to whichever servers are enabled.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
