-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
Summary
The hosted MCP server at https://mcp.kite.trade/mcp
returns a 500 Internal Server Error
when processing the OAuth callback from Kite Connect authentication.
Steps to Reproduce
- Call the
login
tool via custom MCP client - Receive login URL:
https://kite.zerodha.com/connect/login?api_key=kitemcp&v=3&redirect _params=session_id%3D...
- Complete authentication in browser using valid Kite credentials
- Browser redirects to callback URL
- Callback endpoint returns 500 error
Expected Behavior
The callback should successfully process the authentication and associate the request
token with the session ID, allowing subsequent MCP tool calls to work.
Actual Behavior
HTTP 500 Internal Server Error on callback endpoint
error completing Kite session
Error Details
URL: https://mcp.kite.trade/callback?status=success&request_token=3tZT9tCZz1BYPi9JLVL h9tUf08cKe2yx&session_id=kitemcp-6db6acfc-94d1-45d4-b8b8-12484354dcaf%7C1752529827.JUTrdZT szQf5NH0hsdxjUfCvihHXSwEzZOnIlfE32wg%3D&action=login&type=login
Response:
- Status:
500 Internal Server Error
- Content-Type:
text/plain; charset=utf-8
- Content-Length:
30
- Server:
cloudflare
Environment
- MCP Server: https://mcp.kite.trade/mcp (hosted version)
- Client: Custom MCP client using LangChain MCP adapters
- Authentication: Valid Kite Connect credentials (My claude code MCP client authenticates fine)
- Browser: Chrome 137 on macOS
Additional Context
- The authentication with Kite Connect itself works correctly (status=success,
request_token received) - The session ID is properly preserved in the callback URL
- This suggests the issue is in the MCP server's callback handler, not the OAuth flow
itself - The same MCP server works correctly with Claude Desktop, suggesting this might be a race
condition or session handling issue
applegrew
Metadata
Metadata
Assignees
Labels
No labels