Cline中配置MCP

1、自动安装MCP

默认AI生成的配置会报错:spawn npx ENOENT spawn npx ENOENT,然后排查了npx安装都是OK的,需要使用cmd运行npx,配置如下:

{
  "mcpServers": {
    "sequentialthinking": {
      "autoApprove": [],
      "disabled": false,
      "timeout": 60,
      "command": "cmd.exe",
      "args": [
        "/c",
        "npx",
        "-y",
        "@modelcontextprotocol/server-sequential-thinking"
      ],
      "transportType": "stdio"
    }
  }
}

2、基于uv开发的本地MCP

{
  "mcpServers": {
    "arithmatic-mcp": {
      "timeout": 60,
      "command": "uv",
      "args": [
        "--directory",
        "D:\\work\\MCP\\stock-mcp-master",
        "run",
        "arithmatic_server.py"
      ],
      "transportType": "stdio"
    },
}

你可能感兴趣的:(MCP)