Skip to main content
Glama
lemenkov
by lemenkov
README.md
<!--
SPDX-FileCopyrightText: 2026 Peter Lemenkov <lemenkov@gmail.com>
SPDX-License-Identifier: Apache-2.0
-->

# mcp-pagure

MCP server for Pagure integration (src.fedoraproject.org, pagure.io, and other Pagure instances).

## Overview

This MCP server provides tools for interacting with Pagure git forges, including Fedora's package source repository (dist-git) at src.fedoraproject.org.

## Features

- Package/repository browsing and management
- Spec file operations (view, diff)
- Patch management (list, view)
- Pull Request workflow (list, view, comment, merge)
- Git operations (commits, diffs, branches)
- Multi-instance support (src.fedoraproject.org, pagure.io, self-hosted)

## Installation
```bash
pip install mcp-pagure
```

## Configuration

Requires Pagure API token from your Pagure instance:
- src.fedoraproject.org: https://src.fedoraproject.org/settings#nav-api-tab
- pagure.io: https://pagure.io/settings#nav-api-tab
```bash
export PAGURE_API_TOKEN="your-token-here"
export PAGURE_BASE_URL="https://src.fedoraproject.org"  # optional, defaults to src.fp.o
```

## Usage

### Stdio Mode (Local)
```bash
mcp-pagure
```

### HTTP Mode (Remote)
```bash
mcp-pagure --transport http --port 8805
```

### With Claude CLI
```bash
claude mcp add --transport sse \
  --header "Authorization: Bearer $PAGURE_API_TOKEN" \
  pagure https://your-server.com/mcp/pagure
```

## Tools

### Repository Operations
- `list_projects` - Browse available projects/packages
- `get_project_info` - Get project metadata
- `fork_project` - Fork a project to your namespace

### File Operations
- `get_file` - View file content from repo
- `list_branches` - List repository branches
- `list_tags` - List repository tags

### Pull Request Workflow
- `list_pull_requests` - List PRs (open/closed/merged/all)
- `get_pull_request` - View PR details and comments
- `comment_on_pr` - Add review comments
- `merge_pull_request` - Merge approved PR
- `close_pull_request` - Close PR without merging

### Git Operations
- (No Git/commit tools available - Pagure API doesn't support commit listing)

## Development
```bash
git clone https://github.com/lemenkov/mcp-pagure
cd mcp-pagure
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"
pytest
```

## License

Apache-2.0

## Author

Peter Lemenkov <lemenkov@gmail.com>

TDQS

A3.6/5.0

Scored across 11 tools

Disambiguation5/5

Each tool has a clearly distinct purpose targeting specific resources and actions in the Pagure domain. For example, close_pull_request, merge_pull_request, and comment_on_pr all operate on pull requests but perform different operations, while get_commit, get_file, and get_project_info retrieve different types of information without overlap.

Naming Consistency5/5

All tools follow a consistent verb_noun naming pattern using snake_case throughout. The verbs are clear and descriptive (close, comment, fork, get, list, merge), and the nouns precisely identify the target resources (pull_request, project, commit, file, branches).

Tool Count5/5

With 11 tools, this server is well-scoped for a Pagure integration. The count covers essential operations for repository management, pull request handling, and project information retrieval without being overwhelming or insufficient for the domain.

Completeness4/5

The toolset provides strong coverage for core Pagure workflows including project listing/info, file/commit access, branch management, and full pull request lifecycle (list, get, comment, close, merge). A minor gap exists in creating or updating resources like projects or pull requests, but agents can work effectively with the available read and modify operations.

Maintenance

ActivityInactive
ResponsivenessNo issues