DEV Community

Rashid Salimov
Rashid Salimov

Posted on Originally published at vault-pro.rashid-salimov96.workers.dev

The Missing Guide to Model Context Protocol (MCP): Connect Any Tool to Claude & Cursor

If you have experimented with AI coding or autonomous agents recently, you have likely run into the Model Context Protocol (MCP).

Anthropic released MCP as an open specification to solve a massive industry headache: the $N \times M$ integration problem. Before MCP, connecting $N$ AI hosts (Claude Desktop, Cursor IDE, agentic CLIs) to $M$ external data sources (GitHub repos, Postgres databases, browser drivers, local file systems) required building bespoke wrappers and custom function-calling pipelines for every single runtime.

MCP does for AI what USB-C did for hardware and LSP (Language Server Protocol) did for IDEs. Build your tool server once using the open JSON-RPC standard, and it instantly works across Claude Desktop, Cursor, and any MCP-compliant environment.

Here is a practical, fluff-free guide to how MCP works under the hood, how to wire up servers in Claude Desktop and Cursor, and verified configs you can use right away.


1. The MCP Architecture in Plain English

MCP operates on a clean client-server architecture using standard JSON-RPC 2.0:

┌────────────────────────────────────────┐
│               MCP Host                 │
│  (Claude Desktop, Cursor Composer)     │
│                                        │
│   ┌────────────────────────────────┐   │
│   │           MCP Client           │   │
│   └───────────────┬────────────────┘   │
└───────────────────┼────────────────────┘
                    │ stdio / SSE (JSON-RPC)
┌───────────────────▼────────────────────┐
│               MCP Server               │
│   (Filesystem, SQLite, Browser-Use)    │
│                                        │
│  • Resources: Read-only context        │
│  • Tools: Executable actions           │
│  • Prompts: Context templates          │
└────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

The protocol specifies three fundamental primitives:

  1. Resources (Passive / Read-Only): Expose contextual data without side effects (e.g., reading a configuration file, inspecting a database schema, streaming server logs).
  2. Tools (Active / Executable): Functions the LLM can decide to invoke with arguments to produce side effects (e.g., running a SQL query, issuing an HTTP request, clicking an element in a browser).
  3. Prompts (Interaction Templates): Pre-packaged prompt workflows exposed by the server (e.g., automated code review, SQL optimization).

2. Setting Up Claude Desktop (claude_desktop_config.json)

Claude Desktop discovers your MCP servers through a single local JSON configuration file.

Where to Find It

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json (e.g. C:\Users\YOUR_NAME\AppData\Roaming\Claude\claude_desktop_config.json)

Ready-to-Run Production Config

Here is a tested configuration enabling local file operations, SQLite querying, and external web fetching:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Projects"
      ]
    },
    "sqlite": {
      "command": "uvx",
      "args": [
        "mcp-server-sqlite",
        "--db-path",
        "/Users/username/data/production.db"
      ]
    },
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Pro Tip: Fully restart Claude Desktop after editing this file (Cmd+Q on macOS or right-click exit from the Windows system tray). Once loaded, a small hammer icon appears in the bottom right corner of Claude's prompt box showing your registered tools.


3. Configuring MCP in Cursor IDE

Cursor natively supports MCP servers inside Composer and Agentic Chat:

  1. Open Cursor Settings (Cmd+, on macOS or Ctrl+, on Windows).
  2. Select Features in the sidebar, then navigate to MCP Servers.
  3. Click + Add New MCP Server.
  4. Fill in the details:
    • Name: e.g., browser-crawler
    • Type: command (for standard stdio transport)
    • Command: npx -y crawl4ai-mcp (or your chosen package).

Now Cursor's background agent can automatically call these tools to inspect live documentation, crawl web endpoints, and verify database states while writing code.


4. Top 5 Open-Source MCP Servers to Supercharge Your Setup

  1. Browser-Use: Full autonomous Playwright browser control. The agent navigates websites, handles cookies and logins, and extracts structured data.
  2. Crawl4AI: Lightning-fast web crawler built specifically for LLMs. Converts heavy JS Single Page Applications into clean, semantic Markdown.
  3. FastMCP: The easiest way to build your own Python MCP server in ~15 lines with the @mcp.tool() decorator.
  4. Mem0: Universal memory layer for AI agents that persists user preferences and project knowledge between sessions.
  5. Ollama MCP: Route private context and tasks through local open-weights models (DeepSeek, Llama 3) without sending data to external APIs.

5. Explore Verified 1-Click Configs

If you don't want to write JSON configs by hand or guess command line arguments, check out the AI & MCP Tools Catalog on Digital Vault PRO.

It provides an up-to-date directory of trending open-source AI projects with one-click copyable claude_desktop_config.json snippets, architecture breakdowns, and direct links to official repositories.

Have you built a custom MCP server yet? What tools have made the biggest difference in your daily agent workflow? Let's discuss in the comments!

Top comments (0)