Implements GitHub API integration server for MCP, handling authentication and proxying requests to GitHub endpoints.
// Source: https://github.com/github/github-mcp-server | License: MIT | Copyright 2025 GitHub
// Provided via justclaw.it.com; keep this notice with the code.
package github
import (
"context"
"encoding/json"
"fmt"
"log/slog"
"strings"
"time"
gherrors "github.com/github/github-mcp-server/pkg/errors"
"github.com/github/github-mcp-server/pkg/inventory"
"github.com/github/github-mcp-server/pkg/octicons"
"github.com/github/github-mcp-server/pkg/translations"
"github.com/github/github-mcp-server/pkg/utils"
"github.com/modelcontextprotocol/go-sdk/mcp"
)
type MCPServerConfig struct {
// Version of the server
Version string
// GitHub Host to target for API requests (e.g. github.com or github.enterprise.com)
Host string
// GitHub Token to authenticate with the GitHub API
Toke
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key