feat(mcp): ship HTTP server as Docker-only, drop systemd path #76

Merged
Claude-Run merged 1 commit from feat/FJ-57-mcp-docker-only-deployment into main 2026-07-18 18:50:17 +02:00
Member

Remove fj mcp service install / uninstall and crates/fj/src/mcp/service.rs: the systemd unit baked in Forgejo host, a shared bearer token, and a plaintext mcp.env, all of which are gone now that credentials are per-account (FJ-55) and the HTTP transport is env-only. The MCP subcommand tree keeps serve and stdio only, with a test that asserts service cannot reappear.

Add compose.mcp.yml as the single supported deployment for the multi-user HTTP web service: it builds the runtime image, runs fj mcp serve with FORGEJO_MCP_TRANSPORT=http, publishes on loopback for a reverse proxy, and persists the SQLite state store on the named volume forgejo-mcp-data (service forgejo-mcp, network forgejo-mcp-private). Configuration is environment-only; .env.example lists every variable the service reads and the required master/session keys fail fast if unset.

Confirm the Dockerfile runtime stage serves this deployment: it already runs as non-root appuser, and now creates a writable /app/data volume dir with FORGEJO_MCP_DATABASE_URL defaulting beneath it so state survives restarts.

Add docs/deployment.md documenting only the container path (reverse-proxy TLS, the public base URL contract, volume persistence, key generation and custody, first-admin bootstrap, upgrades) plus the migration steps to stop and disable the removed systemd unit before upgrading. Delete the systemd runbook from README.md and update the stale "no compose stack" notes in CLAUDE.md.

fj mcp stdio is untouched. The startup fail-closed on a missing or malformed master/session key already lives in the HTTP transport (FJ-54) and its tests are unchanged.

#FJ-57

Remove `fj mcp service install` / `uninstall` and `crates/fj/src/mcp/service.rs`: the systemd unit baked in Forgejo host, a shared bearer token, and a plaintext `mcp.env`, all of which are gone now that credentials are per-account (FJ-55) and the HTTP transport is env-only. The MCP subcommand tree keeps `serve` and `stdio` only, with a test that asserts `service` cannot reappear. Add `compose.mcp.yml` as the single supported deployment for the multi-user HTTP web service: it builds the runtime image, runs `fj mcp serve` with `FORGEJO_MCP_TRANSPORT=http`, publishes on loopback for a reverse proxy, and persists the SQLite state store on the named volume `forgejo-mcp-data` (service `forgejo-mcp`, network `forgejo-mcp-private`). Configuration is environment-only; `.env.example` lists every variable the service reads and the required master/session keys fail fast if unset. Confirm the Dockerfile runtime stage serves this deployment: it already runs as non-root `appuser`, and now creates a writable `/app/data` volume dir with `FORGEJO_MCP_DATABASE_URL` defaulting beneath it so state survives restarts. Add `docs/deployment.md` documenting only the container path (reverse-proxy TLS, the public base URL contract, volume persistence, key generation and custody, first-admin bootstrap, upgrades) plus the migration steps to stop and disable the removed systemd unit before upgrading. Delete the systemd runbook from `README.md` and update the stale "no compose stack" notes in `CLAUDE.md`. `fj mcp stdio` is untouched. The startup fail-closed on a missing or malformed master/session key already lives in the HTTP transport (FJ-54) and its tests are unchanged. #FJ-57
feat(mcp): ship HTTP server as Docker-only, drop systemd path
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 2m53s
Create release / Create release from merged PR (pull_request) Has been skipped
f05883f149
Remove `fj mcp service install` / `uninstall` and `crates/fj/src/mcp/service.rs`: the systemd unit baked in Forgejo host, a shared bearer token, and a plaintext `mcp.env`, all of which are gone now that credentials are per-account (FJ-55) and the HTTP transport is env-only. The MCP subcommand tree keeps `serve` and `stdio` only, with a test that asserts `service` cannot reappear.

Add `compose.mcp.yml` as the single supported deployment for the multi-user HTTP web service: it builds the runtime image, runs `fj mcp serve` with `FORGEJO_MCP_TRANSPORT=http`, publishes on loopback for a reverse proxy, and persists the SQLite state store on the named volume `forgejo-mcp-data` (service `forgejo-mcp`, network `forgejo-mcp-private`). Configuration is environment-only; `.env.example` lists every variable the service reads and the required master/session keys fail fast if unset.

Confirm the Dockerfile runtime stage serves this deployment: it already runs as non-root `appuser`, and now creates a writable `/app/data` volume dir with `FORGEJO_MCP_DATABASE_URL` defaulting beneath it so state survives restarts.

Add `docs/deployment.md` documenting only the container path (reverse-proxy TLS, the public base URL contract, volume persistence, key generation and custody, first-admin bootstrap, upgrades) plus the migration steps to stop and disable the removed systemd unit before upgrading. Delete the systemd runbook from `README.md` and update the stale "no compose stack" notes in `CLAUDE.md`.

`fj mcp stdio` is untouched. The startup fail-closed on a missing or malformed master/session key already lives in the HTTP transport (FJ-54) and its tests are unchanged.

#FJ-57
Claude-Run deleted branch feat/FJ-57-mcp-docker-only-deployment 2026-07-18 18:50:17 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pandoras-box/forgejo-cli!76
No description provided.