Borrowing it
Nothing to install: this file belongs to daidaiJ/websearch-mcpserver. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/daidaiJ/websearch-mcpserver/master/AGENTS.mdgit clone --depth 1 https://github.com/daidaiJ/websearch-mcpserverWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/daidaij/websearch-mcpserver/agents-md)<a href="https://agentmods.dev/instructions/daidaij/websearch-mcpserver/agents-md"><img src="https://agentmods.dev/badge/instructions/daidaij/websearch-mcpserver/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/daidaij/websearch-mcpserver/agents-md"><img src="https://agentmods.dev/badge/instructions/daidaij/websearch-mcpserver/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.12192 | $0.12192 |
| Opus 5.5 | $0.04877 | $0.04877 |
| Sonnet 5.5 | $0.02438 | $0.02438 |
| Haiku 4.5 | $0.01219 | $0.01219 |
Grade A, and why
websearch-mcpserver AGENTS.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- [ ] tinyfish/keenable 经二进制真网链路长期回归(限流阈值、结果质量;当前仅有 curl 实测 + 单测) How it starts
The opening of the file, as written. The whole thing — 281 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md — 智能体协作指南
本文件帮助 AI 智能体快速理解项目结构和开发约定,确保长期维护与持续开发的一致性。
包接口、工具调用链与改动落点详见 docs/developers.md。
项目一句话定位
websearch-mcpserver 是一个用 Go 编写的轻量级 MCP 搜索服务,零 API Key 即可运行,支持 Claude Code / Qwen Code / Cursor 等 MCP 客户端。提供四大核心能力:
| 能力 | 说明 |
|---|---|
| 搜索引擎搜索 | 内置百度/Bing/DuckDuckGo/Google 多引擎并发编排,支持 Tavily/Exa/AnySearch/豆包/元宝等 API 引擎混合 |
| API 搜索 | API Key 池轮转模式,支持百度千帆/Tavily/Exa/AnySearch/豆包/元宝等多种 API 供应商,失败自动切换 |
| 学术搜索 | arXiv/Crossref/OpenAlex/PubMed/Semantic Scholar/Google Scholar/Europe PMC/DBLP/DOAJ 九大学术引擎并发,DOI 跨引擎去重、逐引擎错误透传 |
| 网页抓取 | 增强型网页内容提取(TLS 指纹伪装 + SSRF 防护 + Jina Reader 备选) |
| PDF 解析 | MinerU AI 增强 PDF 解析(表格/公式/多栏/图片智能识别),无 Token 自动降级 |
技术栈速览
| 项 | 值 |
|---|---|
| 语言 | Go 1.26+,纯 Go 无 CGO |
| 数据库 | SQLite(modernc.org/sqlite,纯 Go 实现) |
| 配置 | Viper(YAML + 环境变量覆盖) |
| 日志 | Zerolog 结构化日志 |
| MCP 协议 | modelcontextprotocol/go-sdk |
| HTTP 客户端 | resty.dev/v3 + go-webfetch(TLS 指纹伪装) |
| 部署 | 单二进制 / Docker 多阶段构建;Release 与 GHCR / MCP Registry 矩阵拆分(见下方提示) |
目录结构与模块职责
cmd/ # 入口:main.go + 平台初始化(Windows 代理检测等)
mcp/ # MCP 协议层:工具注册、请求处理
server/ # HTTP 服务:生命周期、路由
searxng/ # SearXNG 兼容 HTTP 端点
pkg/
├── search/ # ★ 搜索编排层(factory.go 为组合根,只做装配与类型别名)
│ ├── core/ # 类型契约:SearchInf/SearchResult/ScoreBucket + 结果格式化
│ ├── engine/ # 底层网页引擎(HTTP 抓取层):baidu/ bing/ ddg/ google/
│ ├── provider/ # API 供应商适配器:tavily/ exa/ anysearch/ doubao/ baidu*,KeyPool 轮转
│ ├── adapter/ # 本地引擎/学术适配器:EngineSearchAdapter/ Bing/ 百度回退/ 学术
│ ├── apipool/ # 跨供应商轮转策略(round-robin/priority/weighted)
│ ├── hybrid/ # 多引擎并发编排策略(去重、合并、per-engine 过滤)
│ ├── enhance/ # 高阶评分功能:RRF/域名品质/词汇对齐/MMR/学术评分增强
│ └── mode/ # 搜索模式构建:按 config.mode 组装 Primary(engine/baidu/apipool/hybrid…)
├── antirobot/ # 反检测公共层:Searcher 接口、限流器、TLS 指纹(跨层公共,保持顶层)
├── academic/ # 学术搜索:arXiv/Crossref/OpenAlex/PubMed/S2/GS/EuropePMC/DBLP/DOAJ
├── fetch/ # 抓取与解析族
│ ├── webfetch/ # 增强型网页抓取(SSRF 防护、DNS rebinding 检测、PDF 解析分支)
│ ├── jina/ # Jina Reader 备选抓取
│ └── mineru/ # MinerU PDF 解析
├── llm/ # LLM:Client + 搜索摘要 Summarizer
├── config/ # 配置加载与结构体定义
├── cache/ # SQLite 缓存(6h 过期,后台清理)
├── client/ # HTTP 客户端(API 供应商共用)
├── proxy/ # 系统代理自动检测(Windows 注册表 / 环境变量)
├── daemon/ # 引用计数进程管理
└── log/ # 日志配置
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday Changed · +15 lines · +1,766 tokens per session 825518f5fb30
- 11d ago Changed · +35 lines · +3,128 tokens per session bac239a61061
- 13d ago Changed · +31 lines · +2,526 tokens per session 278a038bc27a
- 15d ago Changed · -1 tokens per session 426dea905c5a
- 17d ago Changed · -3 lines · -726 tokens per session 78ac2e05c038
- 22d ago Changed · +51 tokens per session 1e24c440aa99
- 28d ago Changed · +7 lines · +388 tokens per session 0a7893e74eda
- 1mo ago Changed · +24 lines · +1,331 tokens per session 961bfd455271
- 1mo ago Changed · +20 lines · +1,089 tokens per session 9ba28834b414
- 1mo ago First seen · 152 lines · 2,640 tokens per session scan A f69c06e53d61
websearch-mcpserver AGENTS.md is an instructions file published in the GitHub repository daidaiJ/websearch-mcpserver (29 stars, last pushed 2d ago), licensed MIT. It adds 12,192 tokens to every session, about $0.0488 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
websearch-mcpserver AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| websearch-mcpserver AGENTS.mddaidaiJ/websearch-mcpserver | Instructions file | 29 | 2d ago | MIT | A | 12,192 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |