Claude 桌面版开发

1. 下载 Claude 桌面版
2. 添加文件系统 MCP 服务器(Filesystem MCP Server)


~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop",
"/Users/username/Downloads"
]
}
}
}
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"C:\\Users\\username\\Desktop",
"C:\\Users\\username\\Downloads"
]
}
}
}
username
替换为您的计算机用户名。 这些路径应指向您希望 Claude 能够访问和修改的有效目录。 它设置为可用于桌面和下载,但您也可以添加更多路径。
配置文件的作用是什么?
此配置文件告诉 Claude 桌面版每次启动应用程序时启动哪些 MCP 服务器。 在这种情况下,我们添加了一个名为“filesystem”的服务器,该服务器将使用 Nodenpx
命令来安装和运行@modelcontextprotocol/server-filesystem
。 此服务器,此处 描述,将允许您在 Claude 桌面版中访问您的文件系统。
命令权限
Claude 桌面版将使用您的用户帐户的权限运行配置文件中的命令,并访问您的本地文件。 仅当您理解并信任来源时才添加命令。
3. 重启 Claude


4. 试用一下!
