Skip to content
Back to search

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
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/jasonmccallister--forgejo-mcp/badge.svg)](/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

i

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
  1. # forgejo-mcp
  2. 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.
  3. Tools are read-only unless you set `FORGEJO_ALLOW_WRITE=true`. That flag is what unlocks creating and editing issues, comments, and pull requests.
  4. ## Requirements
  5. You need a Forgejo personal access token. Minimum scopes for read tools:
  6. - `read:user`
  7. - `read:repository`
  8. - `read:issue`
  9. For write tools, add:
  10. - `write:issue`
  11. - `write:repository`
  12. Create the token in Forgejo under **Settings → Applications → Generate New Token**.
  13. If you build from source, you also need Rust 1.88+ (edition 2024).
  14. ## Installation
  15. ### Install script
  16. 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`:
  17. ```bash
  18. 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
  19. ```
  20. Pin a version:
  21. ```bash
  22. 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
  23. ```
  24. Other flags:
  25. ```bash
  26. curl ... | sh -s -- --bin-dir /usr/local/bin --yes
  27. curl ... | sh -s -- --help
  28. ```
  29. Release binaries exist for Linux and macOS on `x86_64` and `arm64`.
  30. ### Install with Cargo
  31. ```bash
  32. cargo install --git https://github.com/jasonmccallister/forgejo-mcp --locked
  33. ```
  34. That installs to `~/.cargo/bin`. Keep that directory on your `PATH`.
  35. ### Build from a local clone
  36. ```bash
  37. git clone https://github.com/jasonmccallister/forgejo-mcp.git
  38. cd forgejo-mcp
  39. cargo build --release
  40. # or: cargo install --path . --locked
  41. ```
  42. The release binary is at `./target/release/forgejo-mcp`.
  43. ### Verify
  44. ```bash
  45. forgejo-mcp
  46. ```
  47. With no env set, it should exit complaining that `FORGEJO_URL` is required. That means the binary runs.
  48. ## Releasing
  49. Pushing a `v*` tag runs GoReleaser on GitHub Actions and publishes the archives:
  50. ```bash
  51. git tag v0.1.0
  52. git push origin v0.1.0
  53. ```
  54. You get Linux and macOS builds (`x86_64` and `arm64`) plus `checksums.txt` on the GitHub Release.
  55. ## Configuration
  56. | Variable | Required | Default | Description |
  57. |----------|----------|---------|-------------|
  58. | `FORGEJO_URL` | yes | — | Instance base URL (e.g. `https://forge.example.ts.net`) |
  59. | `FORGEJO_TOKEN` | yes | — | Personal access token |
  60. | `FORGEJO_ALLOW_WRITE` | no | `false` | `true` / `1` / `yes` / `on` registers write tools |
  61. | `FORGEJO_TIMEOUT_SECS` | no | `30` | HTTP timeout in seconds |
  62. | `RUST_LOG` | no | `forgejo_mcp=info,rmcp=warn` | Tracing filter (stderr only) |
  63. Pass the token through the MCP host env. Do not put it on the command line.
  64. ## Cursor MCP config
  65. Point Cursor at `forgejo-mcp` if it is on your `PATH`, or at the absolute path from `which forgejo-mcp`.
  66. Read-only:
  67. ```json
  68. {
  69. "mcpServers": {
  70. "forgejo": {
  71. "command": "forgejo-mcp",
  72. "env": {
  73. "FORGEJO_URL": "https://forge.example.ts.net",
  74. "FORGEJO_TOKEN": "your-token-here",
  75. "RUST_LOG": "forgejo_mcp=info,rmcp=warn"
  76. }
  77. }
  78. }
  79. }
  80. ```
  81. With writes:
  82. ```json
  83. {
  84. "mcpServers": {
  85. "forgejo": {
  86. "command": "forgejo-mcp",
  87. "env": {
  88. "FORGEJO_URL": "https://forge.example.ts.net",
  89. "FORGEJO_TOKEN": "your-token-here",
  90. "FORGEJO_ALLOW_WRITE": "true",
  91. "RUST_LOG": "forgejo_mcp=info,rmcp=warn"
  92. }
  93. }
  94. }
  95. }
  96. ```
  97. If Cursor cannot resolve the name, use a full path such as `/Users/you/.local/bin/forgejo-mcp`.
  98. ## Tools
  99. ### Read (always available)
  100. | Tool | Forgejo endpoint |
  101. |------|------------------|
  102. | `get_version` | `GET /api/v1/version` |
  103. | `get_api_settings` | `GET /api/v1/settings/api` |
  104. | `get_authenticated_user` | `GET /api/v1/user` |
  105. | `list_my_repos` | `GET /api/v1/user/repos` |
  106. | `search_repos` | `GET /api/v1/repos/search` |
  107. | `get_repo` | `GET /api/v1/repos/{owner}/{repo}` |
  108. | `list_issues` | `GET /api/v1/repos/{owner}/{repo}/issues` |
  109. | `get_issue` | `GET /api/v1/repos/{owner}/{repo}/issues/{index}` |
  110. | `list_issue_comments` | `GET /api/v1/repos/{owner}/{repo}/issues/{index}/comments` |
  111. | `list_pull_requests` | `GET /api/v1/repos/{owner}/{repo}/pulls` |
  112. | `get_pull_request` | `GET /api/v1/repos/{owner}/{repo}/pulls/{index}` |
  113. ### Write (`FORGEJO_ALLOW_WRITE=true`)
  114. | Tool | Forgejo endpoint |
  115. |------|------------------|
  116. | `create_issue` | `POST /api/v1/repos/{owner}/{repo}/issues` |
  117. | `edit_issue` | `PATCH /api/v1/repos/{owner}/{repo}/issues/{index}` |
  118. | `create_issue_comment` | `POST /api/v1/repos/{owner}/{repo}/issues/{index}/comments` |
  119. | `create_pull_request` | `POST /api/v1/repos/{owner}/{repo}/pulls` |
  120. | `edit_pull_request` | `PATCH /api/v1/repos/{owner}/{repo}/pulls/{index}` |
  121. ## API reference
  122. - [Forgejo API usage](https://forgejo.org/docs/latest/user/api/usage/)
  123. - [Access token scopes](https://forgejo.org/docs/latest/user/authentication/token-scope/)
  124. - Swagger UI: `{FORGEJO_URL}/api/swagger`
  125. - OpenAPI: `{FORGEJO_URL}/swagger.v1.json`
  126. ## License
  127. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.