MCP 安装教程

如何在 Claude Desktop 中安装 MCP

Claude Desktop MCP 安装教程:JSON 配置、重启步骤和常见修复方法。

适合谁?

适合想把 Claude 连接到文件、工具、API、浏览器自动化或私有数据源的用户。

配置路径和示例

Claude Desktop MCP settings JSON

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "./"]
    }
  }
}

安装步骤

1

Choose a trusted MCP server

Prefer servers with a clear install command, low risk, and a GitHub or registry source.

2

Open Claude Desktop MCP settings

Open Claude settings and find the MCP configuration file or developer settings.

3

Paste the JSON config

Add the server under mcpServers, keeping command and args split correctly.

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "./"]
    }
  }
}
4

Restart Claude Desktop

Fully quit and reopen Claude Desktop so MCP servers reload.

5

Confirm tools appear

If tools do not appear, check JSON syntax, command availability, and required tokens.

常见问题

Command not found

Install the runtime required by the MCP command, then run the command in terminal first.

Invalid JSON

Check commas, quotes, and that mcpServers is the top-level object.

Server not showing

Restart Claude Desktop and check logs for MCP startup errors.

FAQ

Does Claude Desktop use MCP JSON?

Yes. Claude Desktop uses JSON config with an mcpServers object.

Can Claude Desktop use multiple MCP servers?

Yes. Add multiple named entries under mcpServers.