# Cursor

> Add DarkCrawl to Cursor so it can read .onion pages for you.

Works with Cursor

**Hosted**

1. [Get a key](https://darkcrawl.dev/docs/build-with-ai/get-a-key/), then set it in your environment as `DARKCRAWL_API_KEY`. Start Cursor from a terminal where it is set.

2. Add the server to `mcp.json`: `~/.cursor/mcp.json` for every project, or `.cursor/mcp.json` inside one project. Cursor reads the key from `DARKCRAWL_API_KEY`, so the file never holds it.

   ```json
   {
     "mcpServers": {
       "darkcrawl": {
         "url": "https://api.darkcrawl.dev/mcp",
         "headers": {
           "Authorization": "Bearer ${env:DARKCRAWL_API_KEY}"
         }
       }
     }
   }
   ```

3. Check it. Ask Cursor to list the tools DarkCrawl gives it. You should see the tools on the [MCP page](https://darkcrawl.dev/docs/mcp/).

**On your own server**

1. [Run DarkCrawl](https://darkcrawl.dev/docs/run-it-yourself/) on your own machine. The commands below point at it at `http://127.0.0.1:3002`.

2. Install the `darkcrawl` command with its MCP extra, from the repository root.

   ```bash
   uv tool install --reinstall --python 3.13 '.[mcp]'
   ```

3. Add the server to `mcp.json`: `~/.cursor/mcp.json` for every project, or `.cursor/mcp.json` inside one project. Put your key in place of `YOUR_API_KEY`.

   ```json
   {
     "mcpServers": {
       "darkcrawl": {
         "type": "stdio",
         "command": "darkcrawl",
         "args": [
           "--url",
           "http://127.0.0.1:3002",
           "mcp"
         ],
         "env": {
           "DARKCRAWL_API_KEY": "YOUR_API_KEY"
         }
       }
     }
   }
   ```

4. Ask Cursor to list the tools DarkCrawl gives it. You should see the tools on the [MCP page](https://darkcrawl.dev/docs/mcp/).

Cursor is a trademark of Anysphere, Inc.
