A Model Context Protocol (MCP) server that provides access to GitHub's REST API.
├── cmd/github-mcp/ # Application entry point
├── internal/
│ ├── config/ # Configuration management
│ ├── server/ # HTTP server implementation
│ ├── logger/ # Structured logging
│ └── errors/ # Error handling
├── pkg/ # Public packages (future)
├── test/ # Test files
└── docs/ # Documentation
- Go 1.20 or later
- GitHub Personal Access Token
go build -o bin/github-mcp ./cmd/github-mcpexport GITHUB_PERSONAL_ACCESS_TOKEN=your_token_here
./bin/github-mcpThe server can be configured using environment variables:
| Variable | Description | Default | Required |
|---|---|---|---|
GITHUB_PERSONAL_ACCESS_TOKEN |
GitHub Personal Access Token | - | Yes |
PORT |
Server port | 8080 | No |
HOST |
Server host | 0.0.0.0 | No |
LOG_LEVEL |
Log level (DEBUG, INFO, WARN, ERROR) | INFO | No |
LOG_FORMAT |
Log format (json, text) | json | No |
CACHE_TTL |
Cache TTL in seconds | 60 | No |
MAX_CONCURRENT_REQUESTS |
Maximum concurrent requests | 100 | No |
- Health:
GET /health - Readiness:
GET /ready
This is the initial infrastructure setup. The following components are implemented:
- ✅ Go project structure
- ✅ Configuration loading from environment variables
- ✅ Structured logging with configurable levels and formats
- ✅ Basic HTTP server with middleware
- ✅ Error handling with typed errors
- ✅ Health and readiness endpoints
- ✅ MCP protocol implementation
- ✅ GitHub API client
- Implement GitHub API authentication and client
- Implement MCP protocol support
- Add GitHub API endpoint mappings (Users, Organizations, Teams)
- Add comprehensive testing (Users, Organizations, Teams APIs)
- Add Docker containerization