Skip to content

feat: add path parameter to MCP tools for monorepo support #70

@omartinma

Description

@omartinma

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:

{
  "path": "mobile"
}

Requirements

  • All MCP tools that run CLI commands accept an optional path parameter to set the working directory.
  • When path is omitted, behavior remains unchanged (runs from project root).
  • All CI/CD checks are passing.
  • There is no drop in the test coverage percentage.

Additional Context

Reproduction steps:

  1. Open Claude Code in a monorepo where the Flutter project is in a subdirectory (e.g. mobile/)
  2. Call the test MCP tool
  3. It fails with exit code 66 because it runs from the repo root

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions