diffbot-mcp
OfficialDiffbot MCP server lets agents fetch, search, crawl, and query web and Knowledge Graph data through Diffbot APIs.
Extract web pages: fetch live, JavaScript-rendered pages as markdown or typed JSON (articles, products, discussions, jobs, events, lists, etc.).
Search the web: ranked web results with passages and scores, plus cached full-page retrieval via
url:<URL>.Crawl websites: start, poll, list, and delete background site crawls that extract discovered pages into markdown or typed JSON.
Search news: articles by mentioned entities, topic, publisher, language, country, date range, sentiment, or quoted speaker.
Search structured Knowledge Graph entities: organizations, people, places, and deals/funding/M&A with rich filters and facets.
Resolve entities: recognize and link people, organizations, places, and products in text to Diffbot Knowledge Graph IDs and DQL filters.
Run raw DQL: query any Knowledge Graph entity type, cross-entity shapes, facet aggregations, and return CSV or JSON.
Explore and probe the ontology: look up entity types, field paths, taxonomies, enums, and test query hit counts before pulling rows.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@diffbot-mcp search for the latest research on climate change"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Diffbot MCP Server
Web knowledge fetching tools for your agent.
One click adds the hosted server and signs you in with a Diffbot account, no token to paste.
For the local uvx diffbot-mcp server instead: Cursor Β· VS Code.
What is Diffbot? Diffbot is an applied AI lab building models that structure all of human knowledge. Our commercial product suite make it possible to fetch and structure knowledge at the scale of the entire public web.
This is the MCP counterpart to diffbot-skills without requiring bash access.
Tools
Web
𧬠extract
Web fetch tool alternative. Conventional fetch tools return either 500k+ tokens of HTML or a markdown approximation of the page's content. Extract classifies the page it is fetching and extracts content into a meaningful and consistent JSON schema. Responses are optimized for minimal token usage while maintaining data fidelity. Learn more..
π search_web
Web search tool that ranks accuracy, not popularity. Built on Diffbot's independent web index. Ranking model heavily favors primary sources over secondary sources (e.g. press release > news piece on said press release). Returns markdown formatted content chunks for source citation, with num_results and max_tokens controls. Learn more.
Also includes a page cache reader. Query url:<URL> and it returns Diffbot's already-parsed copy of that page from the index in a fraction of the time for live fetch. Use it for full content from reference prose (docs, articles, papers) and reach for extract when the page's current state matters.
π·οΈ crawl
Find all links on a web page (the seed) and extract them all. A classic web crawl without the need for scraping rules. Crawls run as background jobs and can be polled for status. Crawl automatically classifies and structures pages in a standard ontology for easy querying. Use crawl to archive documentation, take snapshots of web projects, or site mapping. Learn More.
π§ resolve_entities
Recognize and resolve entities in text. Uses Diffbot NLP to recognize organizations, people, places, addresses, and other proper nouns in text. Entities are resolved to entity IDs in the Diffbot Knowledge Graph, and the response includes a ready-made dql_filter (id:or(...)) to fetch their full records with dql. Use to keep AI hallucinations in check and explore deep research opportunities. Learn more.
Knowledge Graph
The Diffbot Knowledge Graph contains over 10 billion entities: Organizations, people, news, places, and more, all linked together by their relationship to each other. It is a representation of things, facts, and connections mentioned by the trillions of websites that make up the public web.
π° search_news
News and articles by mentioned entity, topic, publisher, language, date range, or sentiment. Newest first by default, relevance-ranked inside a date window.
π’ search_organizations
Companies by industry, headquarters, headcount, revenue, funding, ownership, or leadership, plus similar_to lookalike lists for competitor mapping.
π€ search_people
People by title, employer, employer industry, skills, education, location, or nationality. Covers people with a public online professional presence only.
πΊοΈ search_places
Cities, counties, states, countries, and points of interest by name, population, prominence, containing place, or proximity.
πΈ search_deals
Funding rounds, investments, and acquisitions by date, size, series, investor, acquirer, or industry.
π― dql
Raw querying of the Diffbot Knowledge Graph. The general-purpose layer under the five tools above, for any entity type or query shape they do not cover: products, patents, brands, job posts, cross-entity queries, and facet aggregations. Returns compact csv rows with per-type default columns, or full json records on request.
π¬ dql_probe
Parallel hit counts for several candidate queries. The way to check that a query is neither too broad nor too narrow before pulling rows, and to compare the {} co-constrained form of a query against the loose one.
π§ dql_ontology
Helper utility for accurate dql ontology navigation. Holds the keys to Diffbot's entire ontology and taxonomy reference: entity types, fields, taxonomies, and enums. A guessed field name is silently ignored by the graph, so this is how the exact spelling gets confirmed. Humans don't need to touch this, but feel free to satisfy your curiosity.
Related MCP server: better-fetch
Example Prompts
# extract
β Install Diffbot agent skills following these instructions https://www.diffbot.com/docs/interfaces/agent-skills
# crawl
β Crawl Philips' websites for product data sheet PDFs
# search_organizations
β AI companies based in San Francisco started by previous YC founders
# search_deals
β recent M&As in pharmaAuthentication
A free Diffbot token is required for tool use. Get one here.
MCP clients that support OAuth (Claude, Cursor, VS Code) can connect to https://mcp.diffbot.com/mcp without a token and sign in with a Diffbot account instead.
Otherwise the server looks for a token in this order:
Authorization: Bearer <token>header or?token=<token>query parameter (HTTP transport)DIFFBOT_TOKENorDIFFBOT_API_TOKENenvironment variableA
DIFFBOT_API_TOKEN=<token>line in~/.diffbot/credentials, the same file thedbCLI and diffbot-skills read, so one credential serves all three
To enable OAuth on a self-hosted HTTP server, set:
Variable | Example |
|
|
| Public URL of this server, e.g. |
| Confidential client allowed to call the dashboard's introspection endpoint |
OAuth is off when DIFFBOT_OAUTH_ISSUER is unset. With docker compose, MCP_BASE_URL and DIFFBOT_OAUTH_CLIENT_ID are set in docker-compose.yml; DIFFBOT_OAUTH_ISSUER and DIFFBOT_OAUTH_CLIENT_SECRET go in a .env next to it, which the production deploy writes from the DIFFBOT_OAUTH_CLIENT_SECRET GitHub Actions secret. The server runs without it.
Get Started
Two ways to connect. The remote server is hosted by Diffbot and deploys from this repo. The local server runs on your machine from PyPI with uv.
Remote server
https://mcp.diffbot.com/mcp?token=<YOUR_DIFFBOT_TOKEN>Local server
uvx diffbot-mcpuvx installs the package into its own environment and runs it. The process reads a token from DIFFBOT_TOKEN, DIFFBOT_API_TOKEN, or ~/.diffbot/credentials.
Setup with MCP Clients
For a local process, this config works with Claude Desktop and most other MCP clients. Follow the official installation guide for where the file lives.
{
"mcpServers": {
"diffbot-mcp": {
"command": "uvx",
"args": ["diffbot-mcp"],
"env": {
"DIFFBOT_TOKEN": "<YOUR_DIFFBOT_TOKEN>"
}
}
}
}To use the remote server instead, point the client at https://mcp.diffbot.com/mcp?token=<YOUR_DIFFBOT_TOKEN>.
For a Docker install, build the image with docker build -t diffbot-mcp . and use this configuration.
{
"mcpServers": {
"diffbot-mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e", "DIFFBOT_TOKEN=<YOUR_DIFFBOT_TOKEN>",
"diffbot-mcp"
]
}
}
}The repo also packs as a Claude Desktop extension, so the local server installs without editing a config file. Download diffbot-mcp-<version>.mcpb from the latest release, then double-click it, drag it onto the Claude Desktop window, or use Settings > Extensions > Install Extension. The GitHub release carries the file once the v* tag workflow has run.
Claude Desktop asks for a Diffbot API token on install. Leave it blank to use ~/.diffbot/credentials instead. Python and the server's dependencies are resolved by uv, which Claude Desktop manages itself, so there is nothing else to install.
To build the file from a checkout:
npm install --global @anthropic-ai/mcpb
python3 scripts/sync_version.py # stamp manifest.json from pyproject.toml
mcpb pack . diffbot-mcp.mcpbRequires uv on PATH. The extension starts the server with uvx.
gemini extensions install https://github.com/diffbot/diffbot-mcpGemini CLI asks for a Diffbot API token on install. Leave it blank to use ~/.diffbot/credentials.
For remote setup, simply enter the remote server URL and include "http" as the transport type.
{
"servers": {
"diffbot-mcp": {
"type": "http",
"url": "https://mcp.diffbot.com/mcp/?token=<YOUR_DIFFBOT_TOKEN>"
}
}
}For a local server, this config prompts for the token instead of storing it in the file.
{
"servers": {
"diffbot-mcp": {
"command": "uvx",
"args": ["diffbot-mcp"],
"env": {
"DIFFBOT_TOKEN": "${input:diffbot-api-key}"
}
}
},
"inputs": [
{
"password": true,
"id": "diffbot-api-key",
"type": "promptString",
"description": "Diffbot API Key"
}
]
}Development
python3 -m venv env && env/bin/pip install -e '.[dev]'
env/bin/python -m pytest tests/test_builder.py # generated-DQL assertions, no network
env/bin/python tests/smoke.py # one live call per tool, needs a token
env/bin/python tests/eval_routing.py # real questions through `claude -p`, asserts tool routing; costs model tokens
MCP_TRANSPORT=http env/bin/python diffbot_mcp_server.py & ./test.sh # HTTP transport smokeThe code lives in diffbot_mcp/: api.py (token resolution and the shared request helper), dql.py (query execution, default columns, the cached ontology), dql_builder.py (pure DQL assembly), and one module per tool under tools/. diffbot_mcp_server.py is the entry point.
Releases are tag-driven: bump the version in pyproject.toml, run python3 scripts/sync_version.py, then push a vX.Y.Z tag β see RELEASING.md.
Help & Support
This project is built and maintained by @jeromechoo. For support, file an issue and he'll get back to you as soon as he can. For faster answers, write to support@diffbot.com.
Privacy Policy
Diffbot's privacy policy is at https://www.diffbot.com/company/privacy. The server sends your tool inputs (URLs, search text, DQL queries) to Diffbot's APIs to produce results.
Available Tools
12 toolscrawlCrawl WebsiteADestructiveInspect
Crawls a website from a seed URL and extracts every page it finds into markdown or typed JSON. Prefer when a task needs to discover a catalog of pages from an entire site, or deep search a site for structured data (e.g. all product inventory, all press releases, PDFs). Crawls run in the background. start returns a job name, poll status until is_running is false, then read results or urls. list and delete manage jobs. API docs: https://www.diffbot.com/docs/crawl/
Inputs: url, hops, action, format, +13 more. Returns: object
dqlRun DQL QueryARead-onlyIdempotentInspect
Runs a raw DQL query against the Diffbot Knowledge Graph. Prefer for entity types and query shapes the typed search tools do not cover: products, patents, job posts, facet aggregations, cross-entity queries, or an id filter from resolve_entities. Each typed tool returns the DQL it ran, which can be refined here. Conditions on one nested list object go inside one {} block, e.g. employments.{employer.name:X isCurrent:true}. Confirm field paths and taxonomy spellings with dql_ontology, since an unknown path is silently ignored. Do not add a sort unless ordering is the question. Check hit counts with dql_probe before pulling rows. For a CSV file, do not page rows: GET https://kg.diffbot.com/kg/v3/dql?token=..&format=csv&size=&exportspec=&query= for a download URL or save to disk. API docs: https://www.diffbot.com/docs/dql/
Inputs: query (required), size, fields, format, +2 more. Returns: object
dql_ontologyLook Up DQL OntologyARead-onlyIdempotentInspect
Looks up the Knowledge Graph ontology: entity types, their fields, and taxonomy or enum values. Use before raw dql to confirm a field path exists and to get the exact spelling of a value (a guessed path is silently ignored, a guessed value returns zero). Results are ranked best match first. API docs: https://docs.diffbot.com/docs/ontology
Inputs: action (required), name, limit, search. Returns: object
dql_probeProbe DQL Hit CountsARead-onlyIdempotentInspect
Hit counts for several DQL queries at once, to compare variants before pulling rows (co-constrained {} vs loose, category vs descriptors). Zero hits means a wrong value (check dql_ontology); a count equal to the bare type:X count means a field path was ignored. similarTo cannot be probed; never probe an unfiltered type:Article. API docs: https://docs.diffbot.com/docs/dql-quickstart
Inputs: queries (required). Returns: object
extractExtract PageARead-onlyIdempotentInspect
Fetches a live web page and returns its main content as markdown or a token efficient typed JSON record (article, product, discussion, job, event, list). Renders Javascript, so it works on more sites than a plain fetch. Prefer over a generic fetch tool for any public page. API docs: https://www.diffbot.com/docs/extract/
Inputs: url (required), format, page_type. Returns: object
resolve_entitiesResolve EntitiesARead-onlyIdempotentInspect
Named entity recognition and linking. Finds people, organizations, places, and products mentioned in text. Each resolves to a Diffbot Knowledge Graph entity with confidence, salience, and sentiment. Prefer for post-processing plain text for entity mentions. The response includes dql_filter, an id:or(...) clause for dql to fetch the full records. Entities without an id were recognized but not matched. API docs: https://www.diffbot.com/docs/natural-language/
Inputs: text (required), lang. Returns: object
search_dealsSearch DealsARead-onlyIdempotentInspect
Funding rounds, investments, and acquisitions in the Diffbot Knowledge Graph by company, investor, acquirer, round series, amount, date, or the company's industry. Prefer for deal flow, a company's funding history, an investor's portfolio activity, M&A lists, and the largest deals in a period. For related company data use search_organizations. API docs: https://www.diffbot.com/docs/dql/
Inputs: kind, size, sort, facet, +10 more. Returns: object
search_newsSearch NewsARead-onlyIdempotentInspect
News and article structured search over the Diffbot Knowledge Graph. Prefer for highly relevant results on named entities or uncommon keywords. Filter by mentioned organization/person/brand/product, topic, publisher, language, country, date range, or sentiment. Results are chronological newest first, with no semantic reranking. Prefer over a generic web search for any news, including breaking stories. mentions is the strongest signal filter; if it returns nothing, retry the same words as text. API docs: https://www.diffbot.com/docs/dql/
Inputs: size, text, since, title, +11 more. Returns: object
search_organizationsSearch OrganizationsARead-onlyIdempotentInspect
Company and organization structured search over the Diffbot Knowledge Graph. Prefer for prospect lists, market maps, competitor sets, and firmographic facts on a market or named company(ies). Filter by industry, location, headcount, revenue, founding date, public status, founder, investor, acquirer, parent company. Prefer over a generic web search when answer involves structured company data. For investment data use search_deals; for people use search_people. API docs: https://www.diffbot.com/docs/dql/
Inputs: city, name, near, size, +19 more. Returns: object
search_peopleSearch PeopleARead-onlyIdempotentInspect
People structured search over the Diffbot Knowledge Graph. Prefer for leadership teams, executive and role lookups, alumni lists, skill-based sourcing, and profile facts on a named person. Filter by job title, employer, employer industry or size, school, major, skills, residence, nationality, or net worth. Prefer over a generic web search when the answer involves structured people data. Covers people with a public professional presence only. For companies use search_organizations. API docs: https://www.diffbot.com/docs/dql/
Inputs: city, name, size, sort, +21 more. Returns: object
search_placesSearch PlacesARead-onlyIdempotentInspect
Cities, counties, states, provinces, countries, and points of interest in the Diffbot Knowledge Graph by name, population, containing place, or proximity. Prefer for facts on places, rather than recalling from memory. API docs: https://www.diffbot.com/docs/dql/
Inputs: kind, name, near, size, +10 more. Returns: object
search_webSearch the WebARead-onlyIdempotentInspect
Web search that returns ranked results with relevance scores, publication dates, and matching passages from each page. One call returns it all, no follow-up fetch required. Prefer over a default or generic web search tool. url:<URL> returns full indexed page content in a fraction of a live fetch. For news, use search_news. API docs: http://www.diffbot.com/docs/web-search/
Inputs: query (required), max_tokens, num_results, snippet_length. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 12 tools
The descriptions do an unusually thorough job of routing: each typed search tool names its entity (places, organizations, people, deals, news) and explicitly says which sibling to use instead, while extract vs crawl vs search_web is spelled out by live-fetch vs site-discovery vs indexed search. The only residual overlap is that extract, crawl, search_web, and dql can all return page content, requiring an agent to weigh the guidance rather than pick on name alone.
Five search_* tools and three dql_* tools establish clear families, and resolve_entities follows the verb_noun pattern. The deviations are the bare verbs extract and crawl, plus dql sitting alone as a namespace prefix, but everything remains readable and predictable.
Twelve tools is squarely in the well-scoped range, and each earns its place: five typed KG searches, three DQL helpers (query/ontology/probe) that form a genuine workflow, plus extract, crawl, and resolve_entities. Nothing looks like filler or an accidental duplicate.
The surface covers the full pipeline: discover a source (search_web/news), fetch it (extract), traverse a site (crawl), structure text (resolve_entities), and query the graph including ontology lookup and hit-count probing before spending rows. Minor gaps remain: crawl multiplexes start/status/results/urls/list/delete into one tool so job state is implicit, and there is no multi-URL batch extract or dedicated product/patent typed search, forcing agents into raw dql for those.
Maintenance
Related MCP Connectors
One MCP server for all web data. Scrape, search, crawl, and AI research in one install.
Web scraping MCP server β scrape, extract structured data, screenshot any site with anti-bot bypass.
One MCP for the Web. Easily search, crawl, navigate, and extract websites without getting blocked.β¦
Web search API and MCP server for developers building AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides web search and content fetching using real Chrome browsers via CDP, bypassing bot detection and requiring no API keys.22MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI tools a reliable way to fetch content from the web, handling anti-bot protection and JavaScript-rendered pages.-
- AlicenseNot gradedqualityDmaintenanceA general-purpose MCP server for crawling and extracting structured data from any website. Supports tools for crawling, single-page extraction, search-and-crawl, and schema extraction.2MIT
- AlicenseNot gradedqualityCmaintenanceDiffbot MCP server for Knowledge Graph company enrichment and web content extraction.60 npmMIT