A Model Context Protocol (MCP) server that enables you to manage Gitea/Forgejo repositories through AI assistants like Claude, Gemini, and Copilot. If you want to: - Smart progress tracking: Let AI help you track project progress and analyze bottlenecks - Automated issue categorization: Automatically tag issue labels and set milestones based on content - Priority sorting: Let AI analyze issue cont
Add this skill
npx mdskills install raohwork/forgejo-mcpWell-documented MCP server with comprehensive features but overly broad permissions for API-based operations
1# Gitea/Forgejo MCP Server23> Turn AI into your code repository management assistant45A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that enables you to manage Gitea/Forgejo repositories through AI assistants like Claude, Gemini, and Copilot.67## ๐ Why Use Forgejo MCP Server?89If you want to:10- **Smart progress tracking**: Let AI help you track project progress and analyze bottlenecks11- **Automated issue categorization**: Automatically tag issue labels and set milestones based on content12- **Priority sorting**: Let AI analyze issue content to help prioritize tasks13- **Code review assistance**: Get AI suggestions and insights in Pull Requests14- **Project documentation organization**: Automatically organize Wiki documents and release notes1516Then this tool is made for you!1718## โจ Supported Features1920### Issue Management21- Create, edit, and view issues22- Add, remove, and replace labels23- Manage issue comments and attachments24- Set issue dependencies2526### Project Organization27- Manage labels (create, edit, delete)28- Manage milestones (create, edit, delete)29- Repository search and listing3031### Release Management32- Manage version releases33- Manage release attachments3435### Other Features36- View Pull Requests37- Manage Wiki pages38- View Forgejo/Gitea Actions tasks3940## ๐ฆ Installation4142### Method 1: Use docker (Recommended)4344For STDIO mode, you can skip to **Usage** section.4546For SSE/Streamable HTTP mode, you should run `forgejo-mcp` as server before configuring your MCP client.4748```bash49docker run -p 8080:8080 -e FORGEJOMCP_TOKEN="my-forgejo-api-token" ronmi/forgejo-mcp http --address :8080 --server https://git.example.com50```5152### Method 2: Install from source5354```bash55go install github.com/raohwork/forgejo-mcp@latest56```5758### Method 3: Download Pre-compiled Binaries5960Download the appropriate version for your operating system from the [Releases page](https://github.com/raohwork/forgejo-mcp/releases).6162## ๐ฅ๏ธ Usage6364This tool provides two primary modes of operation: `stdio` for local integration and `http` for remote access.6566Before actually setup you MCP client, you have to create an access token on the Forgejo/Gitea server.67681. Log in to your Forgejo/Gitea instance692. Go to **Settings** โ **Applications** โ **Access Tokens**703. Click **Generate New Token**714. Select appropriate permission scopes (recommend at least `repository` and `issue` write permissions)725. Copy the generated token7374๐ก **Tip**: For security, consider setting environment variables instead of using tokens directly in config:75```bash76export FORGEJOMCP_SERVER="https://your-forgejo-instance.com"77export FORGEJOMCP_TOKEN="your_access_token"78```7980### Stdio Mode (for Local Clients)8182This is the recommended mode for integrating with local AI assistant clients like Claude Desktop or Gemini CLI. It uses standard input/output for direct communication.8384#### Configure Your AI Client8586Using docker:8788```json89{90 "mcpServers": {91 "forgejo": {92 "command": "docker",93 "args": [94 "--rm",95 "ronmi/forgejo-mcp",96 "stdio",97 "--server", "https://your-forgejo-instance.com",98 "--token", "your_access_token"99 ]100 }101 }102}103```104105Installed from source or pre-built binary:106107```json108{109 "mcpServers": {110 "forgejo": {111 "command": "/path/to/forgejo-mcp",112 "args": [113 "stdio",114 "--server", "https://your-forgejo-instance.com",115 "--token", "your_access_token"116 ]117 }118 }119}120```121122You might want to take a look at **Security Recommendations** section for best practice.123124### HTTP Server Mode (for Remote Access)125126This mode starts a web server, allowing remote clients to connect via HTTP. It's ideal for web-based services or setting up a central gateway for multiple users.127128Run the following command to start the server:129```bash130# with local binary131/path/to/forgejo-mcp http --address :8080 --server https://your-forgejo-instance.com132133# with docker134docker run -p 8080:8080 -d --rm ronmi/forgejo-mcp http --address :8080 --server https://your-forgejo-instance.com135```136137The server supports two operational modes:138- **Single-user mode**: If you provide a `--token` (or environment variable `FORGEJOMCP_TOKEN`) at startup, all operations will use that token.139 ```bash140 forgejo-mcp http --address :8080 --server https://git.example.com --token your_token141 ```142- **Multi-user mode**: If no token is provided, the server requires clients to send an `Authorization: Bearer <token>` header with each request, allowing it to serve multiple users securely.143144#### Client Configuration145146For clients that support connecting to a remote MCP server via HTTP, you can add a configuration like this. This example shows how to connect to a server running in multi-user mode:147148```json149{150 "mcpServers": {151 "forgejo-remote": {152 "type": "sse",153 "url": "http://localhost:8080/sse",154 "headers": {155 "Authorization": "Bearer your_token"156 }157 }158 }159}160```161162or `http` type (for Streamable HTTP, use different path in URL)163164```json165{166 "mcpServers": {167 "forgejo-remote": {168 "type": "http",169 "url": "http://localhost:8080/",170 "headers": {171 "Authorization": "Bearer your_token"172 }173 }174 }175}176```177178If connecting to a server in single-user mode, you can omit the `headers` field.179180## ๐ก๏ธ Security Recommendations1811821. **Use environment variables**: Set `FORGEJOMCP_SERVER` and `FORGEJOMCP_TOKEN`, then remove `--server` and `--token` from your configuration1832. **Limit token permissions**: Only grant necessary permission scopes1843. **Rotate tokens regularly**: Update access tokens periodically185186## ๐ Usage Examples187188After configuration, you can use natural language in your AI assistant to manage your repositories:189190```191"Show me critical bug reports of this repo on my gitea server"192193"According to our discussion above, create a detailed issue about this bug, then leave a comment on the issue to describe how we will fix it."194195"Give me a report about current milestone. Recent progression in particular."196197"Analyze recent pull requests and tell me which ones need priority review"198```199200## ๐ค Support & Contributing201202- **Bug Reports**: [GitHub Issues](https://github.com/raohwork/forgejo-mcp/issues)203- **Code Contributions**: Pull Requests are welcome!204205## ๐ License206207This project is licensed under the [Mozilla Public License 2.0](LICENSE).208209---210211**Start making AI your code repository management partner!** ๐212
Full transparency โ inspect the skill content before installing.