Skip to main content
Glama

agent-search-mcp (Zero-Dependency Cloudflare Search for Agents MCP Server & CLI)

License: MIT Zero npm Dependencies Node.js 22+

A zero-dependency Model Context Protocol (MCP) server & CLI for auditing and querying websites via Cloudflare Search for Agents (/.well-known/search), RFC 10008 HTTP QUERY, Accept: text/markdown, /llms.txt, and 4-Tier Cascade Discovery BM25 search.

Zero npm install. Zero headless browsers. Built-in DNS-verified SSRF Shield. Drop straight into Claude Desktop, Claude Code, Cursor, Windsurf, VS Code Copilot, or Google Antigravity.


3 Production MCP Tools Included Free (MIT)

Tool

What It Does

agent_readiness_audit

Probes /.well-known/search (RFC 10008 HTTP QUERY / GET), <meta name="agent:endpoint">, Accept: text/markdown (Vary: Accept, x-markdown-tokens), /llms.txt, /robots.txt AI bots (GPTBot, ClaudeBot, PerplexityBot, OAI-SearchBot, Google-Extended, CCBot) & /sitemap.xml. Returns 0–100 score, grade (A+–F), token savings, Cloudflare $0.75/1k overage risk & recommendations.

agent_search_cascade

Executes 4-Tier Cascade Discovery so agents get clean ranked chunks on 100% of websites on Day 1: Tier 1 /.well-known/search → Tier 2 Accept: text/markdown → Tier 3 /llms.txt → Tier 4 Clean HTML→Markdown + BM25.

estimate_markdown_tokens

Compares raw HTML vs native Accept: text/markdown (or clean HTML→Markdown), reporting bytes saved, tokens saved, % reduction & estimated USD saved per 10,000 agent fetches.

Related MCP server: Agent Lighthouse MCP Server

Security First (DNS-Verified SSRF Shield)

Every outbound fetch and every HTTP redirect hop resolves DNS via node:dns/promises and rejects localhost, 127.0.0.1, AWS/GCP/Azure metadata (169.254.169.254), RFC1918 (10/8, 172.16/12, 192.168/16), CGNAT (100.64/12), IPv6 loopback/ULA (::1, fc00::/7, fe80::/10), numeric/octal IP obfuscations, and non-HTTP(S) schemes (file://, gopher://).


Quickstart

git clone https://github.com/danlopes18-ctrl/agent-search-mcp
cd agent-search-mcp
npm test   # Runs live stdio JSON-RPC + CLI + SSRF QA suite

Use Directly from Your Terminal (CLI)

# Audit Cloudflare Search for Agents readiness & token savings
node cli.mjs audit https://blog.cloudflare.com/search-for-agents/

# Run 4-tier Cascade Discovery search with BM25 ranking
node cli.mjs search https://blog.cloudflare.com/search-for-agents/ "markdown for agents" --max-chunks 4

# Estimate HTML vs Markdown token savings on any URL
node cli.mjs tokens https://danlopes18-ctrl.github.io/

Add to Claude Desktop / Cursor / Windsurf / Antigravity

{
  "mcpServers": {
    "agent-search-mcp": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/agent-search-mcp/server.mjs"]
    }
  }
}

MIT Lite vs. PRO Kit ($29) — Make Your Site Agent-Ready on Cloudflare Free ($0/mo)

Cloudflare's native Markdown for Agents requires a Pro+ plan ($20+/mo), and public /.well-known/search endpoints face $0.75/1k semantic query overages past the 500 pages/day free indexing cap.

Upgrade to Cloudflare Agent-Ready & Search Guardrails Kit ($29 · Commercial & Agency License) to deploy the complete server-side & anti-overage stack on Cloudflare Free ($0/mo):

Capability

agent-search-mcp (Free MIT)

Cloudflare Agent-Ready & Search Guardrails Kit ($29 PRO)

3-Tool Cascade Discovery MCP Server + CLI

✅

