Skip to content

feat: Add authless mode for Claude.ai custom connectors Testing - #16

Merged
Stealinglight merged 5 commits into
mainfrom
claude/fix-strava-mcp-auth-dWS4j
Feb 5, 2026
Merged

feat: Add authless mode for Claude.ai custom connectors Testing#16
Stealinglight merged 5 commits into
mainfrom
claude/fix-strava-mcp-auth-dWS4j

Conversation

@Stealinglight

Copy link
Copy Markdown
Owner

Claude.ai custom connectors only support authless or OAuth 2.1 connections, not Bearer token authentication via headers. This change adds an ALLOW_AUTHLESS environment variable (default: "true") that bypasses authentication for SSE transport endpoints (/sse, /sse/, /message), enabling Claude.ai to connect while keeping Bearer token auth required for the /mcp JSON-RPC endpoint for backward compatibility.

Changes:

  • src/config/env.ts: Add ALLOW_AUTHLESS to environment schema
  • src/lambda.ts: Add authless mode logic to auth middleware
  • src/index.ts: Apply same authless mode logic to local dev server
  • template.yaml: Add AllowAuthless CloudFormation parameter
  • README.md: Add Claude.ai custom connector setup section
  • docs/authentication.md: Document authless mode configuration
  • AGENTS.md: Update authentication flow documentation

https://claude.ai/code/session_019Wnbwj3oTzyM3sfGUh8Xr8

Claude.ai custom connectors only support authless or OAuth 2.1 connections,
not Bearer token authentication via headers. This change adds an
ALLOW_AUTHLESS environment variable (default: "true") that bypasses
authentication for SSE transport endpoints (/sse, /sse/, /message),
enabling Claude.ai to connect while keeping Bearer token auth required
for the /mcp JSON-RPC endpoint for backward compatibility.

Changes:
- src/config/env.ts: Add ALLOW_AUTHLESS to environment schema
- src/lambda.ts: Add authless mode logic to auth middleware
- src/index.ts: Apply same authless mode logic to local dev server
- template.yaml: Add AllowAuthless CloudFormation parameter
- README.md: Add Claude.ai custom connector setup section
- docs/authentication.md: Document authless mode configuration
- AGENTS.md: Update authentication flow documentation

https://claude.ai/code/session_019Wnbwj3oTzyM3sfGUh8Xr8
Copilot AI review requested due to automatic review settings February 4, 2026 22:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds authless mode for Claude.ai custom connectors, which cannot send custom authentication headers. It introduces an ALLOW_AUTHLESS environment variable that, when set to "true", bypasses Bearer token authentication for SSE transport endpoints (/sse, /sse/, /message) while maintaining authentication requirements for the /mcp JSON-RPC endpoint.

Changes:

  • Added ALLOW_AUTHLESS configuration option to enable/disable authless mode for SSE endpoints
  • Updated authentication middleware in both Lambda and local dev servers to support authless mode
  • Added CloudFormation parameter for configuring authless mode in AWS deployments
  • Comprehensive documentation updates explaining the security implications and setup process

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/config/env.ts Added ALLOW_AUTHLESS environment variable with schema validation
src/lambda.ts Modified authentication middleware to bypass auth for SSE endpoints when authless mode is enabled
src/index.ts Applied same authless mode logic to local development server
template.yaml Added AllowAuthless CloudFormation parameter with default value "true"
docs/authentication.md Added comprehensive documentation for authless mode configuration and security implications
README.md Added Claude.ai custom connector setup section with security considerations
AGENTS.md Updated authentication flow documentation to include authless mode

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/config/env.ts Outdated
Comment thread README.md Outdated
Comment thread AGENTS.md
Comment thread docs/authentication.md Outdated
Stealinglight and others added 4 commits February 4, 2026 14:44
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Update Lambda timeout to 900s (max for Function URLs) for long SSE sessions
- Improve CORS config with explicit methods/headers for Claude.ai compatibility
- Add /debug endpoint for troubleshooting Claude.ai connection issues
- Update /health endpoint with diagnostic info (authless mode, timestamp)
- Sync version numbers to 3.0.0 across all files
- Document serverless-express streaming limitation (GitHub issue #655)
- Add known_limitations to /debug endpoint response

Note: serverless-express does not support Lambda response streaming.
If SSE fails, consider AWS Lambda Web Adapter as an alternative.

https://claude.ai/code/session_019Wnbwj3oTzyM3sfGUh8Xr8
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Stealinglight
Stealinglight merged commit 73e47af into main Feb 5, 2026
1 check passed
@claude

claude Bot commented Feb 5, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.


@Stealinglight
Stealinglight deleted the claude/fix-strava-mcp-auth-dWS4j branch February 5, 2026 08:11
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.

3 participants