Add support for wiki #32
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/OpenSpec
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
RFC - Request For Comments
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
hermes-attempted
hermes-needs-clarification
hermes-ready
hermes-review
hermes-wip
human-required
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
agentic-forges/forgejo-mcp#32
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add support from upstream to allow the MCP to provide Wiki
https://gitea.com/gitea/gitea-mcp/src/branch/main/README.md?display=source#L206
https://gitea.com/gitea/gitea-mcp/src/branch/main/operation/wiki/wiki.go
Wiki Support Status
Status: Pending upstream dependency
Why Wiki Support Is Not Yet Available
Wiki tools (list, get, create, update, delete wiki pages) are planned but currently blocked by a missing dependency in the forgejo-sdk.
The SDK (v2.0.0-v2.2.0) does not yet include wiki API methods. Rather than implementing a workaround with raw HTTP calls, we prefer to:
This approach ensures better maintainability and consistency with other operations.
Tracking
Workaround
If you need wiki functionality now, you can use the Forgejo API directly:
GET /api/v1/repos/{owner}/{repo}/wiki/pagesGET /api/v1/repos/{owner}/{repo}/wiki/page/{pageName}POST /api/v1/repos/{owner}/{repo}/wiki/newPATCH /api/v1/repos/{owner}/{repo}/wiki/page/{pageName}DELETE /api/v1/repos/{owner}/{repo}/wiki/page/{pageName}Investigation Update
The wiki tools have already been implemented in
operation/wiki/wiki.gobut are not registered with the MCP server.Current State
operation/wiki/wiki.go:17-21list_wiki_pagestoolListWikiPagesFnhandlercreate_wiki_pagetoolCreateWikiPageFnhandlerupdate_wiki_pagetoolUpdateWikiPageFnhandleroperation/operation.goWhat's Missing
The wiki package needs to be wired up in
operation/operation.go:"codeberg.org/goern/forgejo-mcp/v2/operation/wiki"wiki.RegisterTool(s)Next Steps
This issue can be unblocked - the upstream forgejo-sdk now supports wiki operations (the code already uses
forgejo_sdk.CreateWikiPageOptionandforgejo_sdk.EditWikiPageOption). Just need to register the tools to make them available.Correction: Still Blocked
Attempted to register the wiki tools but the build failed:
The current forgejo-sdk (
v2.0.0) does not have wiki page methods - onlyExternalWikistruct.Status Update
operation/wiki/This issue remains blocked on upstream forgejo-sdk adding wiki page support (
ListWikiPages,CreateWikiPage,EditWikiPage).Upstream SDK Status Check
Checked mvdkleijn/forgejo-sdk for wiki support progress:
Findings
wiki.gofile in main branchwiki.goin feature branchesNotable Activity
There's an active WIP PR #94: feat: move to generated models using go-swagger which may eventually auto-generate wiki methods from the Forgejo OpenAPI spec, but it's still in progress.
Current SDK Version
The SDK is at
v2.0.0with no wiki support. Open feature requests include:Recommendation: Consider opening a feature request on the forgejo-sdk repo for wiki API support, or contributing the implementation directly.
Status Update (2026-03-28): Still Blocked on SDK
Re-assessed with forgejo-sdk v3.0.0 — still no wiki methods.
What exists
GET /repos/{owner}/{repo}/wiki/pagesGET /repos/{owner}/{repo}/wiki/page/{pageName}GET /repos/{owner}/{repo}/wiki/revisions/{pageName}POST /repos/{owner}/{repo}/wiki/newPATCH/DELETEon/wiki/page/{pageName}What's missing
wiki.go, no wiki types, no wiki methods — onlyHasWikibool on repo structsSummary
The API exists and works, but the SDK has no wrapper for it. This is the same blocker pattern as #98 (reply to review comment). An upstream contribution to forgejo-sdk adding wiki methods would unblock both issues.
Keeping as blocked until forgejo-sdk adds wiki support.
Minutes — OpenSpec drafted, blocker reframed
Investigated the block. Root cause:
operation/wiki/wiki.gois gated behind//go:build wikiand callsclient.ListWikiPages/CreateWikiPage/EditWikiPage+CreateWikiPageOption/EditWikiPageOption— none of which exist inforgejo-sdk/forgejo/v3(nowiki*.go, no wiki types). So the package never compiled; the tag exists only to keepmake buildgreen. The earlier plan waited on an upstream SDK contribution.We don't need to wait.
pkg/forgejo/rawhttp.goalready provides authenticated raw-REST helpers (DoJSON/DoJSONList), added for issue attachments when the SDK fell short. Wiki is the same situation, so the OpenSpec change proposes implementing all wiki ops directly against the Forgejo REST API — no SDK dependency, no external wait.Drafted OpenSpec change
add-wiki-support(PR pending) covering:list_wiki_pages,get_wiki_page,get_wiki_revisions,create_wiki_page,update_wiki_page,delete_wiki_page, all output-bounded perdocs/design/output-bounding.md.forgejo://repo/{owner}/{repo}/wiki/{pageName}so a page can be referenced by URI (auto-resolved by resource-aware clients, no tool call).AGENTS.md, rich descriptions.One load-bearing detail to verify live before merge: the
content_base64encoding and page-name URL rule (captured as an explicit task).Keeping
Status/Blockeduntil the implementation lands and the live API check passes; the blocker is now "implement the spec", not "wait on upstream SDK".Wiki support is implemented and proposed in PR #379: https://codeberg.org/goern/forgejo-mcp/pulls/379. The change adds six output-bounded wiki tools plus the
forgejo://repo/{owner}/{repo}/wiki/{pageName}resource, with live Forgejo verification and a captured end-to-end demo.some rule seems to forbid merging main into the feature branch, before merging the feature branch to main. As i have very limited time at the moment, I cannot spend more time, trying to figure things out. Please can someone take care of the merge?