Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ dist-ssr
*.njsproj
*.sln
*.sw?
/CLAUDE.md
324 changes: 324 additions & 0 deletions ARCHITECTURE.md

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,19 @@ Then open http://localhost in your browser.

### Manual Setup (Development)

**1. Start MCP Server:**
**1. Pull MCP Server Docker image:**
```bash
cd ../GitHub_MCP_Server
source venv/bin/activate
python main.py
docker pull ghcr.io/sperekrestova/github-mcp-server:latest
```

**2. Start MCP Bridge:**
```bash
cd mcp-bridge
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your GITHUB_TOKEN and GITHUB_ORGANIZATION
python main.py
```

Expand All @@ -83,6 +85,8 @@ npm run dev
**4. Open your browser:**
Navigate to http://localhost:5173

**Note:** The MCP Server runs automatically as a Docker container spawned by the MCP Bridge. You don't need to start it separately.

## Environment Variables

### Frontend (.env)
Expand Down
20 changes: 6 additions & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
version: '3.8'

services:
# MCP Server (Not in current repo, so commented out)
# Uncomment if GitHub_MCP_Server is in a sibling directory
# mcp-server:
# build: ../GitHub_MCP_Server
# environment:
# - GITHUB_TOKEN=${GITHUB_TOKEN}
# - GITHUB_API_BASE_URL=https://api.github.com
# networks:
# - mcp-network
# restart: unless-stopped

# MCP Bridge
# The bridge spawns MCP Server containers as needed using Docker
mcp-bridge:
build: ./mcp-bridge
ports:
- "3001:3001"
environment:
- PORT=3001
- GITHUB_ORGANIZATION=${GITHUB_ORGANIZATION}
- MCP_SERVER_PATH=../GitHub_MCP_Server/main.py
- GITHUB_TOKEN=${GITHUB_TOKEN}
- MCP_SERVER_IMAGE=ghcr.io/sperekrestova/github-mcp-server:latest
- CACHE_TTL_SECONDS=300
- CACHE_ENABLED=true
- CORS_ORIGINS=http://localhost,https://yourdomain.com
- LOG_LEVEL=INFO
# depends_on:
# - mcp-server
networks:
- mcp-network
restart: unless-stopped
# Mount Docker socket to allow bridge to run MCP Server containers
volumes:
- /var/run/docker.sock:/var/run/docker.sock

# Frontend
frontend:
Expand Down
9 changes: 5 additions & 4 deletions mcp-bridge/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ HOST=0.0.0.0
# GitHub Organization
GITHUB_ORGANIZATION=your-org-name

# MCP Server Configuration (separate repository)
# The MCP Server should be cloned separately to /home/user/GitHub_MCP_Server/
MCP_SERVER_PATH=/home/user/GitHub_MCP_Server/main.py
MCP_SERVER_TYPE=stdio
# MCP Server Configuration (Docker image)
# The MCP Server runs as a Docker container
# Default image: ghcr.io/sperekrestova/github-mcp-server:latest
# See: https://github.com/SPerekrestova/GitHub_MCP_Server
MCP_SERVER_IMAGE=ghcr.io/sperekrestova/github-mcp-server:latest

# Cache Configuration
CACHE_TTL_SECONDS=300
Expand Down
34 changes: 34 additions & 0 deletions mcp-bridge/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# MCP Bridge Dockerfile
FROM python:3.10-slim

# Install Docker CLI (needed to spawn MCP Server containers)
RUN apt-get update && \
apt-get install -y docker.io && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Create app directory
WORKDIR /app

# Copy requirements and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY . .

# Create non-root user
RUN useradd -m -u 1000 app && \
chown -R app:app /app

# Switch to non-root user
USER app

# Expose port
EXPOSE 3001

# Set Python to unbuffered mode
ENV PYTHONUNBUFFERED=1

# Run the application
CMD ["python", "main.py"]
15 changes: 12 additions & 3 deletions mcp-bridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ pip install -r requirements.txt

# 2. Configure
cp .env.example .env
# Edit .env with your GITHUB_ORGANIZATION and MCP_SERVER_PATH
# Edit .env with your GITHUB_ORGANIZATION and GITHUB_TOKEN

# 2.5. Pull MCP Server Docker image
docker pull ghcr.io/sperekrestova/github-mcp-server:latest

# 3. Run
python main.py
Expand Down Expand Up @@ -45,7 +48,8 @@ Environment variables in `.env`:
```bash
# Required
GITHUB_ORGANIZATION=your-org-name
MCP_SERVER_PATH=/home/user/GitHub_MCP_Server/main.py
GITHUB_TOKEN=your-token # For MCP Server
MCP_SERVER_IMAGE=ghcr.io/sperekrestova/github-mcp-server:latest

# Optional
PORT=3001
Expand All @@ -54,9 +58,14 @@ CACHE_TTL_SECONDS=300
CACHE_ENABLED=true
CORS_ORIGINS=http://localhost:5173,http://localhost:8080
LOG_LEVEL=INFO
GITHUB_TOKEN=your-token # For MCP Server
```

**Important:**
- The MCP Server runs as a Docker container spawned by the bridge
- Make sure Docker is installed and running
- The bridge needs access to the Docker socket to run MCP Server containers
- Pull the MCP Server image before starting: `docker pull ghcr.io/sperekrestova/github-mcp-server:latest`

## Development

### Running in Development
Expand Down
Loading
Loading