modelcontextprotocol / servers

Model Context Protocol Servers
https://modelcontextprotocol.io
MIT License
3.45k stars 308 forks source link

Can't see the Model Context protocol icon on MAC desktop app after adding claude_desktop_config.json file #121

Closed shotgunner closed 3 days ago

shotgunner commented 3 days ago

Describe the bug I downloaded the latest version of claude desktop for MAC and created claude_desktop_config.json file in Users/mojtaba/Library/Application Support/Claude/claude_desktop_config.json but after restarting the claude after even 30 minutes, I coudn't see MCP Icon image

To Reproduce Steps to reproduce the behavior:

  1. download claude desktop for MAC
  2. edit Users/mojtaba/Library/Application Support/Claude/claude_desktop_config.json with brave search config:
    {
    "mcpServers": {
    "brave-search": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-brave-search"
      ],
      "env": {
        "BRAVE_API_KEY": "API_KEY_HERE"
      }
    }
    } 
    }
  3. restart the app and see the icon is not there

Expected behavior MCP icon should be there and after restarting

mmirza1 commented 3 days ago

Following the instructions from #64 and #75, I changed my setup to reference to the executables directly and not use npx. Also installed the packages globally. Now it works. Here is what mine looks like,

{
  "mcpServers": {
    "filesystem": {
      "command": "/opt/homebrew/opt/node@22/bin/node",
      "args": [
        "/Users/user/.npm-global/lib/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js",
        "/Users/user/folder"
      ]
    }
  }
}
shotgunner commented 3 days ago

it is resolved. The issue was root access !!

when I ran this command manually:

npx -y @modelcontextprotocol/server-brave-search

Among the lines of the error I saw this: EACCES: permission denied, mkdir

so after change the permission of npm folder like this: sudo chown 502:20 "Users/mojtaba/.npm" it is resolved. another solution is run the npx with sudo one time like this:

sudo npx -y @modelcontextprotocol/server-brave-search

then the problem solved ! :D