Repository navigation
Add Mcp-Method and Mcp-Name headers to HTTP requests - #288
EhsanAzish80 wants to merge 5 commits into
Conversation
|
One value-encoding edge looks inconsistent with SEP-2243.
return bytes.allSatisfy { $0 == 0x09 || (0x20...0x7E).contains($0) }But SEP-2243's MCP encoding rules are stricter than the generic HTTP field-value allowance: after the leading/trailing whitespace check, the plain representation must be ASCII So a name like Could AI-assisted review; checked the current PR head against SEP-2243 value-encoding rules before posting. |
|
Fixed the tab encoding edge in bcc4d95 and added the regression. All 552 Swift tests passed locally. AI helped write the new test; I ran it. Could a maintainer review this and approve CI? |
bcc4d95 to
354b02d
Compare
Closes #228. The HTTP client sends
Mcp-Methodfor JSON-RPC requests and notifications, plusMcp-Namefor tool calls, prompt reads, and resource reads. Names that are not safe as plain ASCII use the Base64 format from SEP-2243. Responses and legacy batches have no single method to mirror.The branch is updated to current
mainand includes the Ubuntu CI setup and client-test timing fixes shared with #307.Tests: request types, notifications, responses, non-ASCII names, whitespace, and Base64-marker names passed locally before this update. All six CI jobs passed on
4a58c34, including Ubuntu tests. AI helped write the tests; I ran them.