Skip to content

alokverma18/github-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub MCP Server

A Spring Boot-based custom MCP (Model Context Protocol) server that provides GitHub API integration for any MCP-compatible IDE or AI agent.

🚀 Quick Start

1. Configure Your IDE/Agent

Add to your MCP configuration:

{
  "github": {
    "serverUrl": "https://github-mcp.up.railway.app/mcp",
    "headers": { 
      "GITHUB_TOKEN": "ghp_your_token_here" 
    }
  }
}

2. GitHub Token

Create token at GitHub Settings > Developer settings > Personal access tokens with scopes: repo, read:user

🛠️ Available Tools

  • githubListRepositories - List repositories
  • githubGetAuthenticatedUser - Get user profile
  • githubGetUser - Get user by username
  • githubGetRepository - Get repository details
  • githubListBranches - List repository branches
  • githubListCommits - List repository commits
  • githubSearchRepositories - Search repositories
  • githubSearchCode - Search code in repository
  • githubAnalyzePullRequest - Analyze PR details

📊 Available Resources

  • mcp://github - GitHub overview
  • mcp://github/user - User profile
  • mcp://github/repositories - Repository list
  • mcp://github/stats - Account statistics
  • mcp://github/dashboard - Complete dashboard

🏗️ Architecture

IDE/Agent → HTTP POST /mcp → Spring Security → Spring AI MCP → GitHubTools → GitHub API

🐳 Docker Deployment

Multi-stage Dockerfile for production:

  • Build stage: Maven compilation
  • Runtime stage: Lightweight JDK with JAR

🔧 Development

  • Java 21 + Spring Boot 3.5.11
  • Spring AI MCP Framework
  • Railway-ready deployment
  • CORS enabled for web IDEs

📚 Learn More

See LEARN.md for detailed architecture, MCP protocol, and development guide.

📄 License

MIT License