deepseek-search-fetch-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., "@deepseek-search-fetch-mcpsearch the web for DeepSeek API docs and summarize the top results"
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.
deepseek-search-fetch-mcp
A Model Context Protocol (MCP) server that exposes the official DeepSeek Search / Fetch API as two MCP tools: search and fetch.
search— search the web with the DeepSeek in-house search engine and get structured results (title, URL, snippet, summary, content, site info, date, authority, rerank score).fetch— fetch a single web page and return its title and full content in Markdown.
⚠️ Disclaimer
This project is an independent, community-built open-source implementation and is NOT affiliated with, endorsed by, or sponsored by DeepSeek (深度求索).
"DeepSeek" and related names are trademarks of their respective owners.
The copyright of this project and all its versions belongs to its holder, web4theme.
This project simply wraps the public DeepSeek Search / Fetch API. You are responsible for your own API usage, billing, and compliance with DeepSeek's terms of service.
Related MCP server: dseek-mcp
How it works
MCP client ──stdio──▶ deepseek-search-fetch-mcp ──HTTPS──▶ api.deepseek.com
(search → POST /v1/tools/search
fetch → POST /v1/tools/fetch)The tools call the DeepSeek API endpoints documented at api-docs.deepseek.com:
Tool | Endpoint |
|
|
|
|
Tools
search
Search the web and return structured results as JSON.
Parameter | Type | Required | Default | Description |
| string | ✅ | — | Search terms, 1–128 characters, must not be blank. Supports search syntax (see below). |
| integer | — |
| Number of results, 1–50. |
| string | — |
| The user's original question that triggered the search, 1–128 characters, improves intent understanding. |
| string | — |
| An IP address to prefer localized results. |
| boolean | — |
| Include full page content in each result. |
Each result contains: rerank_score, title, url, snippet, summary, content, site_name, site_icon, date (RFC 3339 UTC), authority.
fetch
Fetch a web page and return its title and Markdown content.
Parameter | Type | Required | Description |
| string | ✅ | The HTTP/HTTPS URL to fetch, at most 8192 characters, must include a host and must not contain embedded credentials. |
Search syntax
The query supports the following operators (pass them to search exactly as documented by DeepSeek):
Operator | Example | Description |
|
| Limit results to a site. Combine multiple with |
|
| Exclude a site. |
|
| Exclude pages containing a keyword. |
|
| Exclude pages containing a phrase. |
|
| Exact phrase match. |
|
| Limit results to languages (comma-separated). |
|
| Only pages published after a date. |
|
| Only pages published before a date. |
Example: query="DeepSeek site:github.com OR site:huggingface.co lang:zh after:2025".
Requirements
Python 3.10+
A DeepSeek API key (platform.deepseek.com/api_keys)
uv (recommended) or
pip
Installation
Option A — clone and run with uv (recommended)
git clone https://github.com/web4theme/deepseek-search-fetch-mcp.git
cd deepseek-search-fetch-mcp
uv syncOption B — pip
git clone https://github.com/web4theme/deepseek-search-fetch-mcp.git
cd deepseek-search-fetch-mcp
pip install .Configuration
Set the environment variables before starting the server:
Variable | Required | Default | Description |
| ✅ | — | Your DeepSeek API key. |
| — |
| Override the API base URL (e.g. a proxy). |
| — |
| HTTP timeout in seconds. |
| — |
| Retries for transient failures (HTTP 408/429/5xx), with exponential backoff. |
Usage with MCP clients
Claude Code
claude mcp add deepseek-search-fetch -- \
uv run --directory /path/to/deepseek-search-fetch-mcp deepseek-search-fetchCursor / other stdio clients
Add to your MCP client configuration (JSON):
{
"mcpServers": {
"deepseek-search-fetch": {
"command": "uv",
"args": ["run", "--directory", "/path/to/deepseek-search-fetch-mcp", "deepseek-search-fetch"],
"env": {
"DEEPSEEK_API_KEY": "your-api-key"
}
}
}
}Note: tool names are
searchandfetch, which may collide with tools from other MCP servers. If you run multiple search MCP servers, rename the tools in this repo (they are registered insrc/deepseek_search_fetch/server.py) or namespace them in your client.
Error handling
The server surfaces the API's errors (OpenAI-compatible format) with their HTTP status code:
Status | Meaning |
400 | Invalid request headers/body or field values. |
401 | Missing or invalid API key. |
402 | Insufficient account balance. |
403 | Fetch request rejected by security policy. |
404 | Fetch could not obtain usable page content. |
408 | Request body read timeout. |
413 | Request body too large. |
429 | QPS limit exceeded (Search: 100 QPS, Fetch: 25 QPS per account). |
500 | Server internal error. |
504 | Downstream request timeout. |
The client automatically retries 408/429/5xx with exponential backoff (up to DEEPSEEK_MAX_RETRIES). Other 4xx errors are not retried, per DeepSeek's guidance.
Billing & rate limits (per DeepSeek docs)
Both Search and Fetch are billed per successful request: ¥5 per 1,000 successful requests (Search) and ¥5 per 1,000 (Fetch). Requests that fail, return no results, or time out are not billed.
countdoes not affect the price.Rate limits are per account: Search 100 QPS, Fetch 25 QPS, independent of each other.
See the official Web Search & Fetch guide for the latest information.
Development
uv sync
# Run the server on stdio (requires DEEPSEEK_API_KEY):
DEEPSEEK_API_KEY=sk-... uv run deepseek-search-fetch
# Or invoke as a module:
DEEPSEEK_API_KEY=sk-... uv run python -m deepseek_search_fetchLicense
MIT — see LICENSE. Copyright (c) 2026 web4theme.
This server cannot be deployed
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 MCP: scrape/crawl sites, web search, brand assets, app stores, YouTube, Reddit, Hacker News.
Web data for agents. Extract web pages, crawl websites, discover URLs, and search the web.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables MCP-compatible clients to search the web and fetch HTTP/HTTPS pages as Markdown, returning result metadata such as titles, URLs, dates, relevance, and summaries.220 npm1MIT
- AlicenseNot gradedqualityBmaintenanceProvides two MCP tools that let agents search the live web for ranked results with metadata and fetch individual webpages as Markdown content.13 npmMIT
- AlicenseAqualityCmaintenanceEnables MCP clients to perform web searches and fetch HTTP(S) pages as Markdown through Search and Fetch APIs.2411 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to run web searches with advanced query operators and fetch web pages as Markdown through two stdio tools.81 npmMIT