How github/github-mcp-server works
GitHub MCP Server exposes GitHub capabilities to AI hosts over stdio or HTTP, with optional OAuth/PAT authentication. Requests are served through MCP, filtered by tool inventory and scopes, then handled by GitHub tool/resource implementations. The README also documents repository, issue/PR, Actions, code-analysis, and collaboration use cases; their individual handlers are represented by their source directories because those files were not sampled. UI apps provide interactive issue and pull-request experiences. Edges reflect shown calls or documented product relationships; unsampled feature internals are not inferred.
Main entry points: main.go Server CLI · github/server.go GitHub MCP server · ghmcp/server.go Stdio MCP server · App.tsx Issue app
Components 21
Entry and authentication
- Server CLI
cmd/github-mcp-server/main.go - OAuth flow
internal/ghmcp/oauth.go
MCP request serving
- HTTP server
pkg/http/server.go - HTTP MCP handler
pkg/http/handler.go - Stdio MCP server
internal/ghmcp/server.go - Tool inventory
pkg/inventory/registry.go - GitHub MCP server
pkg/github/server.go
GitHub capabilities
- Repository tools
pkg/github - Repository resources
pkg/github/repository_resource.go - Issue tools
pkg/github - Pull request tools
pkg/github - Actions and workflows
pkg/github - Security analysis
pkg/github - Team collaboration
pkg/github
Interactive apps
- Issue app
ui/src/apps/issue-write/App.tsx - PR creation app
ui/src/apps/pr-write/App.tsx - PR editing app
ui/src/apps/pr-edit/App.tsx - MCP app bridge
ui/src/hooks/useMcpApp.ts - App presentation
ui/src/components/AppProvider.tsx
Other components
- AI host
- GitHub platform
Connections 26
- AI host → Server CLI: starts server
README.md - Server CLI → Stdio MCP server: runs stdio
cmd/github-mcp-server/main.go - Server CLI → HTTP server: runs HTTP
cmd/github-mcp-server/main.go - Server CLI → OAuth flow: configures login
cmd/github-mcp-server/main.go - HTTP server → HTTP MCP handler: registers routes
pkg/http/server.go - HTTP MCP handler → GitHub MCP server: creates server
pkg/http/handler.go - Stdio MCP server → Tool inventory: builds inventory
internal/ghmcp/server.go - Stdio MCP server → GitHub MCP server: creates server
internal/ghmcp/server.go - GitHub MCP server → Tool inventory: registers capabilities
pkg/github/server.go - GitHub MCP server → GitHub platform: serves GitHub access
README.md - Repository tools → GitHub platform: queries platform
README.md - Repository resources → GitHub platform: fetches content
pkg/github/repository_resource.go - Issue tools → GitHub platform: manages issues
README.md - Pull request tools → GitHub platform: manages pull requests
README.md - Actions and workflows → GitHub platform: analyzes workflows
README.md - Security analysis → GitHub platform: reads findings
README.md - Team collaboration → GitHub platform: supports teamwork
README.md - AI host → Issue app: opens app
- AI host → PR creation app: opens app
- AI host → PR editing app: opens app
- Issue app → MCP app bridge: uses bridge
ui/src/apps/issue-write/App.tsx - PR creation app → MCP app bridge: uses bridge
ui/src/apps/pr-write/App.tsx - PR editing app → MCP app bridge: uses bridge
ui/src/apps/pr-edit/App.tsx - Issue app → App presentation: renders within
ui/src/apps/issue-write/App.tsx - PR creation app → App presentation: renders within
ui/src/apps/pr-write/App.tsx - PR editing app → App presentation: renders within
ui/src/apps/pr-edit/App.tsx