DevOps  

Seamless GitHub Integration with Docker MCP and AI Tools

Imagine sipping your morning coffee while telling Docker to do your GitHub chores for you. It sounds like sci-fi, but thanks to Docker’s new AI tools, it’s real. Docker’s AI Agent (sometimes nicknamed “Gordon”) can now talk to GitHub on your behalf. Under the hood, Docker uses something called the Model Context Protocol (MCP), which is basically a way for AI tools to connect to services like GitHub securely. In this guide, we’ll walk through setting up the GitHub MCP tool so that you can say “create a repo” in plain English and watch Docker make it happen. We’ll keep it simple, with step-by-step instructions, clear explanations, and even a few fun stories. By the end, you’ll see how Docker MCP can save you time and headaches with GitHub tasks.

Seamless GitHub Integration with Docker MCP and AI Tools

What Is Docker’s GitHub MCP Tool?

First, a quick overview in plain terms. The Model Context Protocol (MCP) is like a special language that lets AI assistants and software talk to outside tools or data sources. In this case, the GitHub MCP tool is a little piece of software (an “MCP server”) that knows how to use the GitHub API. Docker’s AI Agent uses MCP to ask that tool to do things like create repositories, list issues, or update files on GitHub. In short, the GitHub MCP server “provides seamless integration with GitHub APIs,” enabling all sorts of automated tasks. Think of it as a bridge between Docker’s AI helper and your GitHub account.

Here’s the payoff: once set up, you can just type or speak something like “Docker, create a new GitHub repo called AwesomeProject,” and the AI agent will do it – no browser clicks needed. It will log into GitHub using the credentials you gave it (via a Personal Access Token), and run the commands for you. This is a big time-saver. For example, I once needed to spin up five similar repos for a demo. Normally I’d open GitHub, click “New repository” five times, fill in forms… a headache. Instead, I set up Docker’s GitHub tool and said “create repos alpha, beta, gamma, delta, epsilon.” By the time I finished my coffee, all five repos existed. My cat was impressed.

A few important points before we jump in: you’ll need Docker Desktop installed (at least version 4.39 or later) because the MCP features are new to Docker Desktop. You’ll also need a GitHub Personal Access Token (PAT), which is basically a special password that lets Docker’s tool act on your GitHub account. Don’t worry – we’ll explain exactly how to create that. Finally, the Docker Desktop AI Tool Catalog will handle discovering the GitHub tool and storing your token securely. The catalog ensures you don’t have to mess around with credential files yourself. Let’s go step by step.

Step 1. Create a GitHub Personal Access Token (PAT)

To let Docker’s AI Agent access GitHub, you need a Personal Access Token. This is like a secret password that you generate on GitHub, which the AI tool will use instead of your actual login. It’s better than using your real password and you can control what it’s allowed to do. Here’s how to get one:

  • Sign into GitHub: Go to GitHub.com and log in to your account.
  • Open Settings: Click your profile picture (top right) and choose Settings.
  • Go to Developer Settings: On the left sidebar, scroll down and click Developer settings.
  • Choose Personal Access Tokens: Click Personal access tokens, then Tokens (classic) (if prompted).
  • Generate a new token: Click Generate new token, then choose Generate new token (classic) if asked.
  • Give it a name: For example, name it “Docker MCP GitHub” so you know why you made it.
  • Select scopes (permissions): Check the boxes next to:
    • repo: (Full control of private repositories) – this lets the tool create repos, push code, etc.
    • workflow: (if you plan to use GitHub Actions workflows)
    • read:org: (if you need access to organization info)
  • These are suggestions; you only need to grant the permissions that your tasks require. For instance, to create and update repos, the repo scope is essential.
  • Generate and copy: Click Generate token. GitHub will show you a long string. Copy it right away (and save it somewhere safe for now) because you won’t see it again.

That’s it! You’ve got a GitHub token. You’ll use this token in Docker so the AI tool can authenticate with GitHub. Just remember: treat this token like a password – keep it secure.

