Skip to main content
Glama
DeepSeek Web MCP

DeepSeek Web MCP

by habitssss

DeepSeek Web MCP

English | 中文

An MCP server that calls DeepSeek's official Search and Fetch APIs directly. It returns search results and page content without calling a chat model to generate an answer.

This is a community project, not an official DeepSeek product. It is licensed under MIT.

Installation

You need Node.js 22 or newer and a DeepSeek API key.

Add the server to an MCP client that supports stdio. The client downloads and runs the npm package with npx; no separate installation is needed. Set DEEPSEEK_API_KEY through your client's secret manager if available. Otherwise, keep the key in a private local configuration file and never commit it to Git.

{
  "mcpServers": {
    "deepseek-web": {
      "command": "npx",
      "args": ["-y", "deepseek-web-mcp@0.1.0"],
      "env": {
        "DEEPSEEK_API_KEY": "YOUR_DEEPSEEK_API_KEY"
      }
    }
  }
}

The MCP client starts the server as a child process. The server does not open a web page or listen on an HTTP port. If started directly in a terminal, it waits for MCP messages without displaying a prompt.

Related MCP server: deepseek-search-mcp

Tools

Tool

Official endpoint

Result

search

POST https://api.deepseek.com/v1/tools/search

Ranked search results with URLs, summaries, and optional page content

fetch

POST https://api.deepseek.com/v1/tools/fetch

Page title and Markdown content

{
  "query": "DeepSeek site:api-docs.deepseek.com",
  "count": 3,
  "need_content": true
}

query is required. It must contain 1 to 128 Unicode characters and cannot be all whitespace. DeepSeek's search operators are passed through, including site:, -site:, quoted phrases, lang:, after:, and before:.

Optional parameter

Meaning

Default

count

Number of results, from 1 to 50

10

need_content

Include page content when available

false

ori_question

Original user question, up to 128 Unicode characters; accepts null

Omitted

localization

IP address used to localize results

Omitted

An empty search returns {"results":[]} and is not an error. Setting need_content to true does not guarantee content for every result.

fetch

{
  "url": "https://api-docs.deepseek.com/guides/search"
}

url is required and limited to 8192 characters. It must use HTTP or HTTPS and cannot contain a username or password. DeepSeek fetches the page. The local MCP process does not connect to the target site.

Both tools return MCP structuredContent and the same JSON as text for clients that do not use structured results. Additional fields returned by the API are preserved. Page content is passed through as received, including any Markdown escapes.

Cost and data handling

Search queries, original questions, localization IPs, and target URLs are sent to DeepSeek. Authentication uses the DEEPSEEK_API_KEY environment variable. The server does not store the key or log request content. Standard output is reserved for MCP messages.

Each tool call sends one API request. There are no automatic retries. Requests time out after 30 seconds and respond to client cancellation. A timeout or cancellation does not guarantee that DeepSeek stops processing the request.

DeepSeek lists both Search and Fetch at USD 0.75 per 1,000 successful requests that produce results. Check the official guide for current prices and limits. Free usage arrangements for products such as DeepSeek Harness do not imply that this server's direct API requests are free.

HTTP failures are returned as MCP tool errors with a status code. Upstream error bodies and exception details are not forwarded, to avoid exposing credentials. Treat web content as untrusted data, not instructions.

Testing

Run the local tests without an API key or network calls to DeepSeek:

npm test

To test against the real APIs, first set DEEPSEEK_API_KEY in your environment, then run:

npm run test:live

The live test starts the CLI, completes the MCP stdio handshake, and calls both tools. It verifies search results and the fetched official documentation. It makes two billable API requests and prints counts, content length, and elapsed time without printing the key.

Development

To run from source:

git clone https://github.com/habitssss/deepseek-web-mcp.git
cd deepseek-web-mcp
npm ci

For a source checkout, use "command": "node" and "args": ["/absolute/path/deepseek-web-mcp/cli.js"] in your MCP configuration instead of npx.

The code uses JavaScript ES modules and needs no build step. server.js defines the tools and API requests. cli.js starts the stdio transport. Run npm test after changes, and run the live test when changing API arguments or response handling.

Available Tools

2 tools
fetchA
Read-onlyIdempotent

Retrieve one public web page through DeepSeek and return its title and Markdown content. Use to read a known URL. No chat model is called.

Inputs: url (required). Returns: title, content

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 2 tools

    Disambiguation5/5

    fetch and search target clearly distinct operations: retrieving a known URL versus discovering URLs via query. The descriptions reinforce the boundary ('read a known URL' vs 'current information'), leaving no realistic chance of misselection.

    Naming Consistency4/5

    Both names are lowercase single verbs in a consistent style, so the set reads predictably. It's a minor deviation from the stronger verb_noun convention (fetch_page, search_web) that would encode the resource.

    Tool Count3/5

    Two tools is on the thin side for a web-access server, though each earns its place. It sits at the borderline where a couple of adjacent capabilities (e.g. batch fetch) might be expected.

    Completeness4/5

    fetch plus search cover the core read-only web domain with no dead ends for the stated purpose. Minor gaps exist around bulk retrieval, pagination, or content-type controls, but agents can work around them.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Enables MCP clients to run web searches via DeepSeek's open platform API, with optional web page fetching that returns Markdown content, and supports query syntax for source, language, and time filters.
      1
      118 npm
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables 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.
      2
      11
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables MCP-capable AI clients to run web searches through DeepSeek's search engine and fetch individual webpages as Markdown. Search results include relevance scores, authority, and publication times, and support advanced query syntax such as site:, lang:, and date filters.
      2
      66 npm
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to run web searches and fetch individual web pages as Markdown through DeepSeek's official Search/Fetch API, with freshness filtering, structured metadata such as publish date, authority and rerank scores, and raw structured output.
      74 npm
      4
      MIT