Support authenticated remote MCP servers with custom request headers - #1821
Merged
Conversation
The add-MCP form had no way to supply request headers, so an endpoint behind an edge authenticator could not be added at all. It now carries a name/value headers editor whose values ride along on the connection check and on every later request, through the existing config field. A 403 from such a gate also no longer reads as an unreachable server. It classifies exactly as a 401 does, so the flow continues to the auth step instead of stopping on "Couldn't reach this URL".
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | ed2ec34 | Commit Preview URL Branch Preview URL |
Aug 28 2026, 09:51 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | ed2ec34 | Aug 28 2026, 09:52 AM |
The request headers editor imports lucide icons, but the package never declared the dependency. It only resolved locally because a node_modules directory above the checkout carried it; CI has no such ancestor and the typecheck failed to resolve the module. Declare it the way the openapi plugin already does.
Contributor
Cloudflare previewTorn down — the PR is closed. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
RhysSullivan
marked this pull request as ready for review
August 28, 2026 18:28
This was referenced Aug 28, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1764
Adding a remote MCP server behind an edge authenticator failed with "Couldn't reach this URL", and there was no way to supply the credentials it wanted.
Two changes:
headersfield that the payload, config, live transport, and probe already carried, so they are sent on the connection check and on every later request. A "Test connection" action re-probes with the headers as typed.403is now classified exactly as a401is. Cloudflare Access and similar gates answer an unauthenticated request with403and an HTML sign-in page, so the MCP server is never reached and there is no Bearer challenge to read. That is "needs credentials", not "unreachable", and the flow now continues to the auth step.Not covered here: header values are stored as static, non-credential config, the same as the query params beside them. Secret-backed header references are a larger change and are left out.
Tests:
probe-shapeunit tests for the Cloudflare Access403shape, a403+ Bearer + JSON-RPC body, a403+ Bearer + GraphQL body, and a probe that clears the gate once headers are configured.request-headersunit tests for the row to wire-map conversion.mcp-request-headers-add. It fails on main with the exact dead-end symptom, and passes here.