Make POST /mcp behave like an MCP server a real client negotiates with, so the third seat at the board is reachable from a session that was not hand-written against this app.
What it is like today. Driven with curl against main at cd8ab1d (the tools themselves are in good shape after #73 — list_columns answers with ids and card counts, and the errors name the way out):
initialize with "protocolVersion":"2024-11-05" answers "protocolVersion":"2025-06-18" — the request's version is never read. The spec says a server that does not support what was asked for answers with a version it does support, and the client may then disconnect; answering a newer version than the client offered, unconditionally, is how a strict client decides we are unusable.
Nothing reads the MCP-Protocol-Version header that a client sends on every request after the handshake, so we cannot tell a client of one vintage from another even if we wanted to.
tools/call returns content: [{type:"text", text: "<JSON as a string>"}] and nothing else — no structuredContent, no outputSchema. A model has to parse JSON out of prose to read a column id, which is precisely the step where it invents one.
resources/list and prompts/list answer -32601. That is correct for a server that advertises only tools — it just is not written down anywhere.
What done looks like
Files I expect to change:src/mcp.ts, src/routes.ts (the header check at the /mcp boundary), src/server.test.ts, README.md.
Risks. Version negotiation is easy to over-build: the supported list should be one or two strings, and anything fancier is a smell. structuredContent doubles each response body — fine at this app's caps (a 500-card list_cards is tens of kilobytes; #66 compresses it), but say the number in the pull. This touches the same handler as #53, which decides the origin rule for /mcp; whichever lands second should read the other's boundary code rather than adding a second one.
Who fits:scout to build it, reviewed by sentinel — the review question is that the new header check refuses at the boundary and says why, in the protocol's own language.
Make
POST /mcpbehave like an MCP server a real client negotiates with, so the third seat at the board is reachable from a session that was not hand-written against this app.What it is like today. Driven with curl against
mainatcd8ab1d(the tools themselves are in good shape after #73 —list_columnsanswers with ids and card counts, and the errors name the way out):initializewith"protocolVersion":"2024-11-05"answers"protocolVersion":"2025-06-18"— the request's version is never read. The spec says a server that does not support what was asked for answers with a version it does support, and the client may then disconnect; answering a newer version than the client offered, unconditionally, is how a strict client decides we are unusable.MCP-Protocol-Versionheader that a client sends on every request after the handshake, so we cannot tell a client of one vintage from another even if we wanted to.tools/callreturnscontent: [{type:"text", text: "<JSON as a string>"}]and nothing else — nostructuredContent, nooutputSchema. A model has to parse JSON out of prose to read a column id, which is precisely the step where it invents one.resources/listandprompts/listanswer-32601. That is correct for a server that advertises onlytools— it just is not written down anywhere.What done looks like
Files I expect to change:
src/mcp.ts,src/routes.ts(the header check at the/mcpboundary),src/server.test.ts,README.md.Risks. Version negotiation is easy to over-build: the supported list should be one or two strings, and anything fancier is a smell.
structuredContentdoubles each response body — fine at this app's caps (a 500-cardlist_cardsis tens of kilobytes; #66 compresses it), but say the number in the pull. This touches the same handler as #53, which decides the origin rule for/mcp; whichever lands second should read the other's boundary code rather than adding a second one.Who fits: scout to build it, reviewed by sentinel — the review question is that the new header check refuses at the boundary and says why, in the protocol's own language.