websearch-mcpserver: Instructions file for Codex

AGENTS.md

websearch-mcpserver AGENTS.md is an instructions file for Codex, OpenCode from daidaiJ/websearch-mcpserver. It costs 12,192 tokens per session, scanned A, original, MIT.

Contributor instructions for websearch-mcpserver, a Go service that lets AI-agent tools search engines, academic sources, web pages, and PDFs. MCP is a standard way for AI applications to call external tools.

In plain words
What is it for?
Use them when working on search orchestration, academic search, webpage extraction, PDF parsing, API providers, the MCP interface, HTTP server, configuration, or deployment.
Why use it?
They provide the service's structure and supported search paths so changes can be made in the correct component.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code; mentions AGENTS.md; built for cline.

This is daidaiJ/websearch-mcpserver's own configuration. It tells Codex and OpenCode how to work on websearch-mcpserver itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything websearch-mcpserver configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/daidaiJ/websearch-mcpserver/master/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/daidaiJ/websearch-mcpserver

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for websearch-mcpserver AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/daidaij/websearch-mcpserver/agents-md/github.svg)](https://agentmods.dev/instructions/daidaij/websearch-mcpserver/agents-md)
Your own site
<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.

agentmods 80×15 button for websearch-mcpserver AGENTS.md

Your own site · 80×15
<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>
Per session 12,192 This file is loaded in full into every session.
When invoked 12,192 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured yesterday against content hash 825518f5fb30, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 实测 + 单测)
AGENTS.md · 281 lines

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/          # 日志配置

Read the full file on GitHub · 281 lines

Changes

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.

  1. yesterday Changed · +15 lines · +1,766 tokens per session 825518f5fb30
  2. 11d ago Changed · +35 lines · +3,128 tokens per session bac239a61061
  3. 13d ago Changed · +31 lines · +2,526 tokens per session 278a038bc27a
  4. 15d ago Changed · -1 tokens per session 426dea905c5a
  5. 17d ago Changed · -3 lines · -726 tokens per session 78ac2e05c038
  6. 22d ago Changed · +51 tokens per session 1e24c440aa99
  7. 28d ago Changed · +7 lines · +388 tokens per session 0a7893e74eda
  8. 1mo ago Changed · +24 lines · +1,331 tokens per session 961bfd455271
  9. 1mo ago Changed · +20 lines · +1,089 tokens per session 9ba28834b414
  10. 1mo ago First seen · 152 lines · 2,640 tokens per session scan A f69c06e53d61

Subscribe to this mod's changes

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.

Related

websearch-mcpserver AGENTS.md compared with instructions from other repositories

websearch-mcpserver AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
websearch-mcpserver AGENTS.mddaidaiJ/websearch-mcpserverInstructions file292d agoMITA12,192Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode