Installation Guide

This guide covers how to set up the Deepwiki MCP Server for use with clients like Cursor and how to install it from source for local development or contributions.

Using with Cursor

To integrate this tool directly with the Cursor IDE, you can add it to your .cursor/mcp.json configuration file. This allows you to call the deepwiki tools from within your development environment.

  1. Open or Create mcp.json: Locate the .cursor directory in your user's home folder and open the mcp.json file.

  2. Add Server Configuration: Add the following entry to the mcpServers object. This configuration instructs Cursor to download and run the package from npm when the mcp-deepwiki command is invoked.

    {
      "mcpServers": {
        "mcp-deepwiki": {
          "command": "npx",
          "args": ["-y", "mcp-deepwiki@latest"]
        }
      }
    }
  3. For Local Development: If you have cloned the repository and want to use your local version with Cursor, you can point the command to your local executable binary.

    {
      "mcpServers": {
        "mcp-deepwiki": {
          "command": "node",
          "args": ["/path/to/your/project/bin/cli.mjs"]
        }
      }
    }

Installing from Source

If you want to run the server locally, modify the code, or contribute to the project, you'll need to install it from the source code.

Prerequisites

  • Node.js (version >=18.0.0)
  • pnpm (version >= 9.14.4 recommended)

Steps

  1. Clone the repository:

    git clone https://github.com/regenrek/deepwiki-mcp.git
    cd deepwiki-mcp
  2. Install dependencies:

    The project uses pnpm for package management. It's recommended to enable corepack if you haven't already (corepack enable).

    pnpm install
  3. Build the project:

    The source code is written in TypeScript and needs to be compiled to JavaScript. The build script also ensures the CLI binary is executable.

    pnpm run build

After these steps, the compiled output will be in the dist/ directory, and the CLI entry point will be available at bin/cli.mjs. You can now run the server locally as described in the Usage Guide.