Skip to content

Forgejo MCP

Community MCP server for Forgejo/Gitea — repos, issues, PRs, orgs, registry.

Package

@ric_/forgejo-mcp — 100+ tools, stdio and HTTP transport.

Create a token

  1. Open https://git.rafaelgonzalezalbes.com/user/settings/applications
  2. Generate token with scopes:
  3. read:repository, write:repository
  4. read:issue, write:issue
  5. read:package (if managing registry)
  6. Add to infra-devops/local/.env:
FORGEJO_API_TOKEN=gite_...

Cursor configuration

"forgejo": {
  "command": "npx",
  "args": ["-y", "@ric_/forgejo-mcp"],
  "env": {
    "FORGEJO_URL": "https://git.rafaelgonzalezalbes.com",
    "FORGEJO_TOKEN": "<your-forgejo-pat>"
  }
}

Replace <your-forgejo-pat> with the value from local/.env on your machine.

The server exposes many tools. Most common for agents:

Category Examples
Repos list/search repos, get repo details
Issues list/create/update issues
Pull requests list/create/merge PRs
Branches list branches, get branch info
Orgs list org members

If the agent gets overwhelmed, disable unused tools in Cursor MCP settings.

Typical agent tasks

  • "List open PRs on bioscan/bioscancheck"
  • "Create a PR from feature/BIOS-12 to main"
  • "Show issue #5 on infra/devops"

Security

  • Use a personal access token tied to your Forgejo user
  • Token needs write scope only if agent should create PRs/issues
  • Never commit the token — local/.env is gitignored

Troubleshooting

Issue Fix
401 Unauthorized Regenerate token; check FORGEJO_URL has no trailing slash issues
Repo not found Repo is private — token must belong to a user with access
Rate limited Default 100 req/min; wait or adjust RATE_LIMIT_MAX