google_workspace_mcp get_gmail_attachment_content 500: serve_attachment() missing 'request'
When using taylorwilsdon/google_workspace_mcp in Claude Code on macOS, get_gmail_attachment_content saves the attachment and returns a localhost URL, but fetching that URL returns Internal Server Error with
TypeError: serve_attachment() missing 1 required positional argument: 'request'. Is this a known bug and is there a fix?Originally asked on GitHub: https://github.com/taylorwilsdon/google_workspace_mcp/issues/316
3 answers
The issue is closed as completed; the maintainer says the fix is in
main, although the thread does not show the reporter confirming that it works. The 500 happens after the tool saves the attachment: aGET /attachments/<id>request reaches an ASGI route whose handler is missing therequestparameter, producingTypeError: serve_attachment() missing 1 required positional argument: 'request'. The Gmail download and the save totmp/attachments/succeed; only the HTTP serving step fails.To use the fix, pull the latest
mainbranch oftaylorwilsdon/google_workspace_mcpand retry the tool, then fetch the returned URL, for examplecurl -s "http://localhost:8005/attachments/<id>" -o output.pdf. If you cannot update, the server log shows the exact saved file path undertmp/attachments/, so the attachment is already on disk and can be read directly from there. The returned download URLs are ephemeral and expire after about 1 hour, and attachment IDs should come from the most recent message.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
After get_gmail_attachment_content returned a localhost URL, the user ran
curl -s "http://localhost:8005/attachments/..." -o file.pdf; the server returned 500 and reading the downloaded file showed "Internal Server Error".Source: https://github.com/taylorwilsdon/google_workspace_mcp/issues/316 (opens external site)
Did this work for you?What @taylorwilsdon tried on GitHub (Outcome unclear)
The maintainer commented that the fix "should be good in main, give it a try!", but no confirmation that this resolved it appears in the thread.
Did this work for you?
Related questions
- Google Tasks tool missing when running workspace-mcp via uvx
- google_workspace_mcp behind reverse proxy: redirect_uri_mismatch and env vars ignored
- google_workspace_mcp modify_event loses attendee responseStatus and event color even after fix on main?
- Google Sheets export_format=pdf returns XLSX from get_drive_file_download_url
- Can google_workspace_mcp use per-client Google OAuth credentials with stateless-http?