webstractor

How to Add Web Search to Dify with an MCP Server in 2026

Dify manages MCP connections at workspace level, then lets applications use discovered tools. That separation matters operationally: an administrator controls the external integration while each app owner chooses whether search belongs in a particular agent.

Add Webstractor under Dify Integrations, then select search_web.

A Dify workspace owner or admin can add the remote MCP endpoint from Integrations. After tool discovery, add search_web to an Agent app or workflow Agent node and define a source-citation rule.

MCP configuration
name: webstractor
transport: streamable-http
server_url: https://webstractor.com/mcp

What you need

  • A Dify workspace with permission to manage integrations
  • An Agent app or workflow containing an Agent node
  • A configured tool-calling model
  • Outbound HTTPS access from Dify

Connect Webstractor to Dify

01

Create the workspace MCP connection

Open the workspace Integrations area, choose MCP, add a remote server, and enter the hosted endpoint. Use Streamable HTTP when Dify asks for the transport.

Connection values
name: webstractor
transport: streamable-http
server_url: https://webstractor.com/mcp
02

Confirm discovery before editing the app

Refresh the integration and verify search_web appears in the discovered tool list. Resolve connection errors here rather than inside an Agent run.

03

Add search_web to the application

In an Agent app, add the MCP tool to the agent tool list. In a workflow, add it to the Agent node. Do not expose every discovered action unless the app needs them.

04

Write an application-specific search rule

Tell the model what triggers search and what a valid answer must include.

Dify agent instruction
instruction: |
  Search only when the answer needs current or externally verifiable public information.
  Call search_web with a concise query and at most 5 results.
  Cite the returned source URLs.
  Say when snippets are insufficient and a page must be read.

Use conditional routing for predictable cost

In a Dify workflow, put a classifier or condition before the Agent when only some requests need external search. Route current-events and public-research questions to the search-enabled Agent; keep rewriting or internal-knowledge questions on the no-search path.

This makes tool use observable in workflow runs and prevents a broad Agent instruction from treating search as a default reflex.

Check the run trace, not only the final prose

Use Preview to ask for recent public sources on a narrow topic. Confirm search_web appears once in the trace with a bounded limit and that the final answer retains source URLs.

Then run a prompt whose answer exists entirely in the supplied context. A well-scoped Agent should avoid the external tool.

Understand Dify’s two permission layers

If you cannot add the server, request workspace integration permission from an owner or admin. If the server is connected but absent in one app, add the discovered tool to that app or Agent node.

A connection error can also mean the self-hosted Dify containers cannot reach the public endpoint. Test from the runtime network, not only from your laptop browser.

01

What you can extract

  • Provider-neutral public search results
  • Ordered URLs, titles, and snippets
  • Locale and site restrictions
  • Markdown or structured JSON output
02

Where normalized data helps

  • Customer-facing research agents
  • Workflow source discovery before extraction
  • Knowledge-gap fallback for a Dify app
  • Website-restricted documentation search

Public data only

  • Workspace permissions may restrict who can add or configure an MCP integration.
  • Search is for public sources and does not query private Dify knowledge bases.
  • Snippets should not be presented as complete article evidence.

webstractor.com does not bypass CAPTCHAs, login walls, paywalls, access controls, or regional restrictions. Review the source’s terms and applicable law before collecting or reusing data.

Dify and Webstractor FAQ

Is this the same as Dify knowledge retrieval?

No. search_web discovers public sources at run time; knowledge retrieval searches content already indexed in a Dify knowledge base.

Can each Dify app use a different subset of tools?

Yes. Keep the workspace connection central and select only the needed MCP tools in each app or workflow Agent node.

Does Dify need an OpenAPI schema for this?

No. MCP performs its own tool discovery from the configured server.

Turn a public URL into useful context.

Connect the MCP server See all hosted MCP tools