Enhancement: get_wiki_page should return decoded markdown, not base64 #2

Closed
opened 2026-04-08 19:51:58 +00:00 by jbr870 · 1 comment
Owner

Currently get_wiki_page returns the page content as a content_base64 field containing base64-encoded text. This is how the Forgejo API returns it, but for the MCP use case (where Claude.ai is the consumer), it would be much more useful to decode the content server-side and return plain markdown.

Current behavior

{
  "title": "Home",
  "content_base64": "IyBGb3JnZWpvIE1DUCBTZXJ2ZXIKClRoaXMgd2lraS..."
}

Desired behavior

{
  "title": "Home",
  "content": "# Forgejo MCP Server\n\nThis wiki documents..."
}

Why this matters

The primary consumer of this tool is Claude.ai. Returning decoded markdown means the content is immediately readable and usable in conversation — no decoding step needed. The base64 representation adds friction and wastes context window tokens on encoding overhead.

Implementation

Decode the content_base64 field from the Forgejo API response (standard base64 → UTF-8) and return it as content in the tool response. Optionally keep content_base64 as well, but content should be the primary field.

Currently `get_wiki_page` returns the page content as a `content_base64` field containing base64-encoded text. This is how the Forgejo API returns it, but for the MCP use case (where Claude.ai is the consumer), it would be much more useful to decode the content server-side and return plain markdown. ### Current behavior ```json { "title": "Home", "content_base64": "IyBGb3JnZWpvIE1DUCBTZXJ2ZXIKClRoaXMgd2lraS..." } ``` ### Desired behavior ```json { "title": "Home", "content": "# Forgejo MCP Server\n\nThis wiki documents..." } ``` ### Why this matters The primary consumer of this tool is Claude.ai. Returning decoded markdown means the content is immediately readable and usable in conversation — no decoding step needed. The base64 representation adds friction and wastes context window tokens on encoding overhead. ### Implementation Decode the `content_base64` field from the Forgejo API response (standard base64 → UTF-8) and return it as `content` in the tool response. Optionally keep `content_base64` as well, but `content` should be the primary field.
Author
Owner

Tested again on 2026-04-09. get_wiki_page still returns content_base64 rather than decoded content. This fix hasn't been applied yet.

Tested again on 2026-04-09. `get_wiki_page` still returns `content_base64` rather than decoded `content`. This fix hasn't been applied yet.
Sign in to join this conversation.
No labels
status/paused
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
jbr870/forgejo-mcp-server#2
No description provided.