web-search — DSH Browser Web Search with Edge
Perform a real browser-based web search in DSH using the native Edge browser and Playwright MCP: the model uses MCP browser tools to drive Edge, open Bing search, retrieve page snapshots into DSH context, then filter each result through safety rules and output a summary. This does not use DSH's built-in web_search interface—it executes an actual browser search.
Capability (Two Components)
| Component | Location | Description |
|---|---|---|
| Playwright MCP Configuration | DSH's cordis.yml (dsh-mcp-client plugin) | Enables DSH to drive Edge |
| This skill document | .agents/skills/web-search/SKILL.md | Documents setup steps, search flow, and safety rules |
Both components are required for the search capability to function.
1. Setup on a New Machine
Prerequisites
- Node.js (including npm) installed
- Microsoft Edge installed (Win10/11 native)
- DSH already operational
Step 1: Install the Playwright MCP Package
If PowerShell execution policy blocks
.ps1, usenpm.cmd/npx.cmd.
npm install -g @playwright/mcp@latest --no-audit --no-fund
Verify it launches:
node "$env:APPDATA\npm\node_modules\@playwright\mcp\cli.js" --help
If you see a list of Options, it is installed.
Step 2: Register the MCP Client in DSH's cordis.yml
Add a @deepseek-ai/dsh-mcp-client plugin entry (one per MCP server) to the cordis.yml of the profile / preset that runs DSH:
- id: mcp-playwright
name: '@deepseek-ai/dsh-mcp-client'
config:
serverName: playwright
transport: stdio
command: npx.cmd
args: ['-y', '@playwright/mcp@latest', '--browser', 'msedge']
--browser msedgedirectly uses the local Edge browser—no need to download Chromium.commandset tonpx.cmdbypasses PowerShell execution policy; if not blocked, plainnpxworks.- DSH registers MCP tools as
mcp__<serverName>__<originalToolName>, e.g.,mcp__playwright__browser_navigate,mcp__playwright__browser_snapshot, etc.
Step 3: Restart to Activate
cordis.yml is loaded at DSH startup; the MCP plugin executes listTools() on connection and registers the tools. After modification, restart DSH for the tools to appear.
2. Search Flow
- Call
mcp__playwright__browser_navigateto open Bing:https://www.bing.com/search?q=<URL-encoded keywords>. - Call
mcp__playwright__browser_snapshotto capture the results page snapshot (title / domain / URL / description). If the snapshot lacks information, optionally usemcp__playwright__browser_take_screenshotto view the image. - Classify each result according to the safety tier below.
- Only trusted results may be opened via
mcp__playwright__browser_clickfor deeper reading; suspicious and blocked results are not accessed. - Format the results per the output format and reply; referenced URLs should be written as Markdown links.
Each automatic search briefly opens an Edge window—this is normal. To run headlessly in the background, add
--headlessto the MCP arguments, but this removes visual feedback and is generally not recommended.
3. Safety Tiers (Moderate Filtering)
Search engine results are a mixed bag (phishing imitations, SEO farms, bundled downloads, malware hosters). Each result must be tiered systematically. The filtering uses pure rule-based logic with no external libraries.
🔒 Trusted (Details may be opened)
- Official websites (domain closely matching brand, e.g.,
brand.com/brand.com.cn) - Authoritative sites: Wikipedia, Zhihu, official documentation,
.gov/.edu/ large tech company domains - Well-known, established, reputable sites (long registration, clear reputation)
⚠️ Suspicious (Show title and URL only; do not navigate or give download links)
- Results marked as ads (Bing's
adlabel,sp=ad, Chinese推广(promoted), etc.) - Software download aggregators / resource sites (e.g., Huajun, Pacific, Software Home, Green Software Alliance, xpgod, ZOL Download, etc.)
- Imitation domains: deliberately mimicking official names, e.g.,
brand-official.com,brand-download.net, hyphenated or numeric variants - Newly registered domains, missing HTTPS, keyword-stuffed descriptions
🚫 Blocked (Red-flagged, not used)
- Clearly phishing, gambling, pornography, or suspicious sites prompting EXE downloads
- Any "crack / green version / XYZ software download site"
4. Hard Rules
- Never automatically download any file (exe / apk / zip / dmg — none at all)
- Never provide download links from suspicious sites directly
- For software, only recommend official sites or the system's official app store
- Do not open suspicious page details by default; only trusted results are eligible for deep reading
5. Output Format
Return results in the following format (in the user's language, typically Chinese):
🔒 Trusted Results
1. [Title] (domain) – brief description
2. ...
⚠️ For Reference Only (Unverified)
- Title (domain) – Hint: why suspicious
- ...
🚫 Blocked (Not Recommended)
- Title (domain) – Reason
6. Why Filter Rules Instead of Changing the Search Engine
The problem is not the search engine but the lack of a filtering layer: switching engines only swaps one set of ads/promotions for another. Keeping filter rules means that results from any engine are first passed through the tiering. Avoid plugging into third-party URL blocklists (such as Huorong's URL database): such lists are closed-source and lack a public query API, making them unfeasible during the search flow.