一、配置mcp.json文件

  1. {
  2. "mcpServers": {
  3. "filesystem": {
  4. "command": "cmd /c npx",
  5. "args": [
  6. "-y",
  7. "@modelcontextprotocol/server-filesystem",
  8. "C:\\Users\\Administrator\\Desktop"
  9. ]
  10. }
  11. }
  12. }

Cursor安装MCP文件系统服务器 - 图1

注意:配置完成后,图中标注绿色圈标注的小图标为绿色时则表示MCP服务器配置成功

二、在聊天窗口中发送命令

Cursor安装MCP文件系统服务器 - 图2

注意:一定要在agent模式下!

如果需要禁用Cursor的语法检查,可以在settings.json中做如下配置:

  1. {
  2. "editor.lint.enabled": false,
  3. "editor.formatOnSave": false,
  4. "editor.codeActionsOnSave": {
  5. "source.fixAll": "never"
  6. },
  7. "javascript.validate.enable": false,
  8. "typescript.validate.enable": false,
  9. "css.validate": false,
  10. "less.validate": false,
  11. "scss.validate": false,
  12. "java.compile.nullAnalysis.mode": "disabled",
  13. "kotlin.languageServer.enabled": false,
  14. "kotlin.debugAdapter.enabled": false,
  15. "problems.decorations.enabled": false,
  16. "editor.quickSuggestions": {
  17. "other": false,
  18. "comments": false,
  19. "strings": false
  20. },
  21. "editor.suggestOnTriggerCharacters": false,
  22. "editor.wordBasedSuggestions": "off",
  23. "editor.parameterHints.enabled": false,
  24. "editor.diagnostics.enabled": false
  25. }