✅ (Expanded 5-Tool PRO MCP)

DNS-Verified SSRF Shield + BM25 Chunker

✅

✅

Cloudflare Free Worker: Accept: text/markdown Polyfill (x-markdown-tokens, Vary: Accept, Edge Cache — saves $20/mo Pro plan)

—

✅

Cloudflare Free Worker: /.well-known/search BM25 Gateway (GET, RFC 10008 QUERY, POST, <meta name="agent:endpoint"> injector — $0/1k queries)

—

✅

Cloudflare WAF & Rate-Limiting Anti-Overage Pack (JSON + Terraform HCL + budget-auditor.mjs CI gate + Playbook)

—

✅

Batch Fleet Auditor CLI (Multi-URL audit exporting JSON + CSV + Executive HTML Report)

—

✅

Commercial & Client Agency License

MIT

✅ Commercial + Client Deployment

👉 Get the PRO Kit ($29): https://danlopes3.gumroad.com/l/cloudflare-agent-search-kit


Hosted API & Bulk Cloud Scraping Options

Available Tools

3 tools
agent_readiness_auditA

Audit any website for Cloudflare Search for Agents (/.well-known/search, RFC 10008 HTTP QUERY), , Accept: text/markdown token savings, /llms.txt, robots.txt AI crawler policies, and Cloudflare $0.75/1k overage risk. Returns 0-100 score, grade (A+-F), and prioritized recommendations.

Inputs: url (required).

agent_search_cascadeB

Run 4-Tier Cascade Discovery search on any website: Tier 1 /.well-known/search -> Tier 2 Accept: text/markdown -> Tier 3 /llms.txt -> Tier 4 Edge HTML-to-Markdown + deterministic BM25 chunk ranking. Guarantees clean ranked chunks on 100% of websites.

Inputs: url (required), query (required), max_chars, max_chunks.

estimate_markdown_tokensB

Compare raw HTML vs native Accept: text/markdown (or clean HTML-to-Markdown conversion) for any URL, estimating exact byte/token savings and LLM input cost reduction per 10,000 agent fetches.

Inputs: url (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 3 tools

    Disambiguation4/5

    Each tool targets a distinct action: auditing readiness, running a tiered discovery search, and estimating markdown token savings. The boundary between agent_readiness_audit and estimate_markdown_tokens is soft, since the audit already reports markdown token savings and $0.75/1k overage risk, so an agent may be unsure which to call for a savings question.

    Naming Consistency3/5

    All names are snake_case, but ordering conventions are mixed: agent_readiness_audit and agent_search_cascade are noun-first descriptors while estimate_markdown_tokens is verb-first. Readable, but no single predictable pattern an agent can generalize from.

    Tool Count3/5

    Three tools is thin even for a narrowly scoped server, and there is no utility beyond the three core use cases. Each tool does earn its place, but the surface feels minimal rather than deliberately scoped.

    Completeness3/5

    Discovery, scoring, and savings estimation are covered, but there is no remediation/setup tool (e.g. generating /.well-known/search, llms.txt, or robots.txt AI policy), no site-wide or batch auditing, and no caching or repeat comparison. Agents can diagnose problems but cannot act on the findings with this server.

    Maintenance

    ActivityNo data
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to check whether a public website is crawlable, understandable, and ready for AI search workflows through local-only audits of robots.txt, sitemaps, metadata, and llms.txt.
      3
      142 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to run a free AI-readiness audit of any URL, checking AI crawler rules, JavaScript-free page text, JSON-LD, llms.txt, sitemap, meta description, FAQ schema, and returning a score with findings and fixes. Also exposes the same capability via an A2A agent endpoint.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an agent to score a domain's AI-agent readiness through deterministic HTTP checks with a per-check breakdown, and to search a measured catalogue of providers to find which ones an unattended run can complete a job with and where it stops. Results can be returned as readable summaries, actionable markdown instructions, or SARIF for code-scanning pipelines.
      68 npm
      MIT