MCP GitHub Automation Server
Provides tools for interacting with GitHub repositories and issues, including retrieving repository information and listing open issues via the GitHub REST API.
Provides tools for monitoring GitHub Actions workflow status, including checking whether workflows completed successfully and on which branch.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP GitHub Automation ServerShow me the open issues in octocat/Hello-World"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ค MCP GitHub Automation Server
๐ Project Overview
This project demonstrates how to build, containerize, deploy, and automatically update a Model Context Protocol (MCP) server for GitHub automation.
The MCP server is developed using Python and exposes GitHub-related tools that can be discovered and invoked by an MCP-compatible AI application.
The complete application is:
Python MCP Server
โ
GitHub REST API
โ
Docker Container
โ
GitHub Container Registry
โ
AWS EC2
โ
GitHub Actions CI/CDRelated MCP server: GitHubMcpServer
๐ฏ Project Objectives
๐ง Understand Model Context Protocol
๐ Build a custom MCP server
๐ ๏ธ Implement MCP tools
๐ Integrate GitHub REST API
๐ณ Containerize the MCP server
โ๏ธ Deploy the server on AWS EC2
๐ฆ Publish Docker images to GHCR
โ๏ธ Implement GitHub Actions CI/CD
๐ Secure API credentials
๐ Automate application deployment
๐ง What is MCP?
Model Context Protocol (MCP) is a standardized protocol that allows AI applications to interact with external tools, resources, and services.
Instead of creating a separate integration for every AI application and external system, MCP provides a common interface.
โโโโโโโโโโโโโโโโโโโโโโโ
โ AI Application โ
โโโโโโโโโโโโฌโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Client โ
โโโโโโโโโโโโฌโโโโโโโโโโโ
โ
MCP Protocol
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Server โ
โโโโโโโโโโโโฌโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
๐ Tools ๐ Resources ๐ฌ Prompts
โ โ โ
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโ
โ
โผ
External Systems๐ MCP Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AI APPLICATION โ
โ โ
โ ChatGPT / Claude / Other MCP-Compatible AI Application โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ MCP Client โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โ MCP
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AWS EC2 โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Docker Container โ โ
โ โ โ โ
โ โ Python MCP Server โ โ
โ โ โ โ
โ โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ โ
โ โ โ Repository โ โ Issues โ โ Workflows โ โ โ
โ โ โ Tool โ โ Tool โ โ Tool โ โ โ
โ โ โโโโโโโโฌโโโโโโ โโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโโ โ โ
โ โโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ GitHub REST API โ
โโโโโโโโโโฌโโโโโโโโโโ
โ
โผ
๐ GitHub๐ GitHub Automation Use Case
GitHub was selected as the practical MCP use case.
The MCP server provides controlled access to GitHub information through reusable tools.
Problem
AI applications need a standardized and secure way to interact with GitHub repositories, issues, and workflows.
MCP Solution
The MCP server acts as a controlled gateway between the AI application and GitHub.
AI
โ
โผ
MCP Client
โ
โผ
MCP Server
โ
โโโ Repository Information
โโโ Issue Management
โโโ Workflow Monitoring
โ
โผ
GitHub API๐ ๏ธ MCP Tools
Tool | Purpose |
| Retrieve repository information |
| Retrieve open GitHub issues |
| Check GitHub Actions workflow status |
๐ฆ Repository Information
get_repository_info()Returns:
Repository Name
Description
Visibility
Default Branch
Stars
Forks๐ Issue Management
list_issues()Returns open GitHub issues.
Example:
Issue #12
Title: Docker deployment issue
State: OPENโ๏ธ Workflow Monitoring
get_workflow_status()Returns GitHub Actions workflow information.
Example:
Workflow: MCP Server CI/CD
Status: completed
Conclusion: success
Branch: main๐งฐ Technology Stack
Category | Technology |
๐ค Protocol | Model Context Protocol |
๐ Language | Python 3.12 |
๐ SDK | MCP Python SDK |
๐ API | GitHub REST API |
๐ HTTP | HTTPX |
๐ณ Container | Docker |
๐ฆ Registry | GitHub Container Registry |
โ๏ธ Cloud | AWS |
๐ป Compute | EC2 |
๐ง OS | Ubuntu |
โ๏ธ CI/CD | GitHub Actions |
๐ฌ Testing | MCP Inspector |
๐ Transport | Streamable HTTP |
๐ Project Structure
github-mcp-server/
โ
โโโ ๐ server.py
โโโ ๐ requirements.txt
โโโ ๐ณ Dockerfile
โโโ ๐ .dockerignore
โโโ ๐ .gitignore
โโโ ๐ README.md
โ
โโโ .github/
โโโ workflows/
โโโ ๐ deploy.ymlโ๏ธ Environment Configuration
Create a .env file:
GITHUB_TOKEN=your_github_token
GITHUB_OWNER=your_github_username
GITHUB_REPO=your_repository_name๐ Never commit .env
Add the following to .gitignore:
.env
venv/
__pycache__/
*.pyc๐ป Local Development
Clone Repository
git clone https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.gitcd github-mcp-serverCreate Virtual Environment
python -m venv venvLinux:
source venv/bin/activateWindows:
venv\Scripts\activateInstall Dependencies
pip install -r requirements.txtStart Server
python server.py๐ MCP Endpoint
The MCP server uses Streamable HTTP.
Local:
http://localhost:8000/mcpAWS EC2:
http://EC2_PUBLIC_IP:8000/mcpFor production:
https://mcp.example.com/mcp๐ณ Docker
Build Image
docker build -t github-mcp-server .Run Container
docker run -d \
--name mcp-server \
--env-file .env \
-p 8000:8000 \
github-mcp-serverVerify
docker psView Logs
docker logs mcp-server๐ณ Dockerfile
FROM python:3.12-slim
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY server.py .
EXPOSE 8000
CMD ["python", "server.py"]โ๏ธ AWS EC2 Deployment
The MCP server is deployed on an Ubuntu EC2 instance using Docker.
Install Docker
sudo apt update
sudo apt install -y docker.ioEnable Docker:
sudo systemctl enable docker
sudo systemctl start dockerVerify:
docker --versionClone Project
git clone https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.gitcd github-mcp-serverConfigure Environment
nano .envAdd:
GITHUB_TOKEN=your_github_token
GITHUB_OWNER=your_github_username
GITHUB_REPO=your_repository_nameSecure the file:
chmod 600 .envRun MCP Server
docker build -t github-mcp-server .docker run -d \
--name mcp-server \
--restart unless-stopped \
--env-file .env \
-p 8000:8000 \
github-mcp-serverVerify:
docker ps๐ CI/CD Pipeline
๐จโ๐ป Developer
โ
โ git push
โผ
๐ GitHub Repository
โ
โผ
โ๏ธ GitHub Actions
โ
โโโโโโโโโโโดโโโโโโโโโโ
โ โ
โผ โผ
๐งช Test ๐ณ Build
โ โ
โโโโโโโโโโโฌโโโโโโโโโโ
โ
โผ
๐ฆ Docker Image
โ
โผ
๐ฆ GHCR
โ
โผ
๐ SSH Deploy
โ
โผ
โ๏ธ AWS EC2
โ
โผ
๐ณ Docker
โ
โผ
๐ค MCP Serverโ๏ธ GitHub Actions
The pipeline automatically executes when code is pushed to the main branch.
Pipeline Stages
Checkout
โ
Setup Python
โ
Install Dependencies
โ
Run Tests
โ
Build Docker Image
โ
Login to GHCR
โ
Push Docker Image
โ
Connect to EC2
โ
Pull Latest Image
โ
Stop Old Container
โ
Start New Container๐ GitHub Secrets
Configure secrets under:
Repository
โ
Settings
โ
Secrets and variables
โ
ActionsRequired:
EC2_HOST
EC2_USERNAME
EC2_SSH_KEY
GHCR_USERNAME
GHCR_TOKENSecrets must never be committed to GitHub.
๐ฆ GitHub Container Registry
Images are stored in GHCR.
Example:
ghcr.io/YOUR_USERNAME/github-mcp-server:latestCommit-based image:
ghcr.io/YOUR_USERNAME/github-mcp-server:<commit-sha>This provides versioned and reproducible container deployments.
๐งช Testing
Python Syntax Test
python -m py_compile server.pyDocker Build Test
docker build -t github-mcp-server .Container Test
docker psLog Verification
docker logs mcp-server๐ MCP Tool Verification
Connect an MCP-compatible client or MCP Inspector to:
http://localhost:8000/mcpVerify tool discovery:
โ get_repository_info
โ list_issues
โ get_workflow_status๐ Security
Security is critical because MCP servers can provide AI applications with access to external systems.
๐ Secret Management
Never hard-code:
GitHub Tokens
AWS Credentials
SSH Keys
API Keys
PasswordsUse:
GitHub Secrets
Environment Variables
AWS Secrets Manager๐ก๏ธ Least Privilege
GitHub tokens should only receive the permissions required by the MCP tools.
Prefer read-only permissions when write operations are not required.
๐ซ Avoid Dangerous Tools
Avoid unrestricted operations such as:
delete_repository()
delete_branch()
merge_pull_request()
create_deployment()unless proper authorization and confirmation are implemented.
๐ Network Security
Restrict EC2 access.
Recommended:
SSH
Port 22
Source: Your IP/32For production MCP access:
HTTPS
Port 443
Source: Authorized Clients๐ง Prompt Injection Protection
GitHub issues, comments, pull requests, and repository content may contain untrusted instructions.
External content should be treated as data, not automatically as trusted instructions.
๐ Deployment Verification
After making changes:
git add .git commit -m "Update MCP server"git push origin mainGitHub Actions:
๐งช Test โ โ
Passed
๐ณ Docker Build โ โ
Passed
๐ฆ GHCR Push โ โ
Passed
โ๏ธ EC2 Deploy โ โ
PassedEC2:
docker psLogs:
docker logs mcp-server๐ End-to-End Workflow
โโโโโโโโโโโโโโโโโโโ
โ Developer โ
โโโโโโโโโโฌโโโโโโโโโ
โ
git push
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ GitHub โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ GitHub Actions โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโโโโโโดโโโโโโโโโโ
โ โ
โผ โผ
๐งช Test ๐ณ Build
โ โ
โโโโโโโโโโโฌโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ GHCR โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ AWS EC2 โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ Docker Containerโ
โโโโโโโโโโฌโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ MCP Server โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ GitHub API โ
โโโโโโโโโโโโโโโโโโโ๐ MCP Concepts Covered
Concept | Description |
MCP Client | Connects AI applications to MCP servers |
MCP Server | Exposes capabilities to MCP clients |
Tools | Executable functions |
Resources | Data/context exposed to clients |
Prompts | Reusable interaction templates |
Transport | Communication mechanism |
Tool Discovery | Client discovers available tools |
Tool Invocation | Client calls a selected tool |
๐ Key DevOps Practices
SOURCE CONTROL
โ
โผ
GIT
โ
โผ
CI/CD PIPELINE
โ
โผ
AUTOMATED TEST
โ
โผ
DOCKER BUILD
โ
โผ
CONTAINER REGISTRY
โ
โผ
CLOUD DEPLOYMENT
โ
โผ
RUNTIME SECRETS
โ
โผ
SECURITYโจ Project Highlights
๐ค Custom MCP server built with Python
๐ GitHub REST API integration
๐ ๏ธ Three reusable MCP tools
๐ Streamable HTTP transport
๐ณ Docker containerization
๐ฆ GitHub Container Registry
โ๏ธ AWS EC2 deployment
โ๏ธ GitHub Actions CI/CD
๐ Secure secret management
๐ก๏ธ Least-privilege access
๐ Automated deployment
๐งช Automated validation
๐ GitHub workflow monitoring
๐ฎ Future Enhancements
HTTPS
โ
Custom Domain
โ
AWS ALB
โ
AWS Secrets Manager
โ
Amazon ECR
โ
Amazon ECS
โ
Kubernetes
โ
Terraform
โ
Prometheus
โ
GrafanaPotential MCP improvements:
๐ Repository search
๐ Pull request management
๐ Create GitHub issues
๐ฌ Pull request comments
๐ท๏ธ GitHub label management
๐ Authentication and authorization
๐ฆ Rate limiting
๐ Monitoring and observability
๐ก๏ธ Container vulnerability scanning
๐ Skills Demonstrated
Model Context Protocol
Python
GitHub REST API
Docker
AWS EC2
GitHub Actions
GHCR
Linux
Git
CI/CD
REST APIs
Cloud Security
Containerization
Automation๐ Learning Outcomes
By completing this project, the following concepts were implemented and understood:
Model Context Protocol
MCP Client and Server architecture
MCP Tools
MCP Resources
MCP Prompts
Tool discovery
Tool invocation
GitHub API integration
Python MCP development
Streamable HTTP
Docker containerization
GHCR
AWS EC2
GitHub Actions
CI/CD automation
Secret management
Cloud security
Automated deployment
๐ผ Resume Project Description
MCP GitHub Automation Server | Python, MCP, Docker, AWS EC2, GitHub Actions
Developed and deployed a Python-based Model Context Protocol server for GitHub automation, exposing tools for repository information, issue retrieval, and GitHub Actions workflow monitoring. Containerized the application using Docker, published images to GitHub Container Registry, deployed on AWS EC2, and implemented GitHub Actions CI/CD for automated testing, image publishing, and remote deployment. Applied secure credential management, least-privilege access, and cloud network security practices.
๐จโ๐ป Author
Venu Gopala Reddy Eppala
Cloud & DevOps Engineer
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityNot gradedmaintenanceEnables AI agents to interact with GitHub repositories through the GitHub REST API for managing files, issues, and repository metadata. It supports both read operations like searching code and write operations such as creating repositories and updating issue comments.9
- FlicenseNot gradedqualityDmaintenanceExposes GitHub REST API operations as AI-ready tools for managing repositories, tracking push history, and updating settings. It enables LLM agents to perform tasks like creating repositories, retrieving metadata, and monitoring branch activity through a standardized interface.
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to analyze GitHub repositories, including fetching repository details, searching, and retrieving README content.4672ISC
- FlicenseCqualityBmaintenanceEnables AI assistants to interact with GitHub repositories via the REST API, supporting repository listing, detail retrieval, and issue management.2
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analyโฆ
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/venugopalareddy46/github-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server