[FEATURE] Feature Request: Expose Workspace Path to MCP Servers via Environment Variable

Resolved 💬 4 comments Opened Mar 31, 2026 by evdboom Closed May 6, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When Cowork launches MCP servers, it should inject the currently linked workspace path as an environment variable. This allows workspace-aware MCP servers to locate the user's project without requiring manual path configuration.

MCP servers that need to know where the user's project lives typically fall back to process.cwd(). This works well in Claude Code, which cds into the project folder before spawning the server. In Cowork, however, the MCP process inherits Claude Desktop's own working directory (e.g. C:\Windows\system32 on Windows), making process.cwd() useless for project discovery.
The current workaround — hardcoding the path in the MCP config's env block — defeats the purpose of Cowork's workspace-linking feature and breaks portability: the same MCP installed once in Claude Desktop should work with any workspace a user links to, not just the one path that was hardcoded at setup time.

Proposed Solution

When Cowork launches MCP servers, inject the linked workspace path as a well-known environment variable:
COWORK_WORKSPACE_ROOT=C:\Users\Me\Workspace
MCP servers can then read COWORK_WORKSPACE_ROOT as a high-priority fallback before process.cwd(), staying fully zero-config for Cowork users.

Alternative Solutions

Currently i have an array mapping in the MCP config, the toolcalls require the agent to select one of the mappings. But they can select the other options.

Priority

Medium - Would be very helpful

Feature Category

MCP server integration

Use Case Example

A user has two books, each in its own Cowork workspace:

C:\Users\Me\BookA
C:\Users\Me\BookB

With this feature, opening either workspace in Cowork automatically scopes the MCP to the right folder — no reconfiguration needed. Without it, the MCP always resolves to the wrong directory and must be manually reconfigured per book.

Additional Context

Why This Matters
Workspace-aware MCP servers are a natural fit for Cowork: tools like document indexers, book authoring assistants, or code analysis servers are inherently scoped to a folder. A standard environment variable for workspace discovery would make such MCPs truly portable and zero-config — install once, works everywhere.
Requested By
Erik van der Boom — author of Bindery, a workspace-scoped MCP server for markdown book authoring.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