modelcontextprotocol / modelcontextprotocol/servers

Claude Desktop launches command args incorrectly

Open
#1,971 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
90.5k
Forks
11.7k
Avg merge
2d 2h
Merged PRs (30d)
5

Description

Describe the bug
Trying to launch my own mcp.py script as an Claude Desktop MCP server.

Claude Desktop for Mac
Version 0.9.3

To Reproduce
Steps to reproduce the behavior:

  1. Edit claude_desktop_config.json and add entry to mcpServers with args.
  2. Launch Claude Desktop

Expected behavior
A clear and concise description of what you expected to happen.
I expect the mcp server to get called. It doesn't because of a weird args issue.

Logs
Why is it using 2 foward slashes before the args? //foo.py was not in my config?

│2025-05-30T14:54:14.103-0400 2025-05-30T18:54:14.100Z [weather] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"c│
│2025-05-30T14:54:14.254-0400 /Users/I530566/devel/mine/hamradio/haminfo/.venv/bin/python: can't open file '//foo.py': [Errno 2] No such file or directory                                            │
│2025-05-30T14:54:14.257-0400 2025-05-30T18:54:14.257Z [weather] [info] Server transport closed                                                                                                       │
│2025-05-30T14:54:14.258-0400 2025-05-30T18:54:14.257Z [weather] [info] Client transport closed

Additional context
My claude_desktop_config.json

{
  "mcpServers": {
    "weather": {
      "command": "/Users/I530566/devel/mine/hamradio/haminfo/.venv/bin/python",
      "args": [
        "foo.py"
      ],
      "env": {
        "VIRTUAL_ENV":"/Users/I530566/devel/mine/hamradio/haminfo/.venv"
      }
    }
  },
  "logging": {
    "level": "DEBUG"
  },
  "globalShortcut": "Ctrl+Q"
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided claude_desktop_config.json and compare its args entry for foo.py with the Python error showing //foo.py. Reproduce the launch using the shown virtual-environment command and inspect how Claude Desktop passes the command and arguments. Done means the configured MCP server starts without the path being rewritten incorrectly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.