Skip to content

feat: adds cwd to the MCP yaml as an option. #6280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

bdougie
Copy link
Collaborator

@bdougie bdougie commented Jun 24, 2025

Description

Now users can configure MCP servers with a current working directory (cwd):

  mcpServers:
    - name: my-project-server
      command: npm
      args: ["run", "mcp-server"]
      cwd: "/path/to/my/project" # this field is new
      env:
        NODE_ENV: "production"

The implementation supports:

  • Absolute paths: /Users/developer/project
  • Relative paths: ./my-project or ../servers
  • Optional usage (backward compatible)

The cwd option will be passed directly to the StdioClientTransport, allowing MCP servers to run in their intended working directory context.

This work unblocks the work I am doing with LanceDB in this repo

https://github.com/bdougie/git_blame_search/?tab=readme-ov-file#continue-integration

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Screenshots

[ For visual changes, include screenshots. Screen recordings are particularly helpful, and appreciated! ]

Tests

Note the tests were generated using Claude. cc @uinstinct for a look to see if they match the work you've already done.

The tests confirm that the cwd is not required and successfully transports the MCP to the current directory.

@bdougie bdougie requested a review from a team as a code owner June 24, 2025 18:38
@bdougie bdougie requested review from tomasz-stefaniak and removed request for a team June 24, 2025 18:38
Copy link

netlify bot commented Jun 24, 2025

Deploy Preview for continuedev canceled.

Name Link
🔨 Latest commit e662a66
🔍 Latest deploy log https://app.netlify.com/projects/continuedev/deploys/685d3b12aae3650008190832

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 24, 2025
Copy link

recurseml bot commented Jun 24, 2025

⚠️ Only 5 files will be analyzed due to processing limits.

Copy link

recurseml bot commented Jun 24, 2025

✨ No issues found! Your code is sparkling clean! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants