Skip to main content
Glama
venugopalareddy46

MCP GitHub Automation Server

README.md
# ๐Ÿค– MCP GitHub Automation Server

<p align="center">
  <img src="https://capsule-render.vercel.app/api?type=venom&height=260&text=MCP%20GitHub%20Automation&fontSize=42&fontColor=ffffff&color=0:0f172a,50:1e3a8a,100:4f46e5&stroke=6366f1&strokeWidth=2&animation=twinkling&fontAlignY=45" width="100%"/>
</p>

<p align="center">
  <strong>AI-Powered GitHub Automation using Model Context Protocol</strong>
</p>

<p align="center">
  <a href="#">
    <img src="https://img.shields.io/badge/Model%20Context%20Protocol-MCP-6366F1?style=for-the-badge&logo=probot&logoColor=white"/>
  </a>
  <a href="#">
    <img src="https://img.shields.io/badge/Python-3.12-3776AB?style=for-the-badge&logo=python&logoColor=white"/>
  </a>
  <a href="#">
    <img src="https://img.shields.io/badge/Docker-Containerized-2496ED?style=for-the-badge&logo=docker&logoColor=white"/>
  </a>
  <a href="#">
    <img src="https://img.shields.io/badge/AWS-EC2-FF9900?style=for-the-badge&logo=amazonaws&logoColor=white"/>
  </a>
</p>

<p align="center">
  <a href="#">
    <img src="https://img.shields.io/badge/GitHub-Automation-181717?style=for-the-badge&logo=github&logoColor=white"/>
  </a>
  <a href="#">
    <img src="https://img.shields.io/badge/GitHub%20Actions-CI%2FCD-2088FF?style=for-the-badge&logo=githubactions&logoColor=white"/>
  </a>
  <a href="#">
    <img src="https://img.shields.io/badge/GHCR-Container%20Registry-181717?style=for-the-badge&logo=github&logoColor=white"/>
  </a>
  <a href="#">
    <img src="https://img.shields.io/badge/Linux-Ubuntu-E95420?style=for-the-badge&logo=ubuntu&logoColor=white"/>
  </a>
</p>

---

## ๐Ÿ“Œ 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:

```text
Python MCP Server
        โ†“
GitHub REST API
        โ†“
Docker Container
        โ†“
GitHub Container Registry
        โ†“
AWS EC2
        โ†“
GitHub Actions CI/CD
````

---

## ๐ŸŽฏ 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.

```text
                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                     โ”‚    AI Application   โ”‚
                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚
                                โ–ผ
                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                     โ”‚      MCP Client     โ”‚
                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚
                         MCP Protocol
                                โ”‚
                                โ–ผ
                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                     โ”‚      MCP Server     โ”‚
                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚
             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
             โ”‚                  โ”‚                  โ”‚
             โ–ผ                  โ–ผ                  โ–ผ
          ๐Ÿ›  Tools          ๐Ÿ“š Resources       ๐Ÿ’ฌ Prompts
             โ”‚                  โ”‚                  โ”‚
             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚
                                โ–ผ
                       External Systems
```

---

# ๐Ÿ”Œ MCP Architecture

```text
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      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.

```text
AI
 โ”‚
 โ–ผ
MCP Client
 โ”‚
 โ–ผ
MCP Server
 โ”‚
 โ”œโ”€โ”€ Repository Information
 โ”œโ”€โ”€ Issue Management
 โ””โ”€โ”€ Workflow Monitoring
 โ”‚
 โ–ผ
GitHub API
```

---

# ๐Ÿ› ๏ธ MCP Tools

| Tool                    | Purpose                              |
| ----------------------- | ------------------------------------ |
| `get_repository_info()` | Retrieve repository information      |
| `list_issues()`         | Retrieve open GitHub issues          |
| `get_workflow_status()` | Check GitHub Actions workflow status |

---

## ๐Ÿ“ฆ Repository Information

```text
get_repository_info()
```

Returns:

```text
Repository Name
Description
Visibility
Default Branch
Stars
Forks
```

