websearch-mcpserver AGENTS.md

websearch-mcpserver AGENTS.md is an instructions file for Codex, OpenCode from daidaiJ/websearch-mcpserver. It costs 1,872 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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/daidaij/websearch-mcpserver/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,872 This file is loaded in full into every session.
When invoked 1,872 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01872 $0.01872
Opus 5 $0.00936 $0.00936
Sonnet 5 $0.00374 $0.00374
Haiku 4.5 $0.00187 $0.00187

Measured 4d ago against content hash 8d4c2aac1240, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

websearch-mcpserver AGENTS.md scanned grade A with 0 findings 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 4d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — 智能体协作指南

本文件帮助 AI 智能体快速理解项目结构和开发约定,确保长期维护与持续开发的一致性。


项目一句话定位

websearch-mcpserver 是一个用 Go 编写的轻量级 MCP 搜索服务,零 API Key 即可运行,支持 Claude Code / Qwen Code / Cursor 等 MCP 客户端。提供四大核心能力:

能力 说明
搜索引擎搜索 内置百度/Bing/DuckDuckGo/Google 多引擎并发编排,支持 Tavily/Exa 等 API 引擎混合
API 搜索 API Key 池轮转模式,支持百度千帆/Tavily/Exa 等多种 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 多阶段构建

目录结构与模块职责

cmd/              # 入口:main.go + 平台初始化(Windows 代理检测等)
mcp/              # MCP 协议层:工具注册、请求处理
server/           # HTTP 服务:生命周期、路由
searxng/          # SearXNG 兼容 HTTP 端点

pkg/
├── search/       # ★ 核心编排层
│   ├── inf.go          # 接口定义(SearchInf, SearchResult)
│   ├── hybrid.go       # 多引擎并发编排、去重、合并、排序
│   ├── factory.go      # 引擎工厂:根据配置选择并实例化引擎
│   ├── engine_adapter.go  # 通用引擎适配器(Tavily/Exa/Google/DDG)
│   ├── baidu_fallback.go  # 百度适配器(含智能回退)
│   ├── bing_adapter.go    # Bing 适配器
│   ├── apipool.go         # API Key 池轮转
│   └── *_test.go          # 单元测试
├── antirobot/    # 反检测公共层:Searcher 接口、限流器、TLS 指纹
├── baidu/        # 百度底层引擎实现
├── bing/         # Bing 底层引擎实现
├── ddg/          # DuckDuckGo 底层引擎实现
├── google/       # Google 底层引擎实现
├── academic/     # 学术搜索:arXiv/Crossref/OpenAlex/PubMed/S2/GS/EuropePMC/DBLP/DOAJ
├── config/       # 配置加载与结构体定义
├── cache/        # SQLite 缓存(6h 过期,后台清理)
├── webfetch/     # 增强型网页抓取(SSRF 防护、DNS rebinding 检测)
├── jina/         # Jina Reader 备选抓取
├── llm/          # LLM 摘要生成
├── mineru/       # MinerU PDF 解析
├── proxy/        # 系统代理自动检测(Windows 注册表 / 环境变量)
├── daemon/       # 引用计数进程管理
├── log/          # 日志配置
└── xml/          # XML 格式化

Read the full file on GitHub · 146 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. 4d ago First seen · 146 lines · 1,872 tokens per session scan A 8d4c2aac1240

Subscribe to this mod's changes

websearch-mcpserver AGENTS.md is an instructions file published in the GitHub repository daidaiJ/websearch-mcpserver (20 stars, last pushed 4d ago), licensed MIT. It adds 1,872 tokens to every session, about $0.0094 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.