MCP Setup Guide

How to Set Up GitHub MCP with ClawdBot

Connect ClawdBot to your GitHub repos: read code, search issues, and even open PRs—all via natural language.

Overview

The GitHub MCP lets ClawdBot:

Prerequisites

Step 1 — Create a Personal Access Token

  1. Go to GitHub Settings → Developer settings → Personal access tokens
  2. Click "Generate new token (classic)"
  3. Select scopes:
    • repo — full repository access
    • read:org — read org membership (if using org repos)
  4. Copy the token immediately (you won't see it again)

Step 2 — Choose Your Config Method

Option A: CLI Server (Docker)

Best for local development. Runs in a container, auto-stops when ClawdBot exits.

GitHub CLI Config json
{
  "GitHub": {
    "command": "docker",
    "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"],
    "env": {
      "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
    }
  }
}

Important: Store GITHUB_TOKEN as an environment variable, not plaintext.

Option B: SSE Server (URL)

Simpler setup, uses GitHub Copilot's hosted MCP endpoint.

GitHub SSE Config json
{
  "GitHub": {
    "url": "https://api.githubcopilot.com/mcp/"
  }
}

This method requires GitHub Copilot subscription for full functionality.

Step 3 — Verify

  1. Run clawdbot status — GitHub MCP should show as "running"
  2. Test: "List my recent repositories"
  3. Test: "Search issues in owner/repo with label bug"

Common Errors

ErrorCauseFix
401 Unauthorized Invalid or expired PAT Regenerate token, check expiration
403 Forbidden Missing scopes Add repo and read:org scopes
Docker not found Docker not installed or not running Install Docker Desktop, start daemon
Rate limit exceeded Too many API calls Wait 1 hour or use authenticated requests

Security Notes

Example Prompts

Related MCPs