MCP 安装教程

Cursor MCP 配置路径指南

查找 Cursor MCP 配置文件位置,并安全编辑 mcp.json。

适合谁?

适合在安装 MCP 前需要找到 Cursor 配置路径的用户。

配置路径和示例

~/.cursor/mcp.json

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

安装步骤

1

Open Cursor settings

Use Cursor settings to open the MCP config when possible.

2

Back up mcp.json

Copy the existing file before changing it.

3

Paste generated config

Use the generator to avoid malformed JSON.

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

Restart Cursor

Reload MCP servers after saving.

常见问题

Wrong profile

Make sure you edit the config for the Cursor profile you are using.

FAQ

Can I edit the file manually?

Yes, but validate JSON before restarting Cursor.