Skip to main content
Glama
mcp-pagure
by lemenkov

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.

Related MCP server: forgejo-mcp

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

pip install mcp-pagure

Configuration

Requires Pagure API token from your Pagure instance:

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)

mcp-pagure

HTTP Mode (Remote)

mcp-pagure --transport http --port 8805

With Claude CLI

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

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

Available Tools

11 tools
close_pull_requestA

Close a pull request without merging.

Args: project: Project name pr_id: Pull request ID number to close namespace: Project namespace (default: rpms)

Returns: JSON string with close result

Inputs: project (required), pr_id (required), namespace. Returns: result

comment_on_prC

Add a comment to a pull request.

Args: project: Project name pr_id: Pull request ID number comment: Comment text to add namespace: Project namespace (default: rpms)

Returns: JSON string with comment creation result

Inputs: project (required), pr_id (required), comment (required), namespace. Returns: result

fork_projectC

Fork a Pagure project to your namespace.

Args: project: Project name to fork namespace: Project namespace (default: rpms)

Returns: JSON string with fork creation result

Inputs: project (required), namespace. Returns: result

get_commitB

Get detailed information about a specific commit.

Args: project: Project name commit_hash: Commit hash (full or short) namespace: Project namespace (default: rpms)

Returns: JSON string with commit details

Inputs: project (required), commit_hash (required), namespace. Returns: result

get_fileB

Get file content from a Pagure repository.

Args: project: Project name filename: File path (e.g., 'python3.spec', 'sources') branch: Branch name (default: rawhide) namespace: Project namespace (default: rpms)

Returns: File content as string

Inputs: project (required), filename (required), branch, namespace. Returns: result

get_project_infoB

Get detailed information about a Pagure project.

Args: project: Project name (e.g., 'python3', 'kernel') namespace: Project namespace (default: rpms)

Returns: JSON string with project details

Inputs: project (required), namespace. Returns: result

get_pull_requestC

Get detailed information about a specific pull request.

Args: project: Project name pr_id: Pull request ID number namespace: Project namespace (default: rpms)

Returns: JSON string with PR details including comments

Inputs: project (required), pr_id (required), namespace. Returns: result

list_branchesB

List all branches in a Pagure repository.

Args: project: Project name namespace: Project namespace (default: rpms)

Returns: JSON string with list of branch names

Inputs: project (required), namespace. Returns: result

list_projectsB

List Pagure projects/packages.

Args: namespace: Project namespace (rpms, container, modules, etc.) pattern: Search pattern for project name page: Page number (default: 1) per_page: Results per page (default: 20)

Returns: JSON string with project list and pagination info

Inputs: namespace, pattern, page, per_page. Returns: result

list_pull_requestsB

List pull requests for a Pagure project.

Args: project: Project name namespace: Project namespace (default: rpms) status: PR status - Open, Merged, Closed, or all (default: Open) page: Page number (default: 1) per_page: Results per page (default: 20)

Returns: JSON string with PR list and pagination info

Inputs: project (required), namespace, status, page, +1 more. Returns: result

merge_pull_requestC

Merge an approved pull request.

Args: project: Project name pr_id: Pull request ID number to merge namespace: Project namespace (default: rpms)

Returns: JSON string with merge result

Inputs: project (required), pr_id (required), namespace. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    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.

    Related MCP Connectors

    Related MCP Servers