[BUG] MCP client doesn't automatically handle `-32001` insufficient scope errors per specification

Resolved 💬 2 comments Opened Feb 23, 2026 by gurudatta-stripe Closed Feb 24, 2026

Preflight Checklist

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

What's Wrong?

Summary

According to the MCP specification for Runtime Insufficient Scope
Errors
, when a tool
returns a -32001 error code indicating insufficient OAuth scope, the MCP client should automatically detect this and re-initiate the
authorization flow.

Claude Code currently does not handle this automatically, requiring users to manually reconnect via /mcp to grant additional
permissions.

## Current Behavior

When an MCP tool returns an insufficient scope error:
```json
{
"error": {
"code": -32001,
"message": "Insufficient scope: This tool requires additional permissions for account acct_xxx. Please reauthorize with <scope_name>
scope."
}
}

Claude Code displays the error but does not automatically trigger reauthorization. The assistant must either:

  1. Manually call a reauthorization tool (if available)
  2. Instruct the user to run /mcp to reconnect

What Should Happen?

Expected Behavior

Per the MCP spec, the client should:

  1. Detect the -32001 error code
  2. Automatically re-initiate the OAuth authorization flow
  3. Prompt the user to grant the additional scopes
  4. Retry the operation once reauthorization completes
  • MCP server: OAuth-enabled MCP server

Error Messages/Logs

MCP Specification Reference

  https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization#runtime-insufficient-scope-errors

Steps to Reproduce

Reproduction Steps

  1. Connect to an MCP server with OAuth support
  2. Authorize with limited scopes for a specific resource
  3. Attempt to call a tool that requires additional permissions
  4. Observe that a -32001 error is returned
  5. Note that no automatic reauthorization flow is triggered

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.39 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