Skip to content

Conversation

@Dumbris
Copy link
Contributor

@Dumbris Dumbris commented Jan 25, 2026

Summary

  • Add -runlayer-mode flag to Go OAuth test server that mimics Runlayer's strict validation
  • Returns Pydantic-style 422 errors when RFC 8707 resource parameter is missing
  • Helps test and debug issue OAuth regression for runlayer backed servers #271 compatibility with Runlayer servers

Changes

OAuth Test Server:

  • Add PydanticValidationError and PydanticErrorDetail types in types.go
  • Add RunlayerMode option in options.go
  • Add pydanticValidationError() method in authorize.go
  • Add -runlayer-mode CLI flag (implies -require-resource)

Testing:

  • Add --runlayer-mode flag to scripts/run-oauth-e2e.sh
  • Add test/integration/test_runlayer_mode.sh integration test

Documentation:

  • Update docs/oauthserver_testing.md with Runlayer mode usage
  • Add comparison table for Go vs Python OAuth test servers

Usage

# Start server in Runlayer mode
go run ./tests/oauthserver/cmd/server -port 9000 -runlayer-mode

# Test without resource - get 422 Pydantic error
curl "http://localhost:9000/authorize?client_id=test-client&..."
# Returns: {"detail":[{"type":"missing","loc":["query","resource"],"msg":"Field required"}]}

Test plan

  • go test ./tests/oauthserver/... - All existing tests pass
  • go vet ./tests/oauthserver/... - No issues
  • ./test/integration/test_runlayer_mode.sh - New integration test passes
  • Manual testing with mcpproxy against Runlayer-style mock

🤖 Generated with Claude Code

Add `-runlayer-mode` flag to the Go OAuth test server that mimics
Runlayer's strict OAuth validation behavior with Pydantic-style 422
error responses when the RFC 8707 resource parameter is missing.

Changes:
- Add PydanticValidationError and PydanticErrorDetail types
- Add RunlayerMode option to OAuth server options
- Return 422 with Pydantic format when resource missing in Runlayer mode
- Add -runlayer-mode CLI flag (implies -require-resource)
- Update run-oauth-e2e.sh to support --runlayer-mode flag
- Add test/integration/test_runlayer_mode.sh integration test
- Update documentation with Runlayer mode usage and comparison

This helps test and debug issue #271 compatibility with Runlayer
servers that require the resource parameter.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7d71cb9
Status: ✅  Deploy successful!
Preview URL: https://82bef779.mcpproxy-docs.pages.dev
Branch Preview URL: https://feat-oauth-runlayer-mode.mcpproxy-docs.pages.dev

View logs

@github-actions
Copy link

📦 Build Artifacts

Workflow Run: View Run
Branch: feat/oauth-runlayer-mode

Available Artifacts

  • archive-darwin-amd64 (23 MB)
  • archive-darwin-arm64 (21 MB)
  • archive-linux-amd64 (12 MB)
  • archive-linux-arm64 (11 MB)
  • archive-windows-amd64 (23 MB)
  • archive-windows-arm64 (20 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (26 MB)
  • installer-dmg-darwin-arm64 (23 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 21328064477 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

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.

2 participants