ds-websearch-mcp
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., "@ds-websearch-mcpsearch the web for recent DeepSeek API updates"
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.
ds-websearch-mcp
A simple MCP server for DeepSeek Search and Fetch.
Quick Start
Requires Node.js 24 or later and a DeepSeek API key.
Add the following to your MCP client configuration, replacing the API key. npx downloads and runs the package automatically:
{
"mcpServers": {
"ds-websearch-mcp": {
"command": "npx",
"args": ["-y", "ds-websearch-mcp"],
"env": {
"DEEPSEEK_API_KEY": "your-api-key"
}
}
}
}Restart your MCP client to load the search and fetch tools.
Codex
Run with your API key:
codex mcp add ds-websearch-mcp --env DEEPSEEK_API_KEY=your-api-key -- npx -y ds-websearch-mcpOr add the following to ~/.codex/config.toml:
[mcp_servers.ds-websearch-mcp]
command = "npx"
args = ["-y", "ds-websearch-mcp"]
[mcp_servers.ds-websearch-mcp.env]
DEEPSEEK_API_KEY = "your-api-key"Restart Codex to load the tools.
HTTP
Run the server on the loopback interface:
DEEPSEEK_API_KEY=your-api-key npx -y ds-websearch-mcp --transport http --port 3000Connect an MCP client to http://127.0.0.1:3000/mcp.
Related MCP server: DeepSeek Search MCP
Tools
search
Parameter | Default | Description |
| Required | Search query, including operators such as |
| API default: | Number of results. |
| Omitted | Original question, when useful for query understanding. |
| Omitted | Optional IP address used to localize results. |
|
| Include page content. |
|
| Maximum Unicode characters of page content per result. |
Preserves upstream fields and ranking, including summaries, relevance scores, dates, and authority. Nonempty page content receives a pagination object. max_length applies to page content, not summaries or the total JSON response.
When a search returns page content, all pages that need caching are admitted as one batch. If the batch exceeds the configured entry or byte capacity, the tool returns an error and keeps existing cursors valid. Reduce count, increase max_length so more pages are returned completely, or increase the cache capacity.
DeepSeek currently documents 1–128 characters for query and ori_question, and 1–50 for count.
fetch
Parameter | Default | Description |
| Omitted | Page URL to retrieve from DeepSeek. |
| Omitted |
|
|
| Maximum Unicode characters of page content to return. |
Supply exactly one of url and cursor. Returns url, title, content, and pagination:
{
"returned_length": 5000,
"total_length": 12400,
"next_cursor": "opaque-cursor",
"expires_at": "2026-10-20T12:15:00.000Z"
}Pass next_cursor to fetch to continue. A null cursor means the end of the page. Unicode code points count as characters; surrogate pairs are never split. Cursor reads use the same saved snapshot, make no additional DeepSeek requests, and can be replayed. max_length can change between reads.
Only pages with remaining content are retained. Expiry is fixed when stored and is not extended by reading. Least recently read snapshots are evicted when the entry or byte limit is reached. Cursors expire with their snapshot and do not survive process restarts; an expired or evicted cursor returns a tool error asking the caller to fetch the URL again. Final-page reads keep the snapshot available until expiry or eviction for reliable retries.
A page larger than the cache capacity cannot be retained and returns an explicit error. Increase CACHE_MAX_BYTES or request a max_length large enough to return the full page. The byte limit accounts for retained text as UTF-16; it is not a limit on total process memory. HTTP requests share one process-local cache; cursors are signed and contain an unguessable snapshot identifier.
Configuration
Environment variable | Default | Description |
| Required | DeepSeek bearer token. |
|
| API origin, useful for gateways or local testing. Requests use |
|
| Total deadline per API call, including retries and response reading. Maximum: |
|
| Fixed snapshot lifetime: 12 hours. Values outside the JavaScript |
|
| Retained text capacity: 256 MiB. |
|
| Maximum retained snapshots. |
|
| Maximum concurrent legacy HTTP sessions. |
|
| Idle lifetime for legacy HTTP sessions: 30 minutes. Sessions with active requests are not expired. |
Development
From a source checkout:
npm ci
npm run build
npm run check
npm test
npm pack --dry-runLicense
Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-only).
Available Tools
2 toolsfetchARead-onlyIdempotent
Read a web page as Markdown, or continue a cached page using next_cursor from search or fetch. Supply exactly one of url or cursor. Cursors read the same saved snapshot without another API request; they can expire or be evicted.
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Page URL. The API currently accepts HTTP(S) URLs up to 8192 characters, without credentials. | |
| cursor | No | next_cursor from a previous result. Omit url when continuing. | |
| max_length | No | Maximum Unicode characters of page content to return. Default: 5000. |
Output Schema
| Name | Required | Description |
|---|---|---|
| url | Yes | |
| title | Yes | |
| content | Yes | |
| pagination | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the safety profile (readOnly, idempotent, non-destructive, open-world), so the bar is lower; the description still adds real behavioral context — cursors serve the same saved snapshot without a new API call, and they can expire or be evicted. It does not cover error responses or rate limits, which keeps it from a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, zero filler, with the primary capability front-loaded before the mutual-exclusion rule and cursor caveats. Every sentence carries distinct information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers both invocation modes, the parameter constraint, and cursor lifetime, and an output schema exists so return values need not be described. The main remaining gap is not stating what happens on an expired/evicted cursor or an unreadable URL.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3, but the description adds a cross-parameter constraint the schema cannot express: exactly one of url or cursor must be supplied. It also clarifies that cursor values come from next_cursor in prior search or fetch results.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Read a web page as Markdown') plus a second mode ('continue a cached page'), and names the sibling tool 'search' as a cursor source. An agent can distinguish this from search without opening either schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives an explicit selection rule ('Supply exactly one of url or cursor') and explains the trade-off: cursors avoid another API request but can expire or be evicted. It stops short of naming an alternative path when a cursor is invalid, but the routing context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
searchARead-onlyIdempotent
Search the web using DeepSeek. Supports site:, -site:, quoted phrases, lang:, after:, and before:. The API currently documents a 128-character query limit. Page content is optional and paginated; read more with fetch(cursor).
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of results. API default: 10; documented range: 1–50. | |
| query | Yes | Search query; the API currently documents 1–128 Unicode characters. | |
| max_length | No | Maximum Unicode characters of page content to return. Default: 5000. | |
| localization | No | Optional IP address used to localize results. Not sent unless provided. | |
| need_content | No | Include page content, paginated per result. Default: false. | |
| ori_question | No | Optional original question. The API currently documents 1–128 characters. |
Output Schema
| Name | Required | Description |
|---|---|---|
| results | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare read-only, open-world, idempotent, and non-destructive behavior. The description adds useful operational context beyond annotations: the 128-character query limit and optional paginated page content. It does not mention authentication, rate limits, or result ordering, keeping it at 4.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three tight sentences. The core purpose is front-loaded, followed by query syntax support, limit information, and pagination guidance, with no wasted text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given full schema coverage, an output schema, and clear annotations, the description supplies the remaining context an agent needs: provider, query syntax, character limit, optional paginated content, and the fetch(cursor) follow-up path. Nothing critical is missing for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so parameters are already well documented. The description adds value by listing supported query operators (site:, -site:, quoted phrases, lang:, after:, before:) and reiterating the 128-character limit, which helps agents construct the query parameter correctly.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource ('Search the web') and identifies the provider ('using DeepSeek'), which distinguishes it from the sibling fetch tool. It also clarifies the relationship to fetch for retrieving more page content.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It clearly establishes the search context and routes the agent to fetch(cursor) when more paginated page content is needed. It does not explicitly state when not to use search or list exclusion conditions, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v1.0.1- First observed
fetch - First observed
search
TDQS
Scored across 2 tools
Search is for discovering web results via a query with operators, while fetch is for reading a specific URL or continuing a cached snapshot via cursor. The two tools have clearly distinct roles and no overlapping functionality.
Both names are single lowercase verbs (search, fetch), following a consistent verb-only convention. There are no mixed styles or inconsistent patterns.
Two tools is slightly below the typical 3–15 range, but each earns its place for this narrow search-and-fetch domain. The minimal surface is reasonable rather than thin, given the focused purpose.
Search plus fetch covers the full lifecycle: query the web, then retrieve full page content with pagination via cursors. No obvious gaps exist, and cursor expiry can be handled by re-searching.
Maintenance
Related MCP Connectors
Scrape, crawl and search the web for AI agents via MCP.
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Web search and page reading for AI agents, including JSON APIs, RSS feeds and YouTube.
Free web search for AI agents. No API key required. Hosted MCP in active development.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables MCP clients to run web searches and fetch web page contents through DeepSeek's Search and Fetch APIs, returning structured JSON results with configurable tool names and multiple transport options.22MIT
- AlicenseAqualityCmaintenanceExposes DeepSeek's Search and Fetch REST APIs as two read-only MCP tools, letting any MCP-capable agent run ranked web searches and retrieve individual pages as truncated Markdown. Works with whichever model the host runs, over stdio or Streamable HTTP.2MIT
- AlicenseAqualityAmaintenanceEnables AI agents to perform real-time web search and fetch/parse webpages into clean Markdown through DeepSeek's Search and Fetch APIs. It provides configurable summaries, scoring, and robust retries for integration with MCP-compatible assistants.21MIT
- AlicenseAqualityCmaintenanceEnables MCP clients to perform web searches and fetch HTTP(S) pages as Markdown through Search and Fetch APIs.2MIT