肯定要不少朋友在windows系统上使用claude code,但是windows系统原生不是使用linux系统所以配置mcp的话可能非常麻烦,今天我在这里教大家在windows上如何配置mcp,废话不多说直接开始。
首先我给你们推荐几个mcp的网站:
1,https://mcp.so/zh
4,https://github.com/punkpeye/awesome-mcp-servers
现在我就拿最火的smithery这个网站的mcp配置教程为例:
1,首先打开网站,选择我们想要配置的mcp,例如选择:Exa Search MCP
这个mcp就是目前比较流行的网站搜索的mcp,然后我们直接点击这个mcp,进入页面之后点击这个mcp对应的githup:
(不知道为啥上传不了图片,一直显示图片文件过大无法上传)
然后继续查找到对应配置到cursor,windsurf这些工具的配置方式:
"exa": {
    "command": "npx",
    "args": [
      "-y",
      "exa-mcp-server",
      "--tools=web_search_exa,research_paper_search,company_research,crawling,competitor_finder,linkedin_search,wikipedia_search_exa,github_search"
    ],
    "env": {
      "EXA_API_KEY": "xxxxxxxx"
    }
  }
例如上面所示,此时如果你是在windows电脑上只需要在将"command":"cmd",然后"args"中添加"/c"即可,配置好的mcp如下所示:
  "exa": {
    "command": "cmd",
    "args": [
      "/c",
      "npx",
      "-y",
      "exa-mcp-server",
      "--tools=web_search_exa,research_paper_search,company_research,crawling,competitor_finder,linkedin_search,wikipedia_search_exa,github_search"
    ],
    "env": {
      "EXA_API_KEY": "xxxxx"
    }
  }这个配置思路和方法可以适用于大部分的mcp工具
然后我们配置完成了之后,访问https://exa.ai/ 这个网站,使用谷歌账号登陆,获取对应的api key即可然后将这个api key复制到上面的"EXA_API_KEY": "xxxxx" 这个里面即可
下面我把我目前常用的所有mcp的windows配置的方法全部放在下面,基本上可以说涵盖你日常使用所有的必须的mcp,大家可以拿去即用:
{
  "mcpServers":{
  "desktop-commander": {
    "command": "cmd",
    "args": [
      "/c",
      "npx",
      "-y",
      "@smithery/cli@latest",
      "run",
      "@wonderwhy-er/desktop-commander"
    ]
  },
  "sequential-thinking": {
    "command": "cmd",
    "args": [
      "/c",
      "npx",
      "-y",
      "@modelcontextprotocol/server-sequential-thinking"
    ]
  },
  "exa": {
    "command": "cmd",
    "args": [
      "/c",
      "npx",
      "-y",
      "exa-mcp-server",
      "--tools=web_search_exa,research_paper_search,company_research,crawling,competitor_finder,linkedin_search,wikipedia_search_exa,github_search"
    ],
    "env": {
      "EXA_API_KEY": "xxxxxxxxx"
    }
  },
  "context7": {
    "command": "cmd",
    "args": [
      "/c",
      "npx",
      "-y",
      "@upstash/context7-mcp@latest"
    ]
  },
  "dbhub-air-conditioning": {
    "command": "cmd",
    "args": [
      "/c",
      "npx",
      "-y",
      "@bytebase/dbhub",
      "--dsn",
      "mysql://mqtt:xxxxxx@xxxxxxxx:3306/mqtt_air_conditioning_equipment"
    ]
  },
  "playwright": {
    "command": "cmd",
    "args": [
      "/c",
      "npx",
      "-y",
      "@executeautomation/playwright-mcp-server"
    ]
  },
  "Magic MCP": {
    "command": "cmd",
    "args": [
      "/c",
      "npx",
      "-y",
      "@21st-dev/magic@latest",
      "API_KEY=\"xxxxxxxx\""
    ],
    "env": {}
  },
  "serena": {
    "command": "uvx",
    "args": [
      "--from",
      "git+https://github.com/oraios/serena",
      "serena-mcp-server"
    ]
  },
  "fetch": {
    "command": "uvx",
    "args": [
      "mcp-server-fetch"
    ]
  }
} 
}
上面的exa、Magic 需要配置对应的api key 这个可以去官网获取之后复制粘贴即可
dbhub MCP特别强大,就是目前市面上大部分数据库的mcp工具包括但不限于:MySQL、sqlserver、SQLite等等 配置的话需要使用自己的数据库的用户名,密码,如果不知道具体某个数据库的配置教程可以直接问claude code如果觉得不错的话,麻烦各位看官点赞收藏,谢谢
 ChatGPT Pro 俱乐部
																		ChatGPT Pro 俱乐部