feat(mcp): fgj mcp server with LLM-native tools #8

Open
qwolff wants to merge 0 commits from feat/mcp-server into main
Owner

Adds fgj mcp subcommand exposing 17 tools + 3 prompts over MCP stdio. Shares logic with the CLI via a new internal/fgj/ package. See commit body for details.

Adds `fgj mcp` subcommand exposing 17 tools + 3 prompts over MCP stdio. Shares logic with the CLI via a new internal/fgj/ package. See commit body for details.
feat(mcp): add fgj mcp server with 17 LLM-native tools + 3 prompts
All checks were successful
CI / build (pull_request) Successful in 45s
CI / test (pull_request) Successful in 54s
CI / lint (pull_request) Successful in 56s
54dc26d15d
Adds internal/fgj/ as a reusable business-logic layer (refs, PRs, issues,
runs, repo context, search, file read, budget/log-cleaning helpers) and
internal/mcp/ as an MCP server built on github.com/modelcontextprotocol/go-sdk.
Wired as 'fgj mcp' subcommand; rewires 'pr view' through the shared path.

Tools favour fat aggregate reads over primitive chaining: pr_read returns
metadata + diff + comments + reviews + checks in one call; run_read returns
status + jobs + failing-step log tails with runner noise stripped (~44% byte
reduction). pr_merge is destructive-by-confirmation (dry-run without confirm).

Bumps Go toolchain to 1.25 (required by MCP SDK) in go.mod and both CI
workflows. Adds table tests for ParseRef, truncation, and log cleaning.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
feat(mcp): add comment edit/delete and label management tools
All checks were successful
CI / lint (pull_request) Successful in 52s
CI / build (pull_request) Successful in 52s
CI / test (pull_request) Successful in 1m1s
441049b458
Six new MCP tools rounding out the CRUD surface:

  comment_edit   edit an issue or PR comment by ID (they share a namespace)
  comment_delete delete a comment; requires confirm: true
  label_list     enumerate repo labels
  label_create   create a label (name, color, description, exclusive)
  label_edit     rename / recolor / redescribe by current name
  label_delete   delete a label by name; requires confirm: true

Destructive ops (comment_delete, label_delete) mirror pr_merge's
confirm-gated dry-run: omit confirm → preview of what would change;
confirm: true → execute. Label ops resolve names to IDs internally so
callers never touch Forgejo's integer label IDs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
All checks were successful
CI / lint (pull_request) Successful in 52s
CI / build (pull_request) Successful in 52s
CI / test (pull_request) Successful in 1m1s
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/mcp-server:feat/mcp-server
git switch feat/mcp-server

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feat/mcp-server
git switch feat/mcp-server
git rebase main
git switch main
git merge --ff-only feat/mcp-server
git switch feat/mcp-server
git rebase main
git switch main
git merge --no-ff feat/mcp-server
git switch main
git merge --squash feat/mcp-server
git switch main
git merge --ff-only feat/mcp-server
git switch main
git merge feat/mcp-server
git push origin main
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
qwolff/fgj!8
No description provided.