MCP tool place_stock_order fails with type validation error when passing qty or notional
Status Open
Reported on v2.1.296
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 0 comments · opened Oct 13, 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?
The Alpaca MCP server's place_stock_order tool fails with a pydantic validation error when qty or notional are passed, even as string values. The tool's Python source correctly types these as Optional[str], but the MCP client layer appears to coerce the values to int/float before validation.
What Should Happen?
The order should be placed successfully
Error Messages/Logs
1 validation error for call[place_stock_order]
qty
Input should be a valid string [type=string_type, input_value=1, input_type=int]
Steps to Reproduce
Configure the Alpaca MCP server (uvx alpaca-mcp-server)
Ask Claude to place a stock order with qty=1
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.296
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Actual: Pydantic validation error — qty must be a string but receives an int
Workaround: Call the Alpaca REST API directly via Python/curl, bypassing the MCP tool.
Environment: Claude desktop app, Windows 11, alpaca-mcp-server v2.4.0