The request director detects the declared content type from the OpenAPI spec but only implements the JSON branch. Non-JSON content types silently fall through to application/json.
multipart/form-data → JSON
An OpenAPI endpoint declaring multipart/form-data (e.g., file uploads) sends the body as application/json:
# OpenAPI spec says: content: { "multipart/form-data": ... }
# Actual request: Content-Type: application/json, body: {"file": "data"}
# Expected: Content-Type: multipart/form-data; boundary=...
application/x-www-form-urlencoded → JSON
Same issue — form submissions are sent as JSON:
# OpenAPI spec says: content: { "application/x-www-form-urlencoded": ... }
# Actual request: Content-Type: application/json, body: {"username": "admin"}
# Expected: Content-Type: application/x-www-form-urlencoded, body: username=admin
Cookie parameters silently dropped
_unflatten_arguments() handles path, query, header, and body locations but has no cookie case. Cookie parameters log a warning and are lost.
All three are in src/fastmcp/utilities/openapi/director.py. The content type is detected at line 79-81 but never dispatched on for non-JSON types.
The request director detects the declared content type from the OpenAPI spec but only implements the JSON branch. Non-JSON content types silently fall through to
application/json.multipart/form-data → JSON
An OpenAPI endpoint declaring
multipart/form-data(e.g., file uploads) sends the body asapplication/json:application/x-www-form-urlencoded → JSON
Same issue — form submissions are sent as JSON:
Cookie parameters silently dropped
_unflatten_arguments()handles path, query, header, and body locations but has no cookie case. Cookie parameters log a warning and are lost.All three are in
src/fastmcp/utilities/openapi/director.py. The content type is detected at line 79-81 but never dispatched on for non-JSON types.