405 method not allowed on update_file #1

Closed
opened 2026-06-13 00:35:34 +00:00 by bookbeard · 3 comments

It would seem the update_file action is broken, it consistently fails with "405 Method Not Allowed". Based on the Forgejo logs when the request is made, it looks like the MCP is trying to use the PATCH verb at "/repos/owner/repo/contents/filepath", but according to Forgejo's swagger docs that endpoint only accepts POST for creating files and PUT for updating files.

It would seem the update_file action is broken, it consistently fails with "405 Method Not Allowed". Based on the Forgejo logs when the request is made, it looks like the MCP is trying to use the PATCH verb at "/repos/owner/repo/contents/filepath", but according to Forgejo's swagger docs that endpoint only accepts POST for creating files and PUT for updating files.
bookbeard changed title from 405 not allowed on update_file to 405 method not allowed on update_file 2026-06-13 00:35:45 +00:00
Owner

hopefully this with be fixed in 0.1.6

update_file now uses PUT instead of PATCH on /repos/{owner}/{repo}/contents/{filepath}, matching the Forgejo API spec. PATCH was returning 405 Method Not Allowed

hopefully this with be fixed in 0.1.6 `update_file` now uses PUT instead of PATCH on `/repos/{owner}/{repo}/contents/{filepath}`, matching the Forgejo API spec. PATCH was returning `405 Method Not Allowed`
ric closed this issue 2026-06-14 21:07:54 +00:00
Author

Appreciate the quick response. I see the new release in the repo but it looks like it hasn't hit npm yet, I'll keep an eye out for it.

Appreciate the quick response. I see the new release in the repo but it looks like it hasn't hit npm yet, I'll keep an eye out for it.
Owner

it should be there now and I have made a few other fixes so its 0.1.7 you need.

it should be there now and I have made a few other fixes so its 0.1.7 you need.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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
SquareCows/forgejo-mcp#1
No description provided.