Step 2. Install Docker Desktop and AI Tool Catalog

Next, make sure you have Docker Desktop installed and updated. Go to Docker.com and download the latest Docker Desktop for your OS (Windows, Mac, etc.). Version 4.39 and above includes the new AI features we need. After installation, launch Docker Desktop and wait until it’s running.

Inside Docker Desktop, we’ll need an extension called the AI Tool Catalog. This extension provides a catalog of MCP tools (like the GitHub tool) and handles connecting them to the Docker AI agent. By default, Docker might prompt you to install this when you first run an AI command, but you can do it manually:

  • Open Extensions: In Docker Desktop’s sidebar, click on Extensions (it looks like a puzzle piece, or you might see “Manage Extensions”).
  • Find AI Tool Catalog: In the Extensions panel or store, search for AI Tool Catalog and click Install. This will add the AI Tools Catalog to Docker Desktop.
  • Trust the extension: Accept any prompts. The AI Tool Catalog lets you “explore different MCP servers” and connect them easily.

Installing the AI Tool Catalog is like adding an app store for AI connectors. Once it’s in place, you can browse available tools (GitHub being one of them), set up secrets, and flip them on—all through a friendly interface.

Step 3. Configure the GitHub MCP Tool in Docker

Now for the exciting part: telling Docker about GitHub.

  • Open AI Tool Catalog: In Docker Desktop, go to Extensions → AI Tool Catalog.
  • Find the GitHub tool: Search or scroll until you see a tool named GitHub (it may say “GitHub MCP Server” or similar). Click to open its detail page.
  • Go to Config & Secrets: There should be a tab or section labelled “Config & Secrets.” This is where you link your GitHub token.
  • Add your GitHub token:
    • Option A (UI): If there’s a field or button to add a secret, paste your PAT string into the GITHUB_PERSONAL_ACCESS_TOKEN field and save it.
    • Option B (CLI): If you prefer using the terminal, you can run a Docker command. Open a terminal (PowerShell, Bash, etc.) and type:
      docker mcp secret set GITHUB_PERSONAL_ACCESS_TOKEN=<YOUR_TOKEN_HERE>
    • replacing <YOUR_TOKEN_HERE> With the token you copied. For example:
      docker mcp secret set GITHUB_PERSONAL_ACCESS_TOKEN=ghp_abcd1234XYZ...
    • This command stores your token securely inside Docker. The tool will encrypt it and only share it with the GitHub tool when needed. It’s a bit like saving your Wi-Fi password so apps can use it without asking you every time.
  • Enable the GitHub tool: After setting the token, go back to Docker Desktop. Flip the switch or toggle that says “Enable GitHub” or similar. The status should change to Enabled and any warnings about missing secrets should vanish.


Related Image: © Docker

At this point, Docker knows about the GitHub tool and has your token stored safely. As Docker’s blog notes, the AI Tool Catalog “securely handles [s] and injects [s] API keys” so you don’t have to juggle credentials yourself. Your GitHub token is encrypted and only given to the tool when it runs, meaning you’re not pasting it into scripts or exposing it to risk.

Step 4. Try It Out – Creating a Repository with Docker AI

Okay, time to see the magic. With the tool enabled, you can now ask Docker’s AI to do GitHub tasks. Docker’s AI Agent (Ask Gordon) understands natural language.

Just type docker ai and your request, and Docker will use any MCP servers you configured.

For example, let’s create a new GitHub repo. In your terminal, run:

docker ai "create a repo called my-awesome-repo on my GitHub"

You can phrase it how you like, but simple and clear requests work best. After a moment, you might see output like:

• Calling create_repository...
The repository "my-awesome-repo" has been created on your GitHub account.
Access it here: https://github.com/yourusername/my-awesome-repo
Let me know if you need help with anything else!
👍 Helpful 👎 Not helpful

