HttpTransportConfig
Configuration for the HTTP transport. Accepts either a boolean or an object.Boolean Mode
true- Enable HTTP transport with all defaultsfalse- Disable HTTP transport
Object Mode
Port number for the HTTP server.
Host address to bind the server to.
Maximum request body size in bytes. Default is 10MB (1024 * 1024 * 10).
Enable debug logging for the HTTP transport.
Endpoint path for MCP requests.
CORS configuration. See CORS Configuration below.
CORS Configuration
Configure Cross-Origin Resource Sharing (CORS) for the HTTP transport.Allowed origins. Can be:
- A string (e.g.,
"https://example.com") - An array of strings (e.g.,
["https://app.com", "https://admin.com"]) - A boolean (
trueallows all origins,falsedisallows all) - Default
"*"allows all origins
Allowed HTTP methods. Can be a string or array of strings.
Allowed request headers. The headers
mcp-session-id and mcp-protocol-version are automatically added if not present.Headers that browsers are allowed to access. The header
mcp-session-id is automatically added if not present.Allow credentials (cookies, authorization headers) in cross-origin requests.
How long (in seconds) preflight request results can be cached. Default is 24 hours.