softwaremill / softwaremill/chimp

T12 - client HTTP request headers

Open
#250 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

2026-07-28 version support
Dominant language
Scala
Stars
102
Forks
10
Avg merge
1d 2h
Merged PRs (30d)
16

Description

Target branch: 2026-07-28-protocol-support

Requires:

Every POST a chimp client sends on the stateless wire carries the request headers the spec requires, including header values derived from tool arguments. The client refuses tool definitions whose header annotations are invalid.

Standard headers

  • Every POST carries Mcp-Method equal to the JSON-RPC method, case preserved.
  • tools/call and prompts/get POSTs carry Mcp-Name equal to params.name. resources/read POSTs carry Mcp-Name equal to params.uri.
  • A value that is not plain ASCII, or that has leading or trailing spaces or control characters, is sent in the Base64 sentinel form defined by the spec.
  • Legacy requests are unchanged. stdio has no headers.

Custom headers from tool arguments

  • When a tool's input schema marks a property with x-mcp-header, the client mirrors that argument into an Mcp-Param-<name> header on the tools/call POST.
  • Values follow the spec encoding: plain ASCII strings as they are, other strings in the Base64 sentinel form, booleans as true or false, numbers as their JSON text. A null argument produces no header. An argument without the annotation produces no header.

Invalid annotations

  • When tools/list over HTTP returns a tool whose x-mcp-header value is invalid (empty, not a string, the same header name on two properties, or a name with spaces, colons, non-ASCII or control characters), the client drops that tool from the result and keeps the others, logging a warning.
  • Over stdio the annotations are ignored.

Coverage

  • The rules above hold for the sync HTTP transport and the streaming HTTP transports on ZIO, Ox and Pekko.
  • The conformance client handles http-standard-headers, http-custom-headers (tool arguments come from MCP_CONFORMANCE_CONTEXT) and http-invalid-tool-headers.

Spec:

Conformance scenarios that must pass after this task:

  • Client: http-standard-headers, http-custom-headers, http-invalid-tool-headers.

Docs: yes.

  • docs/client/transport.md: the headers the HTTP transport adds on the stateless wire, x-mcp-header mirroring, and the filtering of tools with invalid annotations.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read docs/client/transport.md and the linked Streamable HTTP specification sections first, then use the http-standard-headers, http-custom-headers, and http-invalid-tool-headers conformance scenarios as entry points. Trace the sync and streaming HTTP transports on ZIO, Ox, and Pekko, including the prerequisite issue 248. Done means all three scenarios pass and the transport documentation covers standard headers, x-mcp-header mirroring, and invalid-annotation filtering.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api, backend, documentation, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.