agentprose
Supports Astro static sites by generating a static index and exposing blog content as read-only WebMCP tools for AI agents.
Uses the Contentful Delivery API with a published-content token to expose entries as read-only tools for agents, including search and article retrieval.
Enables Docusaurus static sites to make their posts and archives readable and searchable by AI agents through generated indexes and tools.
Integrates with Eleventy static sites to provide AI agents with searchable, read-only access to posts and content.
Allows Gatsby static sites to expose their content as read-only WebMCP tools, enabling agent search, article retrieval, and citation.
Connects to Ghost via the Content API using a public content key, enabling agents to search posts, read articles, and access taxonomies.
Provides support for Hugo static sites by generating an agentprose index and exposing content as read-only tools for AI agents.
Supports Jekyll static sites with a drop-in script or CLI-generated index, making posts searchable and readable by AI agents.
Integrates with Next.js static exports to expose blog content as read-only WebMCP tools, enabling agent search and article retrieval.
Integrates with Sanity using its API CDN and GROQ for public datasets, allowing agents to search and retrieve content as Markdown.
Connects to Storyblok using a public access token, providing tools for agents to search and read content as Markdown.
Supports Strapi 5/4 via its public REST API, enabling agents to list, search, and read content without authentication for public roles.
Auto-detects WordPress sites and uses the public REST API to provide tools for searching posts, retrieving articles, and listing taxonomies without credentials.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agentprosesummarize this article and cite its key sections"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agentprose
Make any blog or CMS readable by AI agents — with one line of JavaScript.
agentprose turns the content your site already publishes into read-only WebMCP tools. Agents in the browser can read the current article, search the archive, open a section and cite you accurately, so they don't have to scrape your HTML.
Documentation · Live demo · WordPress plugin · Tools · Adapters · CLI · Security · agentprose Cloud
0 runtime dependencies in the browser · read-only tools · works on any site
agentprose Cloud · agentprose.cloud adds hosted search, agent analytics (which agents read, searched and cited what) and zero-config setup: one script tag with your site's
data-key. Optional. The library below is complete without it, and stays MIT.
<script src="https://cdn.jsdelivr.net/npm/agentprose@0/dist/agentprose.min.js" defer></script>That's the whole install. agentprose needs no build step, no backend, no account and no configuration.
📖 Full documentation: salnikov.no/agentprose: quick start, every install path (CDN, agentprose Cloud, npm, WordPress, agent skill), concepts, guides per platform and the generated API reference.

