forgejo-mcp
A Model Context Protocol server for Forgejo instances
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/jasonmccallister--forgejo-mcp)HTML
<a href="/listings/jasonmccallister--forgejo-mcp"><img src="/api/listings/jasonmccallister--forgejo-mcp/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
These steps run a script from the network that findsafeskills does not scan.
Install script
This is the path I expect most people to use. The script picks your OS and arch, downloads the matching GitHub Release, checks `checksums.txt`, then puts the binary in `~/.local/bin`:
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/jasonmccallister/forgejo-mcp/main/install.sh | sh
Pin a version:
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/jasonmccallister/forgejo-mcp/main/install.sh | sh -s -- --version v0.1.0
Other flags:
curl ... | sh -s -- --bin-dir /usr/local/bin --yes curl ... | sh -s -- --help
Release binaries exist for Linux and macOS on `x86_64` and `arm64`.
Install with Cargo
cargo install --git https://github.com/jasonmccallister/forgejo-mcp --locked
That installs to `~/.cargo/bin`. Keep that directory on your `PATH`.
Build from a local clone
git clone https://github.com/jasonmccallister/forgejo-mcp.git cd forgejo-mcp cargo build --release # or: cargo install --path . --locked
The release binary is at `./target/release/forgejo-mcp`.
Verify
forgejo-mcp
With no env set, it should exit complaining that `FORGEJO_URL` is required. That means the binary runs.
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
README.md · README · 177 lines · 2 findings marked
- # forgejo-mcp
- MCP server for a Forgejo instance. It calls Forgejo's `/api/v1` REST API over HTTPS with a plain `reqwest` client. There is no Forgejo SDK dependency.
- Tools are read-only unless you set `FORGEJO_ALLOW_WRITE=true`. That flag is what unlocks creating and editing issues, comments, and pull requests.
- ## Requirements
- You need a Forgejo personal access token. Minimum scopes for read tools:
- - `read:user`
- - `read:repository`
- - `read:issue`
- For write tools, add:
- - `write:issue`
- - `write:repository`
- Create the token in Forgejo under **Settings → Applications → Generate New Token**.
- If you build from source, you also need Rust 1.88+ (edition 2024).
- ## Installation
- ### Install script
- This is the path I expect most people to use. The script picks your OS and arch, downloads the matching GitHub Release, checks `checksums.txt`, then puts the binary in `~/.local/bin`:
- ```bash
- curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/jasonmccallister/forgejo-mcp/main/install.sh | sh
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 31 on GitHub
- ```
- Pin a version:
- ```bash
- curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/jasonmccallister/forgejo-mcp/main/install.sh | sh -s -- --version v0.1.0
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 37 on GitHub
- ```
- Other flags:
- ```bash
- curl ... | sh -s -- --bin-dir /usr/local/bin --yes
- curl ... | sh -s -- --help
- ```
- Release binaries exist for Linux and macOS on `x86_64` and `arm64`.
- ### Install with Cargo
- ```bash
- cargo install --git https://github.com/jasonmccallister/forgejo-mcp --locked
- ```
- That installs to `~/.cargo/bin`. Keep that directory on your `PATH`.
- ### Build from a local clone
- ```bash
- git clone https://github.com/jasonmccallister/forgejo-mcp.git
- cd forgejo-mcp
- cargo build --release
- # or: cargo install --path . --locked
- ```
- The release binary is at `./target/release/forgejo-mcp`.
- ### Verify
- ```bash
- forgejo-mcp
- ```
- With no env set, it should exit complaining that `FORGEJO_URL` is required. That means the binary runs.
- ## Releasing
- Pushing a `v*` tag runs GoReleaser on GitHub Actions and publishes the archives:
- ```bash
- git tag v0.1.0
- git push origin v0.1.0
- ```
- You get Linux and macOS builds (`x86_64` and `arm64`) plus `checksums.txt` on the GitHub Release.
- ## Configuration
- | Variable | Required | Default | Description |
- |----------|----------|---------|-------------|
- | `FORGEJO_URL` | yes | — | Instance base URL (e.g. `https://forge.example.ts.net`) |
- | `FORGEJO_TOKEN` | yes | — | Personal access token |
- | `FORGEJO_ALLOW_WRITE` | no | `false` | `true` / `1` / `yes` / `on` registers write tools |
- | `FORGEJO_TIMEOUT_SECS` | no | `30` | HTTP timeout in seconds |
- | `RUST_LOG` | no | `forgejo_mcp=info,rmcp=warn` | Tracing filter (stderr only) |
- Pass the token through the MCP host env. Do not put it on the command line.
- ## Cursor MCP config
- Point Cursor at `forgejo-mcp` if it is on your `PATH`, or at the absolute path from `which forgejo-mcp`.
- Read-only:
- ```json
- {
- "mcpServers": {
- "forgejo": {
- "command": "forgejo-mcp",
- "env": {
- "FORGEJO_URL": "https://forge.example.ts.net",
- "FORGEJO_TOKEN": "your-token-here",
- "RUST_LOG": "forgejo_mcp=info,rmcp=warn"
- }
- }
- }
- }
- ```
- With writes:
- ```json
- {
- "mcpServers": {
- "forgejo": {
- "command": "forgejo-mcp",
- "env": {
- "FORGEJO_URL": "https://forge.example.ts.net",
- "FORGEJO_TOKEN": "your-token-here",
- "FORGEJO_ALLOW_WRITE": "true",
- "RUST_LOG": "forgejo_mcp=info,rmcp=warn"
- }
- }
- }
- }
- ```
- If Cursor cannot resolve the name, use a full path such as `/Users/you/.local/bin/forgejo-mcp`.
- ## Tools
- ### Read (always available)
- | Tool | Forgejo endpoint |
- |------|------------------|
- | `get_version` | `GET /api/v1/version` |
- | `get_api_settings` | `GET /api/v1/settings/api` |
- | `get_authenticated_user` | `GET /api/v1/user` |
- | `list_my_repos` | `GET /api/v1/user/repos` |
- | `search_repos` | `GET /api/v1/repos/search` |
- | `get_repo` | `GET /api/v1/repos/{owner}/{repo}` |
- | `list_issues` | `GET /api/v1/repos/{owner}/{repo}/issues` |
- | `get_issue` | `GET /api/v1/repos/{owner}/{repo}/issues/{index}` |
- | `list_issue_comments` | `GET /api/v1/repos/{owner}/{repo}/issues/{index}/comments` |
- | `list_pull_requests` | `GET /api/v1/repos/{owner}/{repo}/pulls` |
- | `get_pull_request` | `GET /api/v1/repos/{owner}/{repo}/pulls/{index}` |
- ### Write (`FORGEJO_ALLOW_WRITE=true`)
- | Tool | Forgejo endpoint |
- |------|------------------|
- | `create_issue` | `POST /api/v1/repos/{owner}/{repo}/issues` |
- | `edit_issue` | `PATCH /api/v1/repos/{owner}/{repo}/issues/{index}` |
- | `create_issue_comment` | `POST /api/v1/repos/{owner}/{repo}/issues/{index}/comments` |
- | `create_pull_request` | `POST /api/v1/repos/{owner}/{repo}/pulls` |
- | `edit_pull_request` | `PATCH /api/v1/repos/{owner}/{repo}/pulls/{index}` |
- ## API reference
- - [Forgejo API usage](https://forgejo.org/docs/latest/user/api/usage/)
- - [Access token scopes](https://forgejo.org/docs/latest/user/authentication/token-scope/)
- - Swagger UI: `{FORGEJO_URL}/api/swagger`
- - OpenAPI: `{FORGEJO_URL}/swagger.v1.json`
- ## License
- MIT
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.