Description
Feature Request: Add credentials: 'include' toggle to connection settings
Summary
Add a UI toggle (e.g., a checkbox in the connection settings panel) that sets credentials: 'include' on the fetch calls made by the Streamable HTTP (direct) transport. When enabled, the browser will automatically attach cookies stored for the target domain to every MCP request.
Problem
The browser treats Cookie as a forbidden header — JavaScript cannot set it manually. The only standards-compliant way to have the browser send cookies on a cross-origin request is to use credentials: 'include' in the fetch call.
The stock MCP Inspector does not set this option, so any MCP server that relies on cookie-based authentication or session routing (e.g., a server that reads a session cookie to resolve the correct backend environment) is unreachable from the inspector UI without a post-build patch to the browser bundle.
Workaround (current state)
Users and operators must patch the compiled browser bundle after installation to inject credentials: 'include' into the two fetch call sites used by the direct Streamable HTTP transport:
// Before patch
fetch(url2, {
...init,
headers: requestHeaders
});
// After patch
fetch(url2, {
...init,
credentials: "include",
headers: requestHeaders
});This is a fragile, build-time workaround that breaks whenever the inspector is updated, requires custom Docker image tooling to maintain, and is invisible to end users.
Proposed Solution
Add a "Send cookies (credentials: include)" checkbox to the connection settings UI, alongside existing transport options.
- Default: off (preserves current behaviour; no breaking change)
- When enabled: passes
credentials: 'include'in the fetch options for direct Streamable HTTP requests - Scope: applies only to the direct transport; the proxy transport is unaffected (it forwards cookies server-side via its own mechanism)
Server-side requirements (informational)
For credentials: 'include' to work end-to-end, the target server must respond with:
Access-Control-Allow-Origin: <exact origin>— wildcards (*) cause credentials to be silently ignored by the browserAccess-Control-Allow-Credentials: true
Additionally, because the inspector and the MCP server run on different origins, any cookies the server expects to receive must be set with SameSite=None; Secure. Browsers silently block cross-site cookies that use the default SameSite=Lax (or Strict) policy, regardless of the credentials: 'include' setting.
These are server responsibilities, but a note in the UI tooltip or docs would help users diagnose misconfigured servers.
Why this belongs in the inspector
Cookie-based auth is a common, legitimate pattern for internal tools, dev environments, and enterprise MCP deployments. The Fetch API provides credentials: 'include' specifically for this use case, and the browser enforces it correctly when paired with proper CORS headers on the server. Exposing this as a UI option is a small, non-breaking change that eliminates the need for downstream consumers to patch the inspector bundle.
Acceptance Criteria
- A toggle/checkbox is present in the connection settings UI for the Streamable HTTP transport
- When the toggle is off, fetch behaviour is unchanged from today
- When the toggle is on,
credentials: 'include'is passed to both direct-connection fetch call sites - The toggle state persists across sessions (e.g., via
localStorage) consistent with how other connection settings are persisted - A tooltip or inline note explains that the target server must set
Access-Control-Allow-Credentials: trueand a non-wildcardAccess-Control-Allow-Origin
Activity
cliffhall commentedon Aug 1, 2026
Closing: v1 is deprecated, and this one we'd decline on its own terms.
Thank you for raising this, and apologies for the long wait for a response.
v1 is deprecated and takes security fixes only, so this is being closed against v1 either way — but it's worth saying why we wouldn't build it in v2 as described, rather than leaving that implied.
The Inspector's backend spawns local processes and proxies outbound requests on the developer's behalf. It defends that in layers: session-token auth, origin validation, loopback-only binding, and an SSRF block-list on the proxy. What's requested here would remove or widen one of those layers, and we treat that as a net loss even when the problem it solves is real — which it may well be here. That's a judgment about the mechanism, not about you or the use case.
As part of #1872, we're labeling this
closed-v1-security-declinedso the decision is queryable and doesn't get re-proposed later without the context.If the underlying need is real, we'd still like to solve it. Please open an issue against v2 describing the problem you hit — the workflow you couldn't complete — rather than the specific change you'd make, and we'll look for a way there that keeps those controls intact. See
CONTRIBUTING.md.