Why
When an AI agent visits a blog today, it sees navigation, cookie banners and share buttons. Somewhere in the middle is the article. The agent has to guess where the content starts, spends tokens on markup, and has no reliable way to search the archive.
WebMCP lets a page hand the agent tools instead. Most existing WebMCP tools are tied to one platform. Some cut every answer off at 1,500 characters, some still call the deprecated navigator.modelContext, and some need admin tokens. agentprose is a single drop-in script that works on any site, from a 5-post Jekyll blog to a headless CMS with 50,000 entries.
Related MCP server: FreshRSS MCP Server for AI Agents
What agents get
Tool | What it returns |
| The post being viewed as clean Markdown, with title, authors, dates, tags, reading time and section outline. Long posts are paged and never cut off. |
| Full-text search across the whole site, ranked (BM25F over title › tags › summary › body). Filters for tag, category, author and date. |
| Newest or oldest posts, filterable and paginated. |
| Any post as Markdown by URL or slug, optionally one |
| The heading outline of a post (ids, levels, titles). |
| One section's Markdown, matched by id or heading text. |
| Posts related by shared tags, categories and topic. |
| Tags, categories and authors, with post counts. |
| A formatted citation. With |
| Site name, description, language, feeds, post count, latest post, links, contact details and the owner's notes for AI agents. |
| How to reach the owner: email, phone, contact page, booking link, hours, address. Registered when the site publishes contact details or uses agentprose Cloud. |
| Opt-in actions, declared by config. |
Site owners can add notes for AI agents (tone, what to recommend, what not to claim) and contact or booking details in the page config, in agentprose.json (agentprose build --site), or in the agentprose Cloud dashboard. Agents are told the notes are preferences that never override the user. See docs/configuration.md.
Every built-in tool is annotated readOnlyHint and untrustedContentHint, so agents know the tools change nothing and that post text is data, not instructions. Full schemas are in docs/tools.md.
How it finds your content
With zero configuration, agentprose reads, in order:
The page. It reads schema.org JSON-LD (
BlogPosting,Article,@graph), OpenGraph andarticle:*meta, the canonical URL, and the article body. The body comes from<article>,[itemprop=articleBody], the common theme classes, or a text-density fallback. Navigation, footers, share widgets, ads and comment forms are stripped.A prebuilt index, if one exists (
/agentprose.jsonfrom the CLI). Post bodies sit in one small Markdown file each, so the index stays small on large sites.Your feeds. RSS 2.0, Atom and JSON Feed, from
<link rel="alternate">or the usual paths (/index.xml,/feed.xml,/feed/,/rss/).sitemap.xml, including sitemap indexes, for every post the feed doesn't list. Tag, category and pagination pages are skipped.llms.txt, for titles and summaries.Pagefind, if your site ships it. Its chunked index then answers search.
WordPress, detected from
<link rel="https://api.w.org/">. Search, filters and posts then come from the REST API.
Nothing is fetched on page load. Registering the tools costs no network requests. The site-wide engine (6.6 KB) and your feeds load only when an agent first calls a site-wide tool. The result is cached for the session.
Three ways in
1. One line (any site)
<script src="https://cdn.jsdelivr.net/npm/agentprose@0/dist/agentprose.min.js" defer
data-subscribe="https://example.com/newsletter"></script>Every option is a data-* attribute; see docs/configuration.md.
agentprose@0 always serves the latest 0.x release, so fixes reach your site without a new tag; breaking changes would ship as agentprose@1. To freeze an exact version, with an optional SRI hash, see docs/versioning.md.
Using agentprose Cloud? Load the same library from the Cloud instead. Your site's public key (pk_…, from the dashboard) is the only attribute, and hosted search and agent analytics switch on by themselves:
<script src="https://agentprose.cloud/v/0/agentprose.min.js" data-key="pk_…" defer></script>/v/0/ is the Cloud's evergreen channel (latest 0.x, fixes within about an hour); /v/<exact version>/ pins one release. Everything the Cloud snippet loads, including the MCP-B polyfill, comes from agentprose.cloud.
Add ?agentprose-inspect to any URL to open the 🔌 inspector. It lists the registered tools and lets you call them, in any browser.
2. npm (apps, frameworks, custom tools)
npm install agentproseimport { createAgentTools } from 'agentprose';
import { sanity } from 'agentprose/adapters/sanity';
const agentTools = createAgentTools({
adapter: sanity({ projectId: 'abc123', dataset: 'production', urlPattern: '/blog/{slug}/' }),
links: { subscribe: '/newsletter' },
onToolCall: (e) => analytics.track('agent_tool', e), // tool, ok, ms, page — never content
tools: [
{
name: 'get_pricing',
description: 'Returns current plan prices.',
annotations: { readOnlyHint: true },
execute: () => fetch('/api/pricing').then((r) => r.json()),
},
],
});
await agentTools.ready; // { mode: 'native' | 'legacy' | 'none', registered, failed }
await agentTools.call('search_posts', { query: 'webmcp' }); // same code path an agent uses
agentTools.destroy(); // unregisters (aborts the AbortSignal)3. Static index for big sites (Hugo, Jekyll, Astro, Eleventy, Next.js, …)
npx agentprose build public --base-url https://example.com/ --llmsThis writes agentprose.json (metadata and a search excerpt per post), one agentprose/posts/*.md per post and, optionally, llms.txt. The script finds /agentprose.json automatically. npx agentprose inspect https://example.com/some-post/ shows what agents can read on a live page and gives it an agent-readiness score.
Platforms
Platform | How | Credentials in the page |
Static sites (Hugo, Jekyll, Astro, Eleventy, Next.js export, Gatsby, Docusaurus, plain HTML) | One line, plus the CLI for large archives | none |
WordPress | none (public REST API) | |
Ghost |
| Content API key (public by design) |
Sanity |
| none for public datasets (API CDN + GROQ) |
Contentful |
| Delivery API token (published content only) |
Enonic XP |
| none (public Guillotine endpoint) |
Strapi 5 / 4 |
| none (Public role: find, findOne) |
Storyblok |
| public access token |
Anything else |
| your call |
A private dataset or token can't go in a page, because every visitor can read it. For those, use proxy mode: proxy: 'https://you.example/cms' sends every request to your endpoint, and your server adds the credential. examples/proxy has a 30-line Cloudflare Worker and a Node server. agentprose refuses to start with credentials shaped like management keys: Contentful CFPAT-…, Sanity sk… and Ghost Admin keys. Details are in docs/adapters.md.
Browser support
Environment | Behaviour |
Chrome with | Native |
Any other browser | agentprose loads the pinned MCP-B polyfill (9 KB gzipped, from jsDelivr with an integrity hash, or from agentprose Cloud when you use the Cloud snippet) after the page has loaded, and registers into its |
Older polyfills exposing | Used as a fallback ( |
Polyfill blocked (strict CSP, offline) or turned off | Registers nothing, throws nothing, changes nothing. Tools stay callable via |
WebMCP runs only in secure contexts (HTTPS or localhost). Embedded frames need the tools Permissions Policy feature. agentprose registers tools with an AbortSignal, so destroy() removes them cleanly, and it never calls the removed provideContext or unregisterTool. See docs/browser-support.md.
Works with MCP-B
MCP-B gives a page the WebMCP runtime. agentprose gives it something to say. The two fit together with no glue code:
The polyfill is built in. In browsers without WebMCP, agentprose loads
@mcp-b/webmcp-polyfill@6.0.3once the page has loaded, so MCP-B's extension, relay and other clients find the tools through the standarddocument.modelContext. In short:When: only after the
loadevent, and only if the page still has no WebMCP (native,@mcp-b/global, an extension). Never in Chrome with native WebMCP.From where: jsDelivr, pinned to 6.0.3, with a Subresource Integrity hash (
integrity="sha384-…"), so the browser runs only the exact file agentprose was tested with. The agentprose Cloud snippet loads the same file fromagentprose.cloudinstead, so there is one domain to trust.Opt out:
data-polyfill="off". Self-host: copy the file and setdata-polyfill="/js/webmcp-polyfill.js".Strict CSP: allow
https://cdn.jsdelivr.netinscript-src, or self-host.
The full story (why, the hash, self-hosting steps, a CSP table): docs/security.md.
@mcp-b/globalis detected. If the page loads MCP-B's full runtime, agentprose registers into it and loads nothing extra.Your blog inside Claude Desktop, Cursor or Claude Code. Add MCP-B's local relay embed next to agentprose, add the relay to your MCP client, and the agent can search, read and cite your posts from the tab you have open:
<script src="https://cdn.jsdelivr.net/npm/agentprose@0/dist/agentprose.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/@mcp-b/webmcp-local-relay@6/dist/browser/embed.js" defer></script>{ "mcpServers": { "webmcp-local-relay": { "command": "npx", "args": ["-y", "@mcp-b/webmcp-local-relay@latest"] } } }Step by step, with what was verified: docs/tutorials/mcp-b-claude-desktop.md. A runnable check (a real MCP client, the relay and headless Chromium) is in examples/mcp-b-desktop.
Compared with what exists
One-line install | Auto-discovery | Full article (no cap) | Sections / TOC | Search | Any SSG | WordPress | Headless CMS | Proxy mode | Current API | |
agentprose | ✅ | ✅ | ✅ paged | ✅ | ✅ BM25F / Pagefind / CMS | ✅ | ✅ | ✅ 6 adapters | ✅ | ✅ |
astro-webmcp | config | Astro collections | ✗ 1.5k cap | ✗ | ✅ | Astro only | ✗ | ✗ | ✗ | ✅ |
WordPress WebMCP plugins | plugin | ✗ | some | ✗ | WP search | ✗ | ✅ | ✗ | ✗ | mixed |
Hand-rolled Hugo/Jekyll scripts | ✗ | ✗ | some | ✗ | titles/tags | one site | ✗ | ✗ | ✗ | ✅ |
CMS vendors' MCP servers | ✗ | ✗ | ✅ | ✗ | ✅ | ✗ | own | own (admin creds) | server | not WebMCP |
The full landscape, with sources, is in docs/comparison.md.
Performance & safety
9.9 KB gzipped core. It's deferred and doesn't touch layout. The core works with strict CSP: no
eval, no inline code, and scripts load only from the script's own directory, plus the MCP-B polyfill (pinned, integrity-checked) from jsDelivr after the load event in browsers without WebMCP (self-host it withdata-polyfill="/path.js", ordata-polyfill="off"; see the polyfill notes). The lazily loaded engine is 6.6 KB, and each adapter is 2–3 KB.Read-only. The only tool that does anything is
navigate_to, which is opt-in and same-origin only.Bounded output. Answers are capped (
maxChars, default 20,000) and continue withoffset/next_offset. Indexes are capped (maxPosts, default 2,000).Same-origin only. agentprose fetches only your own pages, feeds and sitemaps. It never acts as an open proxy.
No tracking. Analytics is your callback, or your endpoint (
data-analytics). It receives tool names, timings, the page and search queries, never content.
See SECURITY.md and docs/security.md.
Analytics hook
document.addEventListener('agentprose:call', (e) => console.log(e.detail)); // { tool, ok, ms, page, args }Learn which posts agents read, what they search for and what comes up empty. Searches that return nothing point to posts you haven't written yet. Want it without building anything? agentprose Cloud is the hosted dashboard: agents, tools, latency, zero-result searches and verified citations, with a free plan.
Roadmap
Zero-config script, 10 tools plus 3 opt-in actions, inspector, CLI, 7 CMS adapters, WordPress plugin
Declarative forms (WebMCP
toolnameattributes) for newsletter sign-up, opt-inagentprose buildplugins for Astro, Eleventy and Next.js (zero-step indexing)Semantic search ("ask this blog") via an optional embedding index
More adapters: Payload, Directus, Hashnode, Contentstack
agentprose Cloud: agent analytics and hosted index and search
agentprose Cloud: managed CMS proxy (BUSINESS.md)
For coding agents
skills/agentprose/ is an agent skill: it teaches Claude Code, Codex, Cursor, Copilot and other coding agents to add agentprose to a site the right way (pick the install path for the CMS or generator, add the tag, build the index, verify with agentprose inspect). Install it with:
npx skills add webmaxru/agentproseDevelopment
npm install
npm run typecheck && npm test # 104 unit tests (vitest + happy-dom/linkedom)
npm run build # dist/, prints gzipped sizes, fails over budget
CHROME=$(which chromium) npm run test:e2e # 12 end-to-end tests in headless Chromium (native WebMCP flag)
npm run demo # builds the demo blog into demo/siteSee CONTRIBUTING.md. Releases: RELEASING.md.
Maintainer
agentprose is created and maintained by Maxim Salnikov (@webmaxru, salnikov@gmail.com). The same project family includes agentprose Cloud, which runs on this library, and the agentprose WordPress plugin (WordPress.org account maxious), all by the same maintainer. See Community & open-source projects.
License
MIT. The core, every tool, the CLI, all adapters and the WordPress plugin are MIT, and stay that way.
This server cannot be deployed
Maintenance
Related MCP Connectors
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Turn any public website into an MCP server for agents to search, read and navigate.
Read-only MCP tools for AI agent discovery, structured resources, and NIULAI information.
Viral-content intelligence for AI agents — 7 read-only MCP tools, evidence-layer scoring.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to perform live web searches across 9 engines, scrape web pages into clean formats, and run agentic research with citations via MCP.83 PyPI4MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to manage RSS feeds and articles, safely extract full article text, and fetch YouTube transcripts through a token-optimized MCP interface.MIT
- FlicenseNot gradedqualityBmaintenanceEnables browser-based AI agents to interact with a WordPress site through WebMCP-registered tools, allowing them to read, search, navigate, and optionally create or modify content, taxonomies, comments, and user data via the WordPress REST API.-
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to search, browse, and cite articles from a curated reading list through read-only tools for substring search, recent listing, full article retrieval, and theme summaries.-