# Forgejo (Gitea Fork) MCP for AI Agents AI Agent Connect

> Forgejo (Gitea Fork) MCP lets you manage your self-hosted Git instance through natural conversation. You can generate personal access tokens, trigger manual workflow dispatches for Forgejo Actions, and check version compatibility across your infrastructure. It is built for anyone who wants to handle repository management and CI/CD tasks without constantly switching tabs to a web UI.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_OGbMMQVsinb0BjKH6qJI5Qwlr4pWGYjZRMU7QWs7/ai-agent-connect
- **Tags:** git-repository, self-hosted, version-control, ci-cd, token-management, automation

## Description

Managing a self-hosted Git service shouldn't feel like a chore involving twenty open tabs and a dozen different credentials. This Connector changes that by giving your AI agent a direct line to your Forgejo or Gitea instance. Instead of hunting for the right settings page or manually copying token scopes, you just tell your agent what you need to do. It is about moving from how do I find this button to do this for me.

You can find this tool within the Vinkius catalog, which makes it easy to plug into your existing workflow alongside other dev tools. Whether you are trying to verify that your instance is running the right version for a specific plugin or you need to fire off a build for a hotfix, the agent handles the heavy lifting. It takes the friction out of DevOps by letting you interact with your repositories using plain English. You get to stay in your flow state while the agent handles the API calls and configuration checks in the background.

## Tools

### create_token
Generates a new personal access token. Use this to quickly get credentials for your scripts without navigating the web UI.

### get_forgejo_version
Retrieves detailed Forgejo version information. Use this to ensure your instance is up to date and compatible with your tools.

### get_gitea_version
Retrieves the Gitea-compatible version of the Forgejo instance. This helps you verify compatibility when running mixed environments.

### dispatch_workflow
Triggers a manual workflow dispatch in Forgejo Actions. This is perfect for starting deployments or builds on demand.

## Prompt Examples

**Prompt:** 
```
Check the Forgejo and Gitea-compatible versions of my instance.
```

**Response:** 
```
I've checked your instance. It is running **Forgejo version 7.0.1** and is compatible with **Gitea API version 1.21.0**.
```

**Prompt:** 
```
Generate a new API token named 'CI-Runner' with read:repository scope for user 'admin'.
```

**Response:** 
```
I have successfully created the token **'CI-Runner'** for user **'admin'**. 

**Token:** `[TOKEN_VALUE]` 

Please save it securely, as I cannot display it again.
```

**Prompt:** 
```
Trigger the 'deploy.yaml' workflow in the 'main-app' repository owned by 'dev-team'.
```

**Response:** 
```
The workflow **'deploy.yaml'** has been successfully dispatched for **dev-team/main-app**. 

| Status | Action | Repository |
| :--- | :--- | :--- |
| Success | Workflow Dispatched | dev-team/main-app |

You can monitor the progress in your Forgejo Actions dashboard.
```

## Capabilities

### Generate new access tokens
Create personal access tokens with specific scopes for your scripts.

### Trigger manual workflows
Start Forgejo Actions builds or deployments with a simple command.

### Check instance versions
Verify the exact Forgejo or Gitea version your server is currently running.

### Verify instance health
Check the configuration and status of your self-hosted Git service.

### Manage API credentials
Handle token creation and scope assignment without touching the web UI.

## Use Cases

### Hotfix Deployment
A developer needs to deploy a fix. They tell the agent to trigger the 'deploy.yaml' workflow in the 'main-app' repo.

### Script Integration
An engineer needs a token for a local cleanup script. They ask the agent to create a 'Read-Only' token for the admin user.

### Infrastructure Audit
A sysadmin checks if 5 different servers are on the same Forgejo version using get_forgejo_version.

### Version Verification
A team wants to know if their instance supports a new plugin. They ask the agent to check the Gitea-compatible version.

## Benefits

- Stop hunting for buttons in the web UI. Use create_token to get your credentials exactly where you need them without extra clicks.
- Speed up deployments by using dispatch_workflow to trigger Forgejo Actions builds directly from your chat.
- Keep your infrastructure consistent by using get_forgejo_version to audit your instance versions across different environments.
- Reduce the risk of using expired or incorrect scopes by generating specific tokens with create_token on the fly.
- Monitor your self-hosted Git service health without leaving your IDE or terminal, saving you from constant context switching.

## How It Works

The bottom line is you get a conversational interface for your self-hosted Git management.

1. Subscribe to the Connector and provide your instance URL and credentials.
2. Tell your AI client to perform a task like triggering a workflow or checking a version.
3. The agent executes the request and reports back with the result or confirmation.

## Frequently Asked Questions

**Can I use the Forgejo (Gitea Fork) MCP with my self-hosted Git server?**
Yes, this Connector is designed specifically for self-hosted Forgejo and Gitea instances. It allows your AI agent to interact with your private Git service directly.

**How do I generate API tokens using the Forgejo (Gitea Fork) MCP?**
You just ask your AI agent to create a new token for you. It will handle the request to your instance and provide you with the new credential and its scope.

**Can the Forgejo (Gitea Fork) MCP trigger my CI/CD builds?**
Yes, it can trigger manual workflow dispatches for Forgejo Actions. This means you can start your builds or deployments just by asking your agent to do so.

**Does the Forgejo (Gitea Fork) MCP work for both Forgejo and Gitea?**
Yes, it supports both. It can retrieve version information for both Forgejo and Gitea-compatible instances.

**Is it safe to use the Forgejo (Gitea Fork) MCP for repository management?**
Yes, it uses your existing credentials to perform actions. You control the scopes and permissions, so your agent only does what you authorize it to do.

**How does the Forgejo (Gitea Fork) MCP help with my DevOps workflow?**
It removes the need to constantly switch between your editor and your Git web UI. You can audit versions, manage tokens, and trigger builds without leaving your primary workspace.

**How can I check which Forgejo version my instance is running?**
You can use the `get_forgejo_version` tool. It will return the specific version string of your Forgejo instance, which is useful for debugging and feature compatibility checks.

**Can I trigger a CI/CD build manually through the AI?**
Yes! Use the `dispatch_workflow` tool by providing the repository owner, name, and the workflow file name. This triggers actions configured with the 'workflow_dispatch' event.

**What is required to generate a new API token?**
To use the `create_token` tool, you must have your Forgejo username and password configured in the credentials. This allows the agent to authenticate via BasicAuth and request a new token with your specified scopes.