-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
When an agent attempts to call the Firecrawl MCP tool (firecrawl_scrape) within Claude Code on a Google Cloud VM, the tool call is incorrectly executed as a bash command rather than being routed through the MCP protocol. This results in a "command not found" error. Direct Claude Code interactions with the same Firecrawl MCP tool work as expected.
Steps to reproduce the issue:
- Set up Claude Code on a Google Cloud VM (Ubuntu) with Firecrawl MCP server configured
- Verify direct MCP tool calls work by asking Claude Code to scrape a page (e.g., "use firecrawl scrape to get the markdown of [URL]") - this succeeds
- Configure an agent that attempts to call the Firecrawl MCP tool
- Agent executes:
Bash(mcp__firecrawl__firecrawl_scrape '{"url": "https://www.gcex.com/blog/grand-canyon-weather-by-month", "formats": ["markdown"]}') - Observe the error:
Error: /bin/bash: line 1: mcp__firecrawl__firecrawl_scrape: command not found
Expected Behavior
The agent should successfully invoke the Firecrawl MCP tool through the MCP protocol (similar to how direct Claude Code interactions work), resulting in the markdown content being retrieved from the specified URL. The tool call should be routed to the MCP server rather than being executed as a shell command.
Environment (please complete the following information):
- OS: Ubuntu (Google Cloud VM)
- Deployment Type: HTTPs (Claude Code)
Additional Context
- The issue appears to be related to how agents invoke MCP tools versus direct Claude Code invocations
- Direct Claude Code commands successfully use the Firecrawl MCP tool
- The agent is wrapping the MCP tool call in a
Bash()execution context, which causes it to be interpreted as a shell command rather than an MCP protocol call - This suggests a potential issue with agent tool routing or MCP tool registration within the agent execution context
- The MCP server appears to be properly configured since direct calls work correctly