一、配置mcp.json文件
{
"mcpServers": {
"filesystem": {
"command": "cmd /c npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"C:\\Users\\Administrator\\Desktop"
]
}
}
}
注意:配置完成后,图中标注绿色圈标注的小图标为绿色时则表示MCP服务器配置成功
二、在聊天窗口中发送命令
注意:一定要在agent模式下!
如果需要禁用Cursor的语法检查,可以在settings.json中做如下配置:
{
"editor.lint.enabled": false,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll": "never"
},
"javascript.validate.enable": false,
"typescript.validate.enable": false,
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"java.compile.nullAnalysis.mode": "disabled",
"kotlin.languageServer.enabled": false,
"kotlin.debugAdapter.enabled": false,
"problems.decorations.enabled": false,
"editor.quickSuggestions": {
"other": false,
"comments": false,
"strings": false
},
"editor.suggestOnTriggerCharacters": false,
"editor.wordBasedSuggestions": "off",
"editor.parameterHints.enabled": false,
"editor.diagnostics.enabled": false
}