Using A MCP Server With Cursor

Cursor can leverage a Model Context Protocol (MCP) server which can greatly aid development. You can use a MCP server that is local to the project by adding it to .cursor/mcp.json or global for all projects you work with in cursor a \~/.cursor/mcp.json in your home directory. You can read more about what Model Context Protocol is on the official site

A very large collection of MCP servers is available at awesome-mcp-servers. Let’s say you want to leverage a MCP server to help with programming language documentation. We can find a MCP server that provides documentation with mcp-package-docs

Let’s first install the mcp server:

npx -y mcp-package-docs

Now that it is installed, let’s add it to our cursor mcp.json file, either locally for a project or globally:

{
  "mcpServers": {
    "mcp-package-docs": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-package-docs"
      ]
    }
  }
}

Et voilà!

Read more about it here