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 MCP search for the latest AI news 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 lightweight stdio MCP server for DeepSeek's official Search and Fetch APIs. It uses only Python's standard library and works with Hermes, OpenCode v2, Codex, Claude Code, and any MCP client that supports stdio servers.
Requirements
Python 3.10 or newer
A DeepSeek API key with Search & Fetch API access
Related MCP server: mcp-deepseek-search
Install
For an agent
Configure the MCP client to start the server and pass DEEPSEEK_API_KEY as an environment variable. Do not put the key in the project files or commit it.
The server can be run directly from a cloned repository:
git clone https://github.com/Realmagnum/deepseek-search-mcp.git
cd deepseek-search-mcp
DEEPSEEK_API_KEY="your-api-key" python3 deepseek_search_mcp.pyFor a persistent agent configuration, use the absolute path to deepseek_search_mcp.py and provide the key through the client's environment/secrets mechanism. Examples follow.
Hermes
Add an stdio MCP server using the Hermes CLI, then enter the script path and environment variable when prompted:
hermes mcp add deepseek-search --command "python3 /absolute/path/deepseek_search_mcp.py"Set DEEPSEEK_API_KEY in the environment available to Hermes, then verify and enable the server:
hermes mcp list
hermes mcp test deepseek-searchOpenCode v2
The following configuration was tested with OpenCode v2.0.29. OpenCode v2 stores MCP servers under mcp.servers in its config. For example, add this entry to ~/.config/opencode/opencode.json (global) or the project's opencode.json:
{
"mcp": {
"servers": {
"deepseek-search": {
"type": "local",
"command": ["python3", "/absolute/path/deepseek_search_mcp.py"],
"environment": {
"DEEPSEEK_API_KEY": "your-api-key"
}
}
}
}
}Or register it through the OpenCode v2 CLI:
opencode mcp add deepseek-search \\
--env DEEPSEEK_API_KEY=your-api-key \\
-- python3 /absolute/path/deepseek_search_mcp.py
opencode mcp listOpenCode v1 uses a different config shape (mcp entries directly, without the servers object). This example targets v2 only. Use a secret manager or a local untracked config instead of committing an API key.
Codex CLI
Add the server using the Codex CLI:
codex mcp add deepseek-search --env DEEPSEEK_API_KEY=your-api-key -- python3 /absolute/path/deepseek_search_mcp.pyOr add this to ~/.codex/config.toml:
[mcp_servers.deepseek-search]
command = "python3"
args = ["/absolute/path/deepseek_search_mcp.py"]
[mcp_servers.deepseek-search.env]
DEEPSEEK_API_KEY = "your-api-key"Claude Code
Register the server for the current project:
claude mcp add --transport stdio --scope project \
--env DEEPSEEK_API_KEY=your-api-key \
deepseek-search -- python3 /absolute/path/deepseek_search_mcp.pyChoose user scope instead of project scope to make the server available across projects. Use a local, untracked configuration or secret manager for API keys.
For a person (without an agent)
Install nothing beyond Python. Set the key in the shell and run a search or fetch with any MCP-compatible desktop client. For example, with Claude Desktop, add an mcpServers entry to its configuration:
{
"mcpServers": {
"deepseek-search": {
"command": "python3",
"args": ["/absolute/path/deepseek_search_mcp.py"],
"env": {
"DEEPSEEK_API_KEY": "your-api-key"
}
}
}
}Restart the client after changing its MCP configuration. Consult the client's documentation for the configuration file location and supported secret-variable syntax.
Tools
deepseek_search
Searches the web and returns ranked results, including title, URL, snippet, summary, relevance score, and authority tier.
Arguments:
query(required): 1–128 characters; supports operators such assite:,lang:,after:,before:, quoted phrases, and exclusions.count(optional): 1–50, defaults to 10.need_content(optional): include extracted page content in results; defaults tofalse.ori_question(optional): original user question, up to 128 characters.localization(optional): IP address for localized results.
deepseek_fetch
Fetches an HTTP or HTTPS page and returns its title and Markdown content.
Billing and limits
DeepSeek bills Search and Fetch per successful request. Current pricing and rate limits are documented in the DeepSeek Search & Fetch guide. A search with need_content: true is one Search request; separately fetching pages makes additional Fetch requests.
Local check
python3 test_smoke.py deepseek_search_mcp.pyLicense
MIT. See LICENSE.
Available Tools
2 toolsdeepseek_fetchA
Fetch a public HTTP(S) webpage with DeepSeek and return its title and extracted Markdown content.
Inputs: url (required).
deepseek_searchA
Search the live web using DeepSeek's Search API. Returns ranked results with title, URL, summary, relevance and authority; optionally includes page content.
Inputs: query (required), count, localization, need_content, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
search and fetch are clearly distinct operations: one queries a search index, the other retrieves a single known URL. There is no plausible way for an agent to confuse them, since descriptions explicitly delineate query-based discovery vs. direct page retrieval.
Both tools follow a consistent deepseek_<verb> pattern with matching snake_case and a shared server prefix. This is a clean, predictable convention with no deviations.
Two tools is on the thin side for the stated scope, though the search+fetch pairing is a natural minimal set. It earns its place but leaves little flexibility (e.g. no batch or pagination tooling).
The discovery+retrieval pair covers the core web-search workflow, and search optionally returning page content reduces reliance on fetch. Minor gaps exist (no pagination, batch fetch, or cache/refresh control), but agents can work around them.
Maintenance
Related MCP Connectors
Web search API and MCP server for developers building AI agents.
Docs: https://docs.keenable.ai/mcp-server Keenable is a free, remote MCP server that gives agents access to the web index. Search the web with ranked results and date/site filters, then fetch any indexed page as clean markdown. Works out of the box with no account or API key.
Free web search for AI agents. No API key required. Hosted MCP in active development.
Scrape, crawl and search the web for AI agents via MCP.
Related MCP Servers
- 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
- AlicenseAqualityCmaintenanceExposes DeepSeek's web search and page-fetch tools to any MCP client, letting any LLM run searches with quality signals like rerank score and source authority, plus advanced query syntax. It also retrieves single pages as Markdown, with built-in throttling, retries, and size-conscious summaries.2101 npm2MIT
- AlicenseAqualityCmaintenanceEnables MCP clients such as Claude Code to run real-time web searches and fetch public web pages as Markdown through DeepSeek's official search and fetch APIs, with result pagination and response caching. Runs over stdio and only requires a DeepSeek API key, needing no browser, Docker, or database.2140 npm1MIT
- AlicenseAqualityCmaintenanceA local stdio MCP server that exposes DeepSeek's Web Search and Fetch APIs, letting AI clients run structured web queries, fetch page contents, and receive DeepSeek's raw JSON responses unfiltered and untruncated. It supports filtering by site, language, and date range, with configurable timeouts and retries.2MIT