Skip to content

Fix HTTP MCP auth token precedence - #3285

Merged
Widthdom merged 1 commit into
mainfrom
fix-issue3156
Jun 5, 2026
Merged

Fix HTTP MCP auth token precedence#3285
Widthdom merged 1 commit into
mainfrom
fix-issue3156

Conversation

@Widthdom

@Widthdom Widthdom commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Make HTTP MCP use one bearer authentication contract, preferring CDIDX_MCP_HTTP_TOKEN and falling back to CDIDX_MCP_AUTH_TOKEN.
  • Keep stdio JSON-RPC params.auth.token behavior unchanged while preventing HTTP from also requiring the body-token gate.
  • Document the precedence and add changelog.d/unreleased/3156.security.md.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~ProgramRunnerTests|FullyQualifiedName~HttpMcpTransportTests" -p:UseSharedCompilation=false
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet build CodeIndex.sln -c Release -p:UseSharedCompilation=false
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore
  • git diff --check / git diff --cached --check
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json
  • Codex adversarial review: No blocking/actionable issues found.

Fixes #3156

@Widthdom
Widthdom merged commit a719dbc into main Jun 5, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue3156 branch June 6, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP MCP auth token environment variables should have consistent semantics

1 participant