MCP server for Forgejo API operations over stdio
- Go 100%
|
All checks were successful
ci/woodpecker/push/lint-test-release Pipeline was successful
|
||
|---|---|---|
| .woodpecker | ||
| .gitignore | ||
| .goreleaser.yaml | ||
| .markdownlint-cli2.jsonc | ||
| forgejo.go | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| readme.md | ||
| renovate.json | ||
| tools.go | ||
mcp-forgejo
MCP server for Forgejo API operations over stdio.
Environment Variables
| Variable | Description |
|---|---|
FORGEJO_URL |
Forgejo instance URL (default: https://git.simoncor.net) |
FORGEJO_TOKEN |
Forgejo API token (required) |
Tools
| Tool | Description |
|---|---|
create_repo |
Create a new repo with sensible defaults (squash-only, issues+PRs+releases) |
get_repo_all |
List all accessible repositories, optionally filtered by owner |
get_repo_settings |
Get full repo configuration |
set_repo_settings |
Update repo settings via JSON |
delete_repo |
Delete a repository (irreversible) |
set_repo_avatar |
Set repo avatar from a local image file |
delete_repo_avatar |
Delete a repo avatar |
Build
go build -o mcp-forgejo .
Usage
Add to your MCP client config:
{
"mcpServers": {
"mcp-forgejo": {
"command": "/path/to/mcp-forgejo",
"env": {
"FORGEJO_URL": "https://git.simoncor.net",
"FORGEJO_TOKEN": "your-token-here"
}
}
}
}
The server communicates over stdio using the MCP protocol.