logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

forgejo-communication-adapter

A utility bridging Forgejo's remote procedure call interface with Model Context Protocol interactions for comprehensive repository oversight and operation handling.

Author

forgejo-communication-adapter logo

goern

MIT License

Quick Info

GitHub GitHub Stars 11
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

forgejorepositoryapisforgejo mcpforgejo restapi repository

Forgejo MCP Conduit

Forgejo MCP Conduit serves as an integration module designed to link Forgejo instances with systems adhering to the Model Context Protocol (MCP). This facilitates fluid execution of commands and management of source code repositories via an MCP-compliant conversational interface.

🚧Acquisition

🔧Compiling From Source

Obtain the source code repository via Git cloning:

bash git clone https://codeberg.org/goern/forgejo-mcp.git

Prerequisites for compilation:

  • make utility
  • Golang (version 1.24 or newer highly suggested)

Execute the build process:

bash make build

📁Installation into System Path

Relocate the compiled executable, forgejo-mcp, to a directory listed in your system's execution path. For instance:

bash cp forgejo-mcp /usr/local/bin/

🚀Operational Guide

This configuration example targets Cursor, though VSCode extensions are also compatible. To set up the MCP endpoint for Forgejo, incorporate the following structure into your MCP configuration file:

  • Standard I/O Mode

{ "mcpServers": { "forgejo": { "command": "forgejo-mcp", "args": [ "--transport", "stdio", "--url", "https://forgejo.example.org" // "--token", "" ], "env": { // "FORGEJO_URL": "https://forgejo.example.org", "FORGEJO_ACCESS_TOKEN": "" } } } }

  • Server-Sent Events (SSE) Mode

{ "mcpServers": { "forgejo": { "url": "http://localhost:8080/sse" } } }

[!TIP] The Forgejo instance URI and authorization credential can be supplied either as command-line flags or through environment variables. Command-line specifications take precedence. Environment variables have been updated for clarity: - Use FORGEJO_URL superseding the retired GITEA_HOST - Use FORGEJO_ACCESS_TOKEN superseding the retired GITEA_ACCESS_TOKEN - Use FORGEJO_DEBUG superseding the retired GITEA_DEBUG

Older GITEA_* variables are maintained for legacy support but will trigger deprecation advisories.

With the setup complete, initiate an interaction in your MCP-enabled chat interface, such as:

text list all my repositories

✅Accessible Functions

The Forgejo MCP Conduit exposes the following functionalities:

Function Name Target Scope Purpose Description
get_my_user_info User Retrieve details for the currently authenticated user
create_repo Repository Instantiate a new repository
fork_repo Repository Duplicate an existing repository
list_my_repos Repository Enumerate all repositories under the authenticated user's ownership
create_branch Branch Establish a new branch pointer
delete_branch Branch Remove an existing branch
list_branches Branch Display all branch pointers within a repository
list_repo_commits Commit Fetch the commit history log for a repository
get_file_content File Obtain the contents and associated metadata of a specified file
create_file File Provision a new file within the repository structure
update_file File Modify the contents of an existing file
delete_file File Remove a file from the repository
get_issue_by_index Issue Fetch an issue using its sequential identifier
list_repo_issues Issue Generate a list of all issues associated with a repository
create_issue Issue Log a new issue ticket
create_issue_comment Issue Post a remark or annotation on an issue
get_pull_request_by_index Pull Request Retrieve a pull request based on its index
list_repo_pull_requests Pull Request Display all active pull requests for a repository
create_pull_request Pull Request Submit a proposal for merging changes
search_users User Query the system for user accounts
search_org_teams Organization Search for defined teams within an organization
search_repos Repository Search for repositories matching specific criteria
get_forgejo_mcp_server_version Server Report the current version identifier of the Forgejo MCP Conduit software

🐛Diagnostic Procedures

To activate verbose logging, incorporate the -d flag when launching the Forgejo MCP Conduit in SSE mode:

sh ./forgejo-mcp --transport sse --url [--sse-port 8080] --token --debug

Utilize this interface to explore and govern your Forgejo assets through natural language queries!

See Also

`