Description
The MCP tools (test, create, packages_get, packages_check_licenses) always run from the directory where Claude Code was launched. There is no path or directory parameter to specify a different working directory.
In monorepo setups where the Flutter project lives in a subdirectory (e.g. mobile/), the test tool fails with exit code 66 (no test suites found) because it runs from the repo root and can't find the pubspec.yaml.
The Claude Code Bash tool maintains its own working directory state, but MCP tools don't inherit it — so even after cd mobile, the MCP tool still runs from the root.
A path parameter on all MCP tools would solve this:
Requirements
Additional Context
Reproduction steps:
- Open Claude Code in a monorepo where the Flutter project is in a subdirectory (e.g.
mobile/)
- Call the
test MCP tool
- It fails with exit code 66 because it runs from the repo root
Description
The MCP tools (
test,create,packages_get,packages_check_licenses) always run from the directory where Claude Code was launched. There is nopathordirectoryparameter to specify a different working directory.In monorepo setups where the Flutter project lives in a subdirectory (e.g.
mobile/), thetesttool fails with exit code 66 (no test suites found) because it runs from the repo root and can't find thepubspec.yaml.The Claude Code Bash tool maintains its own working directory state, but MCP tools don't inherit it — so even after
cd mobile, the MCP tool still runs from the root.A
pathparameter on all MCP tools would solve this:{ "path": "mobile" }Requirements
pathparameter to set the working directory.pathis omitted, behavior remains unchanged (runs from project root).Additional Context
Reproduction steps:
mobile/)testMCP tool