mcpField
S
seekfetch

seekfetch

本地服务
github.com/esticklack搜索与检索22 周前更新

关于 seekfetch

seekfetch 是 DeepSeek Search & Fetch API 的非官方客户端,提供网页搜索、页面转 Markdown 和研究功能,适用于 AI Agent 与需要网页资料的开发者。它同时提供 MCP 服务、CLI 和 TypeScript 库,并返回适合上下文窗口的摘要与分段内容。

主要功能

  1. 01网页搜索并按相关性排序
  2. 02将网页提取为 Markdown
  3. 03单次搜索返回页面内容与来源
  4. 04长文档按偏移量分段读取
  5. 05请求重试、退避并遵循速率限制
  6. 06提供 CLI 与 TypeScript 库

适用场景

  1. 01为 Agent 搜集网页资料与来源
  2. 02将网页内容提取到 Markdown 笔记
  3. 03搜索指定网站或语言的结果
  4. 04分段读取较长网页以控制上下文

MCP 相关

MCP 服务通过 stdio 向 MCP 客户端提供 DeepSeek 搜索、页面抓取和研究工具;使用时需要 DeepSeek API 密钥。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"esticklack-seekfetch": {
"command": "npx",
"args": [
"-y",
"seekfetch"
],
"env": {
"DEEPSEEK_API_KEY": "<DEEPSEEK_API_KEY>"
}
}
}
}
启动命令npx -y seekfetch
需要配置的环境变量
DEEPSEEK_API_KEY密钥Your DeepSeek API key (platform.deepseek.com)

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npmseekfetch0.1.0

工具

3

收录的工具列表 · 更新于 1 周前

参数类型必填说明
langarray否语言代码,例如 ["en", "es"]。
afterstring否仅返回日期晚于此日期的页面:YYYY、YYYY-MM 或 YYYY-MM-DD。
countinteger否要返回的结果数(默认值为 10)。
querystring是搜索查询,添加筛选条件后最多 128 个字符。
sitesarray否仅返回来自这些域名的结果,例如 ["github.com"]。
beforestring否仅返回日期早于此日期的页面:YYYY、YYYY-MM 或 YYYY-MM-DD。
min_scorenumber否舍弃 rerank_score 低于此值的结果。
localizationstring否用于本地化结果的可选 IP 地址。
exclude_sitesarray否排除来自这些域名的结果。
summary_charsinteger否每条摘要的最大字符数(默认值为 800)。
include_contentboolean否同时返回每个页面的文本(截断)。不会产生额外请求,但会占用更多上下文。
original_questionstring否用户原始问题,使用用户自己的措辞。可改善排序;会截断至 128 个字符。

详细介绍

seekfetch

由 DeepSeek Search & Fetch API 驱动,为 AI Agent 提供网页搜索和网页转 Markdown 功能。 一个软件包,三种使用方式:MCP 服务、CLI 和 TypeScript 库。

非官方社区项目。 seekfetch 与 DeepSeek 无关联,也未获其认可或赞助。 它是 DeepSeek 公共 API 的客户端,需要你提供自己的 API 密钥。

CI npm License: MIT

为什么选择它

  • 调用专用端点(/v1/tools/search、/v1/tools/fetch)。中间没有聊天模型,因此一次搜索只需一次 API 请求,不消耗模型 Token。
  • 搜索、抓取和研究。 research 只需一次搜索请求,就能返回最相关的网页及其内容;仅在返回的网页内容为空时才会抓取网页。
  • 专为上下文窗口打造。 默认返回 DeepSeek 为模型准备的摘要,按相关性评分筛选,并通过偏移量分页读取长文档。
  • 适用于生产环境。 对 408/429/5xx 错误进行退避重试,并遵循 Retry-After。请求速率控制在账户每秒 5 次的限制内,并在本地验证输入,避免无效请求产生费用。响应解析具有容错性,因此新增或缺失字段不会导致程序出错。

快速开始

  1. 在 platform.deepseek.com 获取 API 密钥。
  2. 将 seekfetch 添加到你的 MCP 客户端(见下文),或在 shell 中运行:
export DEEPSEEK_API_KEY=sk-...
npx -y seekfetch search "model context protocol registry"

需要 Node.js 22.12 或更高版本。

MCP 设置

该服务通过 stdio 运行,命令为 npx -y seekfetch mcp。

