Skip to main content
Glama
flywiththetide

GitHub Issue MCP Server

README.md
# GitHub Issue MCP Server & REST API Endpoint

A secure Model Context Protocol (MCP) server and REST API endpoint designed for autonomous AI agents to audit codebases and open GitHub issues across any repository.

## Features

- **Multi-Repository Issue Creation**: Create GitHub issues on any repository (e.g. `wifi-densepose-radar`, `goose`, `flywiththetide/repo_name`).
- **Dual Interface**:
  - **MCP SSE Transport**: Connect via standard MCP SSE tools (`create_issue`, `list_issues`, `get_issue`, `add_issue_comment`).
  - **REST API**: Simple HTTP JSON endpoints (`POST /api/issues`, `GET /api/issues`, `POST /api/issues/:number/comments`).
- **Security & Authentication**: Protected by Bearer token (`Authorization: Bearer <GITHUB_ISSUE_MCP_AUTH_KEY>`).
- **Structured Audit Logging**: Logs all requests and tool invocations to `audit.jsonl` with IP, timestamp, user agent, and execution timing.
- **Hosted Bridge**: Deployed on Hostinger VPS (`187.77.11.160`) at `https://gh-issues.elx0.com` via Cloudflare SSL proxy.

## Endpoints & Tool Schema

### REST Endpoints
- `POST /api/issues` - Create a new GitHub issue
- `GET /api/issues?repo=<name>&state=open` - List issues
- `GET /api/issues/:number?repo=<name>` - Get issue details
- `POST /api/issues/:number/comments` - Add issue comment
- `GET /health` - Health check
- `GET /info` - Server metadata and tool discovery
- `GET /audit` - Structured audit log inspection

### Quick Start Example
```bash
curl -X POST https://gh-issues.elx0.com/api/issues \
  -H "Authorization: Bearer <AUTH_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "repo": "wifi-densepose-radar",
    "title": "Bug: Memory leak in frame buffer",
    "body": "Detailed findings from autonomous agent audit...",
    "labels": ["bug", "agent-audit"]
  }'
```