Skip to main content

Module headers

Module headers 

Source
Expand description

Standard request headers (MCP-Protocol-Version, Mcp-Method, Mcp-Name, Mcp-Param-*), which let rate limiting and logging route without parsing the body. They must agree with it.

StructsΒ§

RequestHeaders
Request headers with lowercase names.

ConstantsΒ§

BASE64_PREFIX πŸ”’
BASE64_SUFFIX πŸ”’
METHOD_HEADER πŸ”’
Header repeating the JSON-RPC method of the body.
NAME_HEADER πŸ”’
Header repeating the tool or resource name of the body.
PARAM_HEADER_PREFIX πŸ”’
Prefix of the headers that repeat the arguments a tool promotes to headers.
PROTOCOL_VERSION_HEADER πŸ”’
Header naming the protocol revision of the request.

FunctionsΒ§

decode πŸ”’
primitive πŸ”’
validate πŸ”’
Checks the routing headers against the body. header_params are the called tool’s (argument, header suffix) pairs.