Skip to main content
Glama
web-search-mcp

web-search-mcp

by hbhszy

web-search-mcp

An online search MCP server based on the DeepSeek web version. It provides real-time web search capabilities to MCP clients through DeepSeek's search-enhanced dialogue feature.

Features

  • Provides the web_search MCP tool, supporting real-time web search

  • Supports DeepSeek default and expert models

  • Supports thinking process output

  • Zero dependencies, pure Node.js implementation

  • stdio transport, compatible with all MCP clients

Related MCP server: @kyaulabs/deepseek-websearch

Quick Start

1. Use in Claude Desktop

Edit the Claude Desktop configuration file (claude_desktop_config.json) and pass credentials directly via the env field, no .env file required:

{
  "mcpServers": {
    "web-search": {
      "command": "node",
      "args": ["D:/ai-projects/web-search-mcp/src/index.js"],
      "env": {
        "DEEPSEEK_AUTH_TOKEN": "your_token_here"
      }
    }
  }
}

2. Use in Claude Code

Add the following to your project's .claude/settings.json:

{
  "mcpServers": {
    "web-search": {
      "command": "node",
      "args": ["D:/ai-projects/web-search-mcp/src/index.js"],
      "env": {
        "DEEPSEEK_AUTH_TOKEN": "your_token_here"
      }
    }
  }
}

3. Use a .env file (Optional)

If it is inconvenient to write env in the MCP configuration, you can also use a .env file:

cp .env.example .env
# 编辑 .env 填入凭据

Environment variable priority: System environment variables > MCP env configuration > .env file

MCP Tools

Uses DeepSeek's search-enhanced dialogue to perform a web search and returns an answer based on the search results.

Parameters:

Parameter

Type

Required

Description

query

string

Yes

Search query content

thinking

boolean

No

Whether to enable DeepSeek thinking/reasoning mode. If enabled, the model will reason before answering, and the reasoning process is included in the response (default: false)

model

string

No

Model mode: default or expert (defaults to configuration value)

Environment Variables

Variable

Required

Default

Description

DEEPSEEK_AUTH_TOKEN

One of two

-

DeepSeek login token

DEEPSEEK_COOKIE

One of two

-

DeepSeek browser cookie

DEEPSEEK_MODEL_TYPE

No

default

Model type: default or expert

DEEPSEEK_THINKING_ENABLED

No

false

Whether to enable the thinking process by default

WASM_PATH

No

assets/sha3_wasm_bg...wasm

Path to the PoW solver WASM file

LOG_LEVEL

No

info

Log level: debug, info, error

Obtaining DeepSeek Credentials

  1. Open chat.deepseek.com and log in

  2. Open browser developer tools (F12) → switch to the Console panel

  3. Enter the following command and press Enter to copy the token:

copy(JSON.parse(localStorage.getItem("userToken")).value)
  1. Paste it into the DEEPSEEK_AUTH_TOKEN environment variable

Note: Credentials will expire and need to be re-obtained. A typical sign of token expiration is the request returning a Cloudflare verification page.

Testing

# 运行所有测试
npm test

# 运行单个测试文件
node --test tests/mcp-protocol.test.js
node --test tests/config.test.js

Project Structure

src/
  index.js            # 入口,初始化所有组件并启动 MCP 服务器
  mcp-server.js       # MCP 协议处理(stdio 传输、JSON-RPC 分发)
  deepseek-client.js  # DeepSeek 网页版 API 客户端(会话管理、PoW、SSE 流式解析)
  pow-solver.js       # SHA3 PoW WASM 求解器
  env.js              # .env 文件加载器
  config.js           # 环境变量配置解析

Available Tools

1 tool

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 1 tool

    Disambiguation5/5

    Only one tool exists, so there is no possibility of confusion between tools.

    Naming Consistency4/5

    The single tool name 'web_search' is clear and follows a common verb_noun pattern, but with only one tool, consistency cannot be fully assessed.

    Tool Count3/5

    One tool is minimal for a web search server. It covers the core action but may lack supporting tools for refined queries or result handling.

    Completeness3/5

    The tool provides basic web search functionality, but there are no tools for advanced filtering, pagination, or retrieving structured results, leaving potential gaps.

    Related MCP Connectors

    Related MCP Servers