-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Description
Added an agent (MCP Server) with protocol MCP and Custom JWT Auth. After deploying the agent, tried to test it with agentcore invoke command. It returns the following:
agentcore invoke --agent FlightsMcp call-tool --tool search_flights --input '{"origin": "SFO", "destination": "JFK", "date":"05/04/2026"}'
Failed to call MCP tool: Authorization method mismatch. The agent is configured for a different authorization method than what was used in your request. Check the agent's authorization configuration and ensure your request uses the matching method (OAuth or SigV4)
Steps to Reproduce
-
agentcore add agent
--name FlightsMcp
--type byo
--code-location ./flights_mcp
--entrypoint server.py
--protocol MCP
--language Python
--authorizer-type CUSTOM_JWT
--discovery-url
--allowed-clients
--allowed-scopes -
agentcore deploy -y
-
agentcore invoke --agent FlightsMcp call-tool --tool search_flights --input '{"origin": "SFO", "destination": "JFK", "date":"05/04/2026"}'
Expected Behavior
Expected to see response calling the MCP tool search_flights.
Actual Behavior
Failed to call MCP tool: Authorization method mismatch. The agent is configured for a different authorization method than what was used in your request. Check the agent's authorization configuration and ensure your request uses the matching method (OAuth or SigV4)
CLI Version
0.3.0-preview.9.0
Operating System
macOS
Additional Context
No response