Claude Code
claude mcp add seekfetch -e DEEPSEEK_API_KEY=sk-... -- npx -y seekfetch mcp
Claude Desktop — claude_desktop_config.json
{
  "mcpServers": {
    "seekfetch": {
      "command": "npx",
      "args": ["-y", "seekfetch", "mcp"],
      "env": { "DEEPSEEK_API_KEY": "sk-..." }
    }
  }
}
Cursor — ~/.cursor/mcp.json
{
  "mcpServers": {
    "seekfetch": {
      "command": "npx",
      "args": ["-y", "seekfetch", "mcp"],
      "env": { "DEEPSEEK_API_KEY": "sk-..." }
    }
  }
}
VS Code — .vscode/mcp.json
{
  "inputs": [
    { "type": "promptString", "id": "deepseek-key", "description": "DeepSeek API key", "password": true }
  ],
  "servers": {
    "seekfetch": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "seekfetch", "mcp"],
      "env": { "DEEPSEEK_API_KEY": "${input:deepseek-key}" }
    }
  }
}
Codex — ~/.codex/config.toml
[mcp_servers.seekfetch]
command = "npx"
args = ["-y", "seekfetch", "mcp"]
env = { DEEPSEEK_API_KEY = "sk-..." }

在 Windows 上,如果客户端找不到 npx,请使用 "command": "cmd",并将 "args": ["/c", "npx", "-y", "seekfetch", "mcp"] 作为参数。

工具
工具功能
deepseek_search按相关性排序的网页搜索结果,每条结果都附有摘要(最多 800 个字符;可通过 summary_chars 调整)。可选筛选条件:sites、exclude_sites、lang、after、before、min_score;include_content 会添加网页文本。
deepseek_fetch将 URL 内容转换为 Markdown。长网页会按 max_chars 分块;使用 offset 获取后续内容。
deepseek_research提出问题 → 一次调用即可获取得分最高的网页内容和带编号的来源。

所有工具均为只读。

CLI

npm i -g seekfetch          # or prefix each command with npx -y

seekfetch search "rust async runtimes" -n 5 --min-score 1.5
seekfetch search "mcp server" --site github.com --lang en --after 2026-01-01
seekfetch research "how is the DeepSeek search API priced?" -o notes.md
seekfetch fetch https://example.com --max-chars 20000
seekfetch search "query" --json | jq '.results[].url'

运行 seekfetch <command> --help 查看所有选项。

Agent 技能

skills/seekfetch/SKILL.md 会指导可使用 shell 的 Agent(Claude Code、Codex 和其他能读取 SKILL.md 的 Agent)了解何时以及如何使用 CLI。将该文件夹复制到 Agent 的技能目录,例如 ~/.claude/skills/seekfetch/。

库

import { DeepSeekWebClient, buildQuery, research } from "seekfetch";

const client = new DeepSeekWebClient({ apiKey: process.env.DEEPSEEK_API_KEY! });

const { results } = await client.search({
  query: buildQuery("vector databases", { sites: ["github.com"], after: "2026" }),
  count: 10,
});

const page = await client.fetch("https://example.com"); // { title, content (Markdown) }
const report = await research(client, { question: "What changed in MCP this year?", maxPages: 3 });

配置

变量默认值
DEEPSEEK_API_KEY—必填。
DEEPSEEK_BASE_URLhttps://api.deepseek.com用于代理的覆盖值。
DEEPSEEK_TIMEOUT_MS60000每次尝试的超时时间。
DEEPSEEK_MAX_RETRIES3针对 408、429、5xx 和网络错误的重试次数。

API 限制与定价

根据 DeepSeek 于 2026-10-18 发布的文档;如需了解当前条款,请查看 Search & Fetch 指南。

  • 查询长度上限为 128 个字符,包含筛选条件。count 的取值范围为 1–50。
  • 实际观察到:摘要长度为 1,000–3,500 个字符(文档称为 600–800 个字符),搜索返回的页面内容上限约为 20,000 个字符;site: 是优先条件,而非严格筛选条件。
  • 搜索的速率限制为每个账户 5 QPS,抓取也单独限制为每个账户 5 QPS。抓取还有每个域名的速率限制。
  • 按成功请求计费,公布价格为每个 API 每 1,000 次 $0.75。空结果和错误不收费。

开发

npm install
npm test          # unit + MCP tests against a fake API
npm run build

欢迎提交问题和 PR。

许可证

MIT。“DeepSeek”是其所有者的商标,此处仅用于描述此客户端所调用的 API。

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。