Skip to main content
Glama

forgejo-process-mcp

MCP server that turns Forgejo CI/CD into an async, agent-native process: git mechanics, PRs, and CI/CD runs as tools — with cicd_start returning immediately so the agent keeps developing, and run outcomes delivered later as events (ci_run_failed / ci_run_succeeded / deploy_finished) via cicd_events.

Built for the pattern: "when Forgejo accepts the CI/CD start, tell the agent it can continue development — and notify it when something fails or a deploy finishes, so production Playwright testing can start."

Pairs with the delivery-loop skill (skills/delivery-loop/SKILL.md): the skill owns judgment and sequencing, this server owns mechanics.

Tools

tool

what it does

repo_create / repo_list

Forgejo repository management

git_clone / git_branch / git_commit / git_push

local git mechanics

pr_open / pr_status / pr_merge

pull request lifecycle

ci_runs

list recent Actions runs (inspection only — not for polling loops)

cicd_start

commit + push + register a run watch; returns immediately with accepted: true and a watch id

cicd_events

drain pending events — call between development steps

watch_list

list open watches

Related MCP server: project-tasks-mcp

How the async flow works

agent ──cicd_start──▶ MCP: commit+push, register watch ──▶ returns at once:
                      "accepted — you can continue development"
                      │
background watcher (polls Forgejo Actions, default 15 s)
                      │
        run reaches terminal state ──▶ event queued
                      │
agent ──cicd_events──▶ {ci_run_failed | ci_run_succeeded | deploy_finished}

Watches persist on disk ($STATE_DIR/watches.json), so a restarted server resumes watching. An optional webhook listener (FORGEJO_MCP_WEBHOOK_PORT) accepts Forgejo webhooks for instant events — from a dockerized Forgejo use http://host.docker.internal:<port>/webhook.

Setup

npm install
npm run build

Configuration via environment:

var

default

purpose

FORGEJO_URL

http://127.0.0.1:3310

Forgejo base URL

FORGEJO_TOKEN

— (required)

API token

FORGEJO_MCP_STATE_DIR

~/.forgejo-process-mcp

events/watches state

FORGEJO_MCP_POLL_MS

15000

watcher poll interval

FORGEJO_MCP_WEBHOOK_PORT

0 (off)

webhook listener port

Register with an MCP host (example: kimi-code config.toml)

[mcp.servers.forgejo-process]
command = "node"
args = ["/abs/path/forgejo-process-mcp/dist/index.js"]
env = { FORGEJO_URL = "http://127.0.0.1:3310", FORGEJO_TOKEN = "..." }

Forgejo instance notes (found during bring-up, Forgejo 11.0.16)

  1. Runner capacity starves CI. With capacity: 1 in the runner's config.yml, one chatty repo floods the FIFO queue and other repos' runs wait for hours. Raise capacity (this instance: 4).

  2. Webhooks need an allowlist. Default webhook.ALLOWED_HOST_LIST blocks host.docker.internal, so a dockerized Forgejo cannot call a webhook listener on the host. Add it to app.ini: [webhook] ALLOWED_HOST_LIST = host.docker.internal,...

  3. Run planning lag is minutes, not seconds. New runs sit in an initial state before jobs are planned and contexts appear. This server therefore watches commit statuses (durable) rather than /actions/tasks (entries vanish after completion), and declares green only after the context set is stable across two polls.

  4. No run-level REST API in Forgejo 11 (/actions/runs is 404) — commit statuses per pushed SHA are the reliable read.

End-to-end test

Drives a real failure-then-success cycle against a live Forgejo (clone → failing CI → ci_run_failed event → fix → ci_run_succeeded):

node scripts/e2e.mjs

License

MIT

Available Tools

13 tools
cicd_eventsB

Drain pending CI/CD events (failures, greens, deploy completions). Call between development steps.

Inputs: no named parameters.

cicd_startA

Commit+push the working dir, register a CI/CD watch, and RETURN IMMEDIATELY. Do not block on the run — continue development; completion/failure arrives via cicd_events.

Inputs: dir (required), repo (required), message (required), kind, +1 more.

ci_runsC

List recent Forgejo Actions runs for a repo

Inputs: repo (required), limit.

git_branchC

Checkout or create a branch in a local repo

Inputs: dir (required), name (required), create.

git_cloneC

Clone a repository into a local directory

Inputs: dir (required), url (required).

git_commitB

Stage all changes and commit in a local repo

Inputs: dir (required), message (required).

git_pushC

Push the current (or given) branch to a remote

Inputs: dir (required), branch, remote.

pr_mergeC

Merge a pull request

Inputs: repo (required), index (required), style.

pr_openD

Open a pull request

Inputs: head (required), repo (required), title (required), base, +1 more.

pr_statusC

Get pull request state (mergeable, CI linkage)

Inputs: repo (required), index (required).

repo_createC

Create a Forgejo repository

Inputs: name (required), private, description.

repo_listB

List repositories of the authenticated user

Inputs: no named parameters.

watch_listC

List active CI/CD watches

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.6/5.0

    Scored across 13 tools

    Disambiguation4/5

    Most tools target a distinct resource+action pair (repo_create vs git_clone vs pr_merge vs ci_runs), so an agent can generally pick correctly. The main overlap is cicd_start, which bundles commit+push+watch registration and thus collides partially with git_commit/git_push, and the trio ci_runs / cicd_events / watch_list requires reading descriptions to separate.

    Naming Consistency3/5

    Two conventions coexist: resource-first names (pr_status, pr_open, repo_create, repo_list, ci_runs, watch_list) and verb-first names (git_clone, git_commit, git_push, cicd_start, cicd_events). Each family is internally readable, but the mix means `pr_open` and `git_clone` follow opposite orderings in the same set.

    Tool Count5/5

    13 tools is well within the sweet spot for a dev-workflow server and each one maps to a real step (repo, branch, commit, push, PR, CI watch). Nothing appears redundant or padded at this count.

    Completeness3/5

    The local-git-to-PR-plus-CI loop is covered, but notable gaps remain: no pr_list or PR close/comment/review, no repo_get or repo_delete, and no file read/write or git status/diff to inspect state before committing. Agents can work around some of this, but read-side PR and repo inspection are dead ends.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Git repository operations and real-time monitoring via MCP tools, with support for WebSocket events, authentication, and observability.
      13 npm
      4
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables managing projects, features, tasks, dependencies, executions, and human review through a Streamable HTTP endpoint, along with persistent inter-agent cooperation via task messaging and event subscriptions. It also supports administrative actions such as approvals, cancellations, unblocking, and member management.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to read a project's kickoff card, acceptance criteria, AGENTS rules, handoff package, progress, Git trail, and next step, then append validated, audited, idempotent progress events that are recorded as a matching Git commit. This keeps project truth in Git so work stays visible, resumable, and safely handable between humans and agents through scoped, short-lived credentials.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables connected AI clients to inspect GitHub work, machine health, GPUs, jobs, and plans, and to request approval-gated builds, machine preparation, fixes, commands, and sandboxed multi-GPU verification of fix branches.
      MIT