Don’t worry if your exact text is slightly different; the idea is that the AI confirms it ran the “create repository” command successfully. What happened? Docker’s AI took your plain-English command, routed it through the GitHub MCP tool (using your token to authenticate), and made the API call to GitHub to create the repository. It even provided you with a clickable link.

This is huge for productivity: no GitHub website needed. I remember showing this to a skeptical colleague. I typed docker ai "create repo test123" and hit Enter. In seconds, Docker said, “Created ‘test123’ – here’s the link!” He blinked twice. We both laughed. Automating that tedious click-and-typing process saved us a few minutes – and possibly prevented errors from doing it by hand.

You can repeat this for other GitHub tasks too. For example, try:

docker ai "list issues in my-awesome-repo"

or

docker ai "add an issue to my-awesome-repo titled 'Bug in AI demo'"

The exact commands depend on what the GitHub tool supports, but in general, it can handle repository creation, file changes, issues, and more. Basically, any GitHub API call it knows can be done via a friendly request.

Under the hood, Docker’s blog explains, the AI agent integrates with external services via MCP. It found the gordon-mcp.yml config or used the catalog, saw GitHub was enabled, and made the call. Because the tool was enabled, Docker used the GitHub API to perform your request. The result is the same as if you had clicked around on GitHub, except much faster and without leaving your terminal.


Related Image: © Docker


Related Image: © Docker

This demonstrates the power of Docker MCP and how it integrates with the GitHub API. Docker AI was able to:

  1. Connect to your GitHub account using the credentials you configured earlier
  2. Create a new repository called "modelorbital" under your username
  3. Provide you with the direct link to access it: https://github.com/username/modelorbital

The repository is now ready for you to use. You can start pushing code to it, add descriptions, set up GitHub Pages, or perform any other GitHub operations.

This is a perfect example of how Docker MCP simplifies integrating AI assistants with external tools. Without having to manually perform these actions in the GitHub interface, you were able to create a repository with a simple natural language command.

Step 5. Explore Other Uses

Creating repos is just one example. Think of GitHub MCP as a universal GitHub plugin for your AI assistant. Here are some other things you might try:

  • Pull in code or files: Ask Docker to fetch a file or search your repos.
  • Make a new issue or PR: E.g. “create an issue in my-awesome-repo about missing README” or “list open pull requests”.
  • File operations: The GitHub tool can often update files, commit changes, or even run code searches.
  • Analysing stats: You could say “how many stars does my-awesome-repo have?” or “list recent commits”. (Results depend on tool support, but many GitHub actions are possible.)
  • Automation workflows: Something like “open a pull request for branch feature-x into main”.

The GitHub MCP server was built for “automating GitHub workflows and processes” and for “extracting and analyzing data from GitHub repositories”. So if you’re adventurous, you could script complex tasks: imagine updating documentation in multiple repos with a single command, or bulk-closing old issues.

From personal experience, I found it helpful to have Docker push small code changes, too. For example, I wrote a quick README on my laptop, then ran docker ai "commit file README.md to my-awesome-repo with message 'Add project description'". Instantly, the file was in GitHub. It felt like magic – like talking to my project instead of typing git commands. And because Docker used my personal token, every action showed up as me on GitHub, just as if I did it manually.

Conclusion. Your New AI-Powered Dev Assistant

Congratulations – you’ve set up Docker’s GitHub MCP tool and seen it in action! What started as a handful of setup steps has given you a powerful helper. No more copying and pasting tokens, no more juggling browser tabs. Instead, you can keep coding or designing, and simply ask Docker’s AI to do routine GitHub work. It’s like having a diligent junior developer who speaks your language.

More importantly, this approach is secure and maintainable. Docker took care of the tricky parts: storing your GitHub token safely, connecting to the GitHub API, and handling all the communication via the MCP standard. You didn’t have to write any code or edit hidden config files. As the Docker team explains, this makes “AI tools more accessible, secure, and manageable” by using the same “build once, run anywhere” philosophy we love in containers. Your credentials stay encrypted, and the AI agent only uses them when absolutely needed, preventing leaks or mistakes.

Reference