Skip to main content
Glama

patchfort

A safe, scoped, stateless MCP server for GitHub issue and pull-request triage.

Overview

patchfort is an MCP (Model Context Protocol) server that enables AI assistants like Claude to safely triage GitHub issues and review pull requests with comprehensive security controls.

Key Features

  • πŸ”’ Security-first design - Assumes the AI model may be compromised via prompt injection

  • 🎯 Capability tiers - Granular control: read < triage < write

  • πŸ›‘οΈ Two-step mutations - Propose β†’ review β†’ commit workflow with signed handles

  • πŸ“‹ Repository allowlist - Strict control over which repos can be accessed

  • πŸ” Untrusted content handling - All third-party text is sanitized and wrapped

  • πŸ“Š Audit logging - Complete accountability trail of all operations

  • 🚫 No destructive actions - Cannot delete, close, or merge anything

  • ⚑ Stateless architecture - Follows MCP spec revision 2026-07-28

Related MCP server: agentic-sdlc-mcp

Status

🚧 In Development - This project is currently being built according to the BUILD_SPEC.md specification.

Installation

# Install via uv (recommended)
uv pip install patchfort

# Or via pip
pip install patchfort

Quick Start

Configuration

Set environment variables or create a .env file:

# Required
GHTRIAGE_GITHUB_TOKEN=your_github_token_here
GHTRIAGE_ALLOWED_REPOS=owner/repo1,owner/repo2

# Optional - enable triage/write capabilities
GHTRIAGE_TIERS=read,triage,write
GHTRIAGE_HANDLE_SECRET=$(openssl rand -hex 32)

Running the Server

# Stdio mode (for local MCP clients like Claude Desktop)
patchfort

# HTTP mode (for remote access)
GHTRIAGE_TRANSPORT=http GHTRIAGE_HTTP_BEARER_TOKENS=your_secret_token patchfort

MCP Client Configuration

Add to your MCP client configuration (e.g., Claude Desktop):

{
  "mcpServers": {
    "patchfort": {
      "command": "patchfort",
      "env": {
        "GHTRIAGE_GITHUB_TOKEN": "your_token_here",
        "GHTRIAGE_TIERS": "read,triage",
        "GHTRIAGE_ALLOWED_REPOS": "owner/repo"
      }
    }
  }
}

Documentation

Security

This project implements comprehensive security controls:

  • S1-S12: Complete security control suite (see BUILD_SPEC.md Β§6)

  • Prompt injection defenses

  • HMAC-signed, expiring, single-use handles

  • Secret redaction throughout

  • Rate limiting per principal

  • Strict input validation

See SECURITY.md for security policy and responsible disclosure.

Development

# Clone and set up
git clone https://github.com/yourusername/patchfort.git
cd patchfort
uv venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows
uv pip install -e ".[dev]"

# Run checks
make check  # lint, format, type-check, test, coverage

License

MIT License - see LICENSE file for details.

Contributing

See CONTRIBUTING.md for guidelines.

Acknowledgments

Built following the Model Context Protocol specification and designed for safe AI-assisted GitHub triage workflows.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI coding agents to request bounded GitHub changes through a default-deny policy, independent human approval, one-time execution with a GitHub App credential, and verifiable receipts.
      1
      -
    • A
      license
      B
      quality
      C
      maintenance
      Enables an AI assistant to read, search, summarize, and triage GitHub issues and repository activity through an allowlisted, read-only set of tools, prompts, and resources. Every input is validated, every repository must be explicitly approved, and all third-party issue text is fenced off and marked as untrusted before it reaches the model.
      4
      MIT