claude-code - 💡(How to fix) Fix [BUG] URL-mode elicitation/create not supported — server-initiated OAuth flows fails with not supported error [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48164Fetched 2026-04-15 06:31:22
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2renamed ×1

Error Message

{"jsonrpc": "2.0", "id": 100000, "error": {"code": -32602, "message": "MCP error -32602: Client does not support URL-mode elicitation requests"}}

Error Messages/Logs

{"jsonrpc": "2.0", "id": 100000, "error": {"code": -32602, "message": "MCP error -32602: Client does not support URL-mode elicitation requests"}} elif "result" in msg or "error" in msg:

Code Example

json
{
  "jsonrpc": "2.0",
  "id": 100000,
  "method": "elicitation/create",
  "params": {
    "mode": "url",
    "elicitationId": "uuid",
    "url": <AUTH-URL>,
    "message": "Please authorize to continue."
  }
}

---

{"jsonrpc": "2.0", "id": 100000, "error": {"code": -32602, "message": "MCP error -32602: Client does not support URL-mode elicitation requests"}}

---

{"method": "initialize", "params": {"protocolVersion": "2025-11-25", "capabilities": {"roots": {}, "elicitation": {"form": {}, "url": {}}}, "clientInfo": {"name": "claude-code", "version": "2.1.87"}}, "jsonrpc": "2.0", "id": 0}

---

MCP server "server name": Elicitation request received during initialization: {"method":"elicitation/create","params":{"mode":"url","message":"Please authorize to continue.","elicitationId":"0f5e7464-72eb-40ce-aa06-511c258b7c9a","url":"<auth_url>"}}

---

elicitation response (id=100000): {"result": {"action": "cancel"}, "jsonrpc": "2.0", "id": 100000}

---

Version 108




{"jsonrpc": "2.0", "id": 100000, "error": {"code": -32602, "message": "MCP error -32602: Client does not support URL-mode elicitation requests"}}


Version 87 which declares the URL mode drops silently.



 MCP server "server name": Elicitation request received during initialization: {"method":"elicitation/create","params":{"mode":"url","message":"Please authorize to continue.","elicitationId":"0f5e7464-72eb-40ce-aa06-511c258b7c9a","url":"<auth_url>"}}


No url shown to user and server received response:


 elicitation response (id=100000): {"result": {"action": "cancel"}, "jsonrpc": "2.0", "id": 100000}

---

python
#!/usr/bin/env python3
"""Minimal MCP server that sends URL-mode elicitation after initialize."""
import json, sys

def write(msg):
    sys.stdout.write(json.dumps(msg) + "\n")
    sys.stdout.flush()

for line in sys.stdin:
    msg = json.loads(line.strip())
    method = msg.get("method", "")
    msg_id = msg.get("id")

    if method == "initialize":
        write({
            "jsonrpc": "2.0", "id": msg_id,
            "result": {
                "protocolVersion": "2025-11-25",
                "capabilities": {"tools": {}, "elicitation": {"url": {}}},
                "serverInfo": {"name": "elicitation-test", "version": "1.0.0"},
            }
        })

    elif method == "notifications/initialized":
        # Send URL-mode elicitation to client
        write({
            "jsonrpc": "2.0", "id": 1,
            "method": "elicitation/create",
            "params": {
                "mode": "url",
                "elicitationId": "550e8400-e29b-41d4-a716-446655440000",
                "url": "https://example.com/authorize",
                "message": "Please authorize to continue.",
            }
        })

    elif method == "tools/list":
        write({"jsonrpc": "2.0", "id": msg_id, "result": {"tools": []}})

    elif "result" in msg or "error" in msg:
        # Log client's response to elicitation/create
        print(json.dumps(msg), file=sys.stderr)

---

{
  "mcpServers": {
    "elicitation-test": {
      "type": "stdio",
      "command": "python3",
      "args": ["elicitation_test_server.py"]
    }
  }
}
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Claude Code does not support elicitation/create with mode: "url" sent by MCP servers. This blocks server-initiated OAuth authorization flows during session setup (e.g. 3LO flows where the server needs the user to visit an authorization URL).

Setup:

  • Server declares "elicitation": {"url": {}} in initialize response capabilities
  • Client version .108 version declares "elicitation": {} in initialize request capabilities -> Note this can also be an issue where url mode is not supported.

Server sends elicitation/create mid/task (not as a response on any mcp api call)

json
{
  "jsonrpc": "2.0",
  "id": 100000,
  "method": "elicitation/create",
  "params": {
    "mode": "url",
    "elicitationId": "uuid",
    "url": <AUTH-URL>,
    "message": "Please authorize to continue."
  }
}

Response from claude --debug (mcp debug logs)

{"jsonrpc": "2.0", "id": 100000, "error": {"code": -32602, "message": "MCP error -32602: Client does not support URL-mode elicitation requests"}}

Testing with version 87

{"method": "initialize", "params": {"protocolVersion": "2025-11-25", "capabilities": {"roots": {}, "elicitation": {"form": {}, "url": {}}}, "clientInfo": {"name": "claude-code", "version": "2.1.87"}}, "jsonrpc": "2.0", "id": 0}

For similar elicitation:

Claude mcp logs provide info on:

 MCP server "server name": Elicitation request received during initialization: {"method":"elicitation/create","params":{"mode":"url","message":"Please authorize to continue.","elicitationId":"0f5e7464-72eb-40ce-aa06-511c258b7c9a","url":"<auth_url>"}}

No url shown to user and server received response:

 elicitation response (id=100000): {"result": {"action": "cancel"}, "jsonrpc": "2.0", "id": 100000}

What Should Happen?

Elicitation should be supported where:

  1. elicitation/create request should be handled properly and user should see the url.
  2. Elicitation capability should clearly reflect url mode. (it was declared in 87 but dropped in 108).

Error Messages/Logs

Version 108




{"jsonrpc": "2.0", "id": 100000, "error": {"code": -32602, "message": "MCP error -32602: Client does not support URL-mode elicitation requests"}}


Version 87 which declares the URL mode drops silently.



 MCP server "server name": Elicitation request received during initialization: {"method":"elicitation/create","params":{"mode":"url","message":"Please authorize to continue.","elicitationId":"0f5e7464-72eb-40ce-aa06-511c258b7c9a","url":"<auth_url>"}}


No url shown to user and server received response:


 elicitation response (id=100000): {"result": {"action": "cancel"}, "jsonrpc": "2.0", "id": 100000}

Steps to Reproduce

  1. Create a minimal stdio MCP server that declares elicitation.url capability and sends elicitation/create with mode: "url":
python
#!/usr/bin/env python3
"""Minimal MCP server that sends URL-mode elicitation after initialize."""
import json, sys

def write(msg):
    sys.stdout.write(json.dumps(msg) + "\n")
    sys.stdout.flush()

for line in sys.stdin:
    msg = json.loads(line.strip())
    method = msg.get("method", "")
    msg_id = msg.get("id")

    if method == "initialize":
        write({
            "jsonrpc": "2.0", "id": msg_id,
            "result": {
                "protocolVersion": "2025-11-25",
                "capabilities": {"tools": {}, "elicitation": {"url": {}}},
                "serverInfo": {"name": "elicitation-test", "version": "1.0.0"},
            }
        })

    elif method == "notifications/initialized":
        # Send URL-mode elicitation to client
        write({
            "jsonrpc": "2.0", "id": 1,
            "method": "elicitation/create",
            "params": {
                "mode": "url",
                "elicitationId": "550e8400-e29b-41d4-a716-446655440000",
                "url": "https://example.com/authorize",
                "message": "Please authorize to continue.",
            }
        })

    elif method == "tools/list":
        write({"jsonrpc": "2.0", "id": msg_id, "result": {"tools": []}})

    elif "result" in msg or "error" in msg:
        # Log client's response to elicitation/create
        print(json.dumps(msg), file=sys.stderr)
  1. Save as elicitation_test_server.py

  2. Add to ~/.claude.json: json

{
  "mcpServers": {
    "elicitation-test": {
      "type": "stdio",
      "command": "python3",
      "args": ["elicitation_test_server.py"]
    }
  }
}
  1. Run claude --debug

  2. Check stderr/debug logs for the client's response to elicitation/create

Expected: Claude Code shows the URL to the user with consent controls per MCP spec.

Actual (v2.1.87): Client declares "elicitation": {"form": {}, "url": {}} in capabilities but silently returns {"action": "cancel"}. User never sees the URL.

Actual (v2.1.108): Client declares "elicitation": {} and returns {"code": -32602, "message": "Client does not support URL-mode elicitation requests"}

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.87

Claude Code Version

2.1.108

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue can be resolved by modifying the client to properly handle URL-mode elicitation requests and declare the correct elicitation capabilities.

Guidance

  1. Verify elicitation capability declaration: Ensure that the client declares the correct elicitation capabilities, including URL mode, in its initialize request.
  2. Handle URL-mode elicitation requests: Modify the client to properly handle URL-mode elicitation requests by displaying the URL to the user and providing consent controls as per the MCP specification.
  3. Check for regression: Since this issue is identified as a regression, review the changes made between version 2.1.87 and 2.1.108 to identify the cause of the regression.
  4. Test with previous version: Test the client with version 2.1.87 to confirm that the issue is indeed a regression and to identify any differences in behavior between the two versions.

Example

No code snippet is provided as the issue does not require a specific code change, but rather a modification to the client's behavior and capability declaration.

Notes

The issue is specific to the Claude Code client and its interaction with the MCP server. The provided information suggests that the client is not properly handling URL-mode elicitation requests, which is a required feature for server-initiated OAuth authorization flows.

Recommendation

Apply a workaround by modifying the client to properly handle URL-mode elicitation requests and declare the correct elicitation capabilities. This will allow the client to display the URL to the user and provide consent controls as per the MCP specification.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING