wso2 / wso2/api-platform

[Bug]: MCP authentication with Claude

Open
#3,445 0 comments 0 reactions 1 assignee View on GitHub

@Thenujan-Nagaratnam is already working on this.

Since Sep 15, 2026.

Aspect/API Severity/Major Type/Bug
Dominant language
Go
Stars
71
Forks
111
Avg merge
1d 14h
Merged PRs (30d)
110

Description

Please select the area the issue is related to

Gateway

Please select the aspect the issue is related to

Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI)

Description

Description

I am trying to secure and MCP using AI GW and consume it through Claude. The expectation is , when I access it through claude, I should be prompted to authenticate through my KM (Asgardeo). Please note that, since this is user authentication, I expect cluade to launch browser and bring me to Asgardeo.

However I am redirected to a GW to authenticate, despite I have configured correct onfigurations. Below is the URL I am redirected to. I have exposed the AI GW through ngrok and below url is pointing to GW instead of KM

https://654f-2600-100c-b054-2e81-1547-9547-27b0-2fa2.ngrok-free.app/authorize?response_type=code&client_id=VQXbAfue5KFia9csYMaZc0z5tP4a&redirect_uri=https%3A%2F%2Fclaude.ai%2Fapi%2Fmcp%2Fauth_callback&code_challenge=7F8qq5--g24zFpJyxQPQhxAyiRd2kgku9rBo9sivk1E&code_challenge_method=S256&state=l1uE5Oy9xiqf4FYkADTMwTfbBmZTvO2nLwpyqoPWzII

If I inspect, the url given as resource metadata, it has a localhost url depsite correct configs in config.toml.

Bearer resource_metadata="https://localhost:8443/default/orderstatusmcpserver/.well-known/oauth-protected-resource", error="invalid_token", error_description="Authentication failed"

When I visit https://localhost:8443/default/orderstatusmcpserver/.well-known/oauth-protected-resource, this is what I see

{"resource":"https://localhost:8443/default/orderstatusmcpserver/mcp","authorization_servers":["https://api.asgardeo.io/t/wealthadv/oauth2/token"]}

MCP service I used (you can use the same to reproudce the issue, this is the original mcp without authentication)
https://b51050bd-6f0e-466b-9a5a-a1de3d2c35d9-dev.e1-us-east-azure.choreoapis.dev/default/orderstatusmcp/v1.0/mcp

Steps to Reproduce

Given above

Severity Level of the Issue

Severity/Major (Important functionality is broken. Should be prioritized. Doesn't need immediate attention)

Environment Details (with versions)

API GW 1.1.0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.