---

## ๐Ÿ› Issue Management

```text
list_issues()
```

Returns open GitHub issues.

Example:

```text
Issue #12
Title: Docker deployment issue
State: OPEN
```

---

## โš™๏ธ Workflow Monitoring

```text
get_workflow_status()
```

Returns GitHub Actions workflow information.

Example:

```text
Workflow: MCP Server CI/CD
Status: completed
Conclusion: success
Branch: main
```

---

# ๐Ÿงฐ Technology Stack

<p align="center">

<img src="https://skillicons.dev/icons?i=python,docker,aws,ubuntu,github,git,githubactions&perline=7" />

</p>

| 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

```text
github-mcp-server/
โ”‚
โ”œโ”€โ”€ ๐Ÿ“„ server.py
โ”œโ”€โ”€ ๐Ÿ“„ requirements.txt
โ”œโ”€โ”€ ๐Ÿณ Dockerfile
โ”œโ”€โ”€ ๐Ÿ“„ .dockerignore
โ”œโ”€โ”€ ๐Ÿ“„ .gitignore
โ”œโ”€โ”€ ๐Ÿ“„ README.md
โ”‚
โ””โ”€โ”€ .github/
    โ””โ”€โ”€ workflows/
        โ””โ”€โ”€ ๐Ÿš€ deploy.yml
```

---

# โš™๏ธ Environment Configuration

Create a `.env` file:

```env
GITHUB_TOKEN=your_github_token
GITHUB_OWNER=your_github_username
GITHUB_REPO=your_repository_name
```

### ๐Ÿ” Never commit `.env`

Add the following to `.gitignore`:

```gitignore
.env
venv/
__pycache__/
*.pyc
```

---

# ๐Ÿ’ป Local Development

## Clone Repository

```bash
git clone https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.git
```

```bash
cd github-mcp-server
```

## Create Virtual Environment

```bash
python -m venv venv
```

Linux:

```bash
source venv/bin/activate
```

Windows:

```powershell
venv\Scripts\activate
```

## Install Dependencies

```bash
pip install -r requirements.txt
```

## Start Server

```bash
python server.py
```

---

# ๐ŸŒ MCP Endpoint

The MCP server uses **Streamable HTTP**.

Local:

```text
http://localhost:8000/mcp
```

AWS EC2:

```text
http://EC2_PUBLIC_IP:8000/mcp
```

For production:

```text
https://mcp.example.com/mcp
```

---

# ๐Ÿณ Docker

## Build Image

```bash
docker build -t github-mcp-server .
```

## Run Container

```bash
docker run -d \
  --name mcp-server \
  --env-file .env \
  -p 8000:8000 \
  github-mcp-server
```

## Verify

```bash
docker ps
```

## View Logs

```bash
docker logs mcp-server
```

---

# ๐Ÿณ Dockerfile

```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

```bash
sudo apt update
sudo apt install -y docker.io
```

Enable Docker:

```bash
sudo systemctl enable docker
sudo systemctl start docker
```

Verify:

```bash
docker --version
```

---

## Clone Project

```bash
git clone https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.git
```

```bash
cd github-mcp-server
```

---

## Configure Environment

```bash
nano .env
```

Add:

```env
GITHUB_TOKEN=your_github_token
GITHUB_OWNER=your_github_username
GITHUB_REPO=your_repository_name
```

Secure the file:

```bash
chmod 600 .env
```

---

## Run MCP Server

```bash
docker build -t github-mcp-server .
```

```bash
docker run -d \
  --name mcp-server \
  --restart unless-stopped \
  --env-file .env \
  -p 8000:8000 \
  github-mcp-server
```

Verify:

```bash
docker ps
```

---

# ๐Ÿ”„ CI/CD Pipeline

<p align="center">
  <img src="https://capsule-render.vercel.app/api?type=rect&color=0:111827,100:2563EB&height=100&section=header&text=Automated%20CI%2FCD%20Pipeline&fontSize=30&fontColor=FFFFFF" width="100%"/>
</p>

```text
                 ๐Ÿ‘จโ€๐Ÿ’ป 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

```text
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:

```text
Repository
    โ†“
Settings
    โ†“
Secrets and variables
    โ†“
Actions
```

Required:

```text
EC2_HOST
EC2_USERNAME
EC2_SSH_KEY
GHCR_USERNAME
GHCR_TOKEN
```

Secrets must never be committed to GitHub.

---

# ๐Ÿ“ฆ GitHub Container Registry

Images are stored in GHCR.

Example:

```text
ghcr.io/YOUR_USERNAME/github-mcp-server:latest
```

Commit-based image:

```text
ghcr.io/YOUR_USERNAME/github-mcp-server:<commit-sha>
```

This provides versioned and reproducible container deployments.

---

# ๐Ÿงช Testing

## Python Syntax Test

```bash
python -m py_compile server.py
```

## Docker Build Test

```bash
docker build -t github-mcp-server .
```

## Container Test

```bash
docker ps
```

## Log Verification

```bash
docker logs mcp-server
```

---

# ๐Ÿ”Ž MCP Tool Verification

Connect an MCP-compatible client or MCP Inspector to:

```text
http://localhost:8000/mcp
```

Verify tool discovery:

```text
โœ“ 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:

```text
GitHub Tokens
AWS Credentials
SSH Keys
API Keys
Passwords
```

Use:

```text
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:

```text
delete_repository()
delete_branch()
merge_pull_request()
create_deployment()
```

unless proper authorization and confirmation are implemented.

---

### ๐ŸŒ Network Security

Restrict EC2 access.

Recommended:

```text
SSH
Port 22
Source: Your IP/32
```

For production MCP access:

```text
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:

```bash
git add .
```

```bash
git commit -m "Update MCP server"
```

```bash
git push origin main
```

GitHub Actions:

```text
๐Ÿงช Test        โ†’ โœ… Passed
๐Ÿณ Docker Build โ†’ โœ… Passed
๐Ÿ“ฆ GHCR Push   โ†’ โœ… Passed
โ˜๏ธ EC2 Deploy  โ†’ โœ… Passed
```

EC2:

```bash
docker ps
```

Logs:

```bash
docker logs mcp-server
```

---

# ๐Ÿ” End-to-End Workflow

```text
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚    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

```text
                 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

```text
HTTPS
  โ†“
Custom Domain
  โ†“
AWS ALB
  โ†“
AWS Secrets Manager
  โ†“
Amazon ECR
  โ†“
Amazon ECS
  โ†“
Kubernetes
  โ†“
Terraform
  โ†“
Prometheus
  โ†“
Grafana
```

Potential 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

<p align="center">
  <img src="https://skillicons.dev/icons?i=python,docker,aws,linux,github,git,githubactions,terraform,kubernetes&perline=9" />
</p>

```text
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**

<p align="left">
  <img src="https://img.shields.io/badge/AWS-Cloud-FF9900?style=flat-square&logo=amazonaws&logoColor=white"/>
  <img src="https://img.shields.io/badge/Docker-Containers-2496ED?style=flat-square&logo=docker&logoColor=white"/>
  <img src="https://img.shields.io/badge/Kubernetes-Orchestration-326CE5?style=flat-square&logo=kubernetes&logoColor=white"/>
  <img src="https://img.shields.io/badge/Terraform-IaC-7B42BC?style=flat-square&logo=terraform&logoColor=white"/>
  <img src="https://img.shields.io/badge/CI%2FCD-Automation-2088FF?style=flat-square&logo=githubactions&logoColor=white"/>
</p>

---

<p align="center">
  <img src="https://capsule-render.vercel.app/api?type=waving&color=0:4F46E5,50:1E3A8A,100:0F172A&height=120&section=footer" width="100%"/>
</p>

<p align="center">
  <strong>Built with MCP โ€ข Docker โ€ข AWS โ€ข GitHub Actions</strong>
</p>