# Diffbot MCP server

> Enables AI agents to perform web searches, extract structured data from pages, crawl websites, and query a massive knowledge graph of entities.

- Repository: https://github.com/diffbot/diffbot-mcp
- Page: https://hostedmcp.org/servers/diffbot/diffbot-mcp
- Transport: stdio, remote
- Stars: 3
- License: MIT
- Latest version: 0.2.1

## Install

### Claude Code

```sh
claude mcp add --env DIFFBOT_TOKEN=<YOUR_DIFFBOT_TOKEN> diffbot-mcp -- uvx diffbot-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "diffbot-mcp": {
      "command": "uvx",
      "args": [
        "diffbot-mcp"
      ],
      "env": {
        "DIFFBOT_TOKEN": "<YOUR_DIFFBOT_TOKEN>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "diffbot-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "diffbot-mcp"
      ],
      "env": {
        "DIFFBOT_TOKEN": "<YOUR_DIFFBOT_TOKEN>"
      }
    }
  }
}
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "diffbot-mcp": {
      "command": "uvx",
      "args": [
        "diffbot-mcp"
      ],
      "env": {
        "DIFFBOT_TOKEN": "<YOUR_DIFFBOT_TOKEN>"
      }
    }
  }
}
```

### Codex (`~/.codex/config.toml`)

```toml
[mcp_servers.diffbot-mcp]
command = "uvx"
args = ["diffbot-mcp"]

[mcp_servers.diffbot-mcp.env]
DIFFBOT_TOKEN = "<YOUR_DIFFBOT_TOKEN>"
```

### Gemini CLI (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "diffbot-mcp": {
      "command": "uvx",
      "args": [
        "diffbot-mcp"
      ],
      "env": {
        "DIFFBOT_TOKEN": "<YOUR_DIFFBOT_TOKEN>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `DIFFBOT_TOKEN` | no | yes | Optional. Diffbot API token. Free token: https://app.diffbot.com/get-started. DIFFBOT_API_TOKEN or ~/.diffbot/credentials also work. |
| `MCP_TRANSPORT` | no | no |  |

## FAQ

### How do I authenticate with the Diffbot MCP server?

You can use OAuth with supported clients like Claude or Cursor, or provide a Diffbot API token via an environment variable, a query parameter, or a credentials file.

### What is the difference between the extract tool and conventional fetch tools?

Unlike conventional tools that return large amounts of HTML or markdown, the extract tool classifies the page and returns content in a consistent JSON schema optimized for minimal token usage.

### Can I use the server without a token?

Yes, if you use an MCP client that supports OAuth, you can sign in with your Diffbot account without needing to paste a token.
