You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mcp add treats uppercase HTTP(S) URLs as executable commands #2636
mcp add --command accepts an HTTP(S) URL, but changing only the URL scheme's case changes the saved transport from HTTP to a local executable command. The registration still exits successfully.
Reproduction
Tested from source at f26b669b56a4423abd773c81f6c6c9c2ebadc42a on native Windows x64, using Bun 1.4.4. No MCP server or network request is needed.
In an empty temporary project, run the source CLI with your checkout's absolute path:
bun /path/to/codex-security/sdk/typescript/src/cli.ts mcp add --agent=cursor --no-global --json --command='HTTPS://mcp.example.invalid/MCP?mode=ReadOnly'
The command exits 0 and writes this server entry to .cursor/mcp.json:
I checked five schemes through the real CLI registration flow, with isolated home/config directories:
Scheme
Saved as
Exit status
https
URL
0
HTTPS
executable command
0
hTtPs
executable command
0
http
URL
0
HTTP
executable command
0
Expected behavior
All these HTTP(S) schemes should select the URL transport. URI scheme names are case-insensitive (RFC 3986, section 3.1). The case-sensitive path and query should remain unchanged.
Cause and impact
The HTTP(S) check in mcpServerConfig uses /^https?:\/\//u. An uppercase or mixed-case scheme falls through to command-line parsing, so the saved configuration asks the client to launch the URL as a program. I verified the generated configuration; I did not launch an MCP client or contact a server.
Workaround: lowercase just the http or https scheme before registration.
I reproduced the mixed-case URL problem and compared the three proposed fixes. #2637, #2644, and #2645 contain the same parser change and regression tests. I’d review #2637 for this issue because it also documents the accepted URL schemes. The report-rendering change in #2644 can be evaluated separately under #2447.
Activity
mldangelo-oai commentedon Nov 15, 2026
I reproduced the mixed-case URL problem and compared the three proposed fixes. #2637, #2644, and #2645 contain the same parser change and regression tests. I’d review #2637 for this issue because it also documents the accepted URL schemes. The report-rendering change in #2644 can be evaluated separately under #2447.
AmarGhugare commentedon Nov 15, 2026
Thanks for checking and comparing the fixes. Happy to address any feedback on #2637.