← Back to tutorials

Complete MCP Server Installation Guide 2026: Configuration for Claude Desktop and Cursor

From Scratch: What MCP Is, How to Install and Configure It, and How to Fix Common Errors

What is MCP (Explanation for Non-Technical Users)

Model Context Protocol (MCP) is a protocol that allows AI tools (Claude, Cursor, etc.) to "operate" external tools.

  • Without MCP: AI can only answer questions, unable to access your files, databases, or external services.
  • With MCP: AI can read and write files, query databases, search the web, and manipulate code repositories.
  • Simple analogy: MCP is like giving AI a "hand" so it can actually operate a computer, not just a "mouth."

    Pre-Installation Preparation

    Must have installed:

  • Node.js 18+ (verify with node -v)
  • Python 3.9+ (if using Python-based MCP servers)
  • npm or npx (comes with Node.js)
  • Optional (recommended):

  • uv (Python package manager, faster than pip): pip install uv
  • Configuration for Claude Desktop

    Configuration file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Basic configuration example (filesystem + fetch):

    json
    {
      "mcpServers": {
        "filesystem": {
          "command": "npx",
          "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/your_username"]
        },
        "fetch": {
          "command": "uvx",
          "args": ["mcp-server-fetch"]
        }
      }
    }
    

    After modification: Fully restart Claude Desktop (not just close the window, but quit the entire app).

    Configuration for Cursor

    Global configuration file: ~/.cursor/mcp.json

    Project-level configuration: Create .cursor/mcp.json in the project root directory.

    json
    {
      "mcpServers": {
        "github": {
          "command": "npx",
          "args": ["-y", "@modelcontextprotocol/server-github"],
          "env": {
            "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token"
          }
        }
      }
    }
    

    Verify Installation Success

    Claude Desktop: After restarting, ask in a conversation "What tools can you access?" If it lists MCP tool names, the installation is successful.

    Cursor: After configuring .cursor/mcp.json, check the server status in Cursor Settings → MCP (green dot = normal).

    5 Recommended MCP Servers for Beginners

  • filesystem - Read and write files: @modelcontextprotocol/server-filesystem
  • fetch - Fetch web page content: mcp-server-fetch (requires uvx)
  • memory - Cross-conversation memory: @modelcontextprotocol/server-memory
  • brave-search - Web search (requires Brave API key)
  • github - Git repository operations (requires GitHub token)
  • Common Error Fixes

    Error 1: command not found: npx Fix: Install Node.js and ensure node is in your PATH.

    Error 2: MCP server shows red dot / cannot connect Fix: Check if the configuration file JSON format is correct (recommend using a JSON validator).

    Error 3: Filesystem MCP but Claude says "Cannot access file" Fix: Ensure the path in the configuration is a correct absolute path and that Claude has read permissions.

    Error 4: uvx: command not found Fix: Run pip install uv and ensure uv is in your PATH.

    Also available in 中文.