Skip to content

[FEATURE]: add cwd field to local MCP server config #30677

@Grantmartin2002

Description

@Grantmartin2002

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Local MCP servers always spawn from the workspace dir. There's no per-server cwd in the config. So a plugin-style MCP whose entry is node server.js from a subdir needs absolute paths in the command. Also means Claude .mcp.json configs that include cwd get silently rejected by .strict().

Proposal: add an optional cwd to McpLocalConfig. Relative resolves against the workspace, absolute passes through, omitting keeps current behavior.

Mentioned as one of the workarounds for #18805:

Add a cwd option to the McpLocal schema so users can specify a fixed working directory for MCP processes

Draft PR: #30676.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions