Conversation
- Add pdfUrl to invoices_list and invoices_get responses with on-the-fly PDF rendering - Add presigned URL support and file download for documents_get and inbox_get - Add Accept header middleware to fix 406 errors from MCP clients - Extract shared MCP utilities (downloadVaultFile, streamToResource, getVaultSignedUrl) - Bump @hono/mcp and @modelcontextprotocol/sdk Made-with: Cursor
The schemas had camelCase examples (e.g. createdAt) but the backend expects snake_case (e.g. created_at), causing LLMs to send invalid sort values via MCP. Made-with: Cursor
Both columns were used by the dashboard but silently ignored by the query, falling through to the default created_at sort. Made-with: Cursor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because Privacy Mode (Legacy) is turned on. To enable Bugbot Autofix, switch your privacy mode in the Cursor dashboard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Note
Medium Risk
Adds MCP tool support for generating/downloading invoice PDFs and vault-stored files (base64 resources + signed URLs), which increases payload sizes and touches storage/PDF rendering paths. Also tweaks MCP request header handling, so transport compatibility/regressions should be watched.
Overview
MCP tools can now return downloadable file content.
documents_get,inbox_get, andinvoices_getaccept a newdownloadflag that, when set, appends an MCPresourceitem containing base64-encoded file bytes (vault download for documents/inbox; on-the-fly PDF render for invoices), and they also include a signedfileUrl/pdfUrlin the JSON payload.Adds shared MCP utilities (
getVaultSignedUrl,downloadVaultFile,streamToResource, MIME type mapping) and extendsMcpContextwithapiUrl(wired viaMIDDAY_API_URL). The MCP router also normalizes theAcceptheader to include bothapplication/jsonandtext/event-streamfor streamable transport.Separately, invoice listing now includes
pdfUrlper item, invoice query sorting addsinvoice_numberandissue_date, and OpenAPI schema descriptions/examples forsortparams are clarified/standardized. Dependencies bump@hono/mcpand@modelcontextprotocol/sdk.Written by Cursor Bugbot for commit 06703f0. This will update automatically on new commits. Configure here.