[BUG] MCP tool calls fail: "unknown variant 'adaptive', expected 'enabled' or 'disabled'"
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?
## Description
MCP tool calls fail during request marshalling when using Claude Code 2.1.32 with Opus 4.6. The Claude API thinking: {type: "adaptive"} configuration is being incorrectly
serialized into the MCP protocol layer.
## Error
503 processing failed: failed to marshal request: unknown variant adaptive, expected enabled or disabled
## Expected Behavior
Claude API thinking configuration should be handled at the Claude API layer, not passed through MCP request marshalling. MCP tools should work regardless of thinking mode.
## Environment
- Claude Code: 2.1.32
- MCP Python SDK: 1.26.0 (latest PyPI)
- Model: Opus 4.6
- Platform: macOS
## Reproduction
- Use Claude Code 2.1.32 with Opus 4.6 (adaptive thinking enabled)
- Call any MCP tool
- Observe marshalling error before tool execution
## Notes
- The MCP SDK has no "adaptive" thinking concept - it only knows
enabled/disabled - Adaptive thinking is a Claude 4.6 API feature, not an MCP feature
- Tested with both mcp==1.26.0 (PyPI) and git main branch - neither supports "adaptive"
What Should Happen?
## What Should Happen
When Claude Code makes an MCP tool call:
- Claude API layer handles the thinking: {type: "adaptive"} configuration for the model's reasoning process
- MCP transport layer only receives the tool name and arguments - no thinking configuration
- The thinking mode should be stripped/isolated before marshalling the MCP request
Current (broken): Thinking config leaks into MCP marshalling → unknown variant 'adaptive'
Expected: Thinking config stays in Claude API layer, MCP only sees tool call data
Error Messages/Logs
503 processing failed: failed to marshal request: unknown variant `adaptive`, expected `enabled` or `disabled`
Steps to Reproduce
Steps to Reproduce
- Setup MCP server (any server works, using test as example):
cd /path/to/mcp-server
uv sync # or pip install
- Configure Claude Code to use the MCP server in ~/.claude/claude_desktop_config.json or project config
- Start Claude Code 2.1.32:
claude --version # Confirm 2.1.32
- Select Opus 4.6 model:
/model opus
- Call any MCP tool:
analyze_single_article(url="https://example.com/security-article")
- Observe error (retries ~10 times then fails):
503 processing failed: failed to marshal request: unknown variant adaptive, expected enabled or disabled
Retrying in 14 seconds… (attempt 6/10)
Key observations:
- Error occurs before the tool executes (during marshalling)
- Happens with any MCP tool, not specific to one server
- Does not occur with Opus 4.5 or when adaptive thinking is disabled
- MCP server logs show no incoming request (fails client-side)
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
4.5
Note for "Additional Information":
This is model-specific, not Claude Code version-specific:
- Opus 4.6: Fails with marshalling error
- Sonnet: Works on same Claude Code 2.1.32
Claude Code Version
Claude Code: 2.1.32
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