Mescio for Agents
Mescio for Agents serves your WordPress content as clean Markdown to AI agents and GPT crawlers.
Install in
Mescio for Agents makes your WordPress site AI-ready by silently serving posts, pages and WooCommerce products as clean, structured Markdown to any AI agent or LLM pipeline that requests it — using the standard HTTP Accept: text/markdown content negotiation header.
Human visitors using a browser are completely unaffected. Mescio for Agents only activates when an AI agent or crawler explicitly asks for Markdown.
Why Markdown?
Feeding raw HTML to an AI is expensive and noisy. A heading like ## About Us costs ~3 tokens in Markdown vs 12–15 tokens as HTML — before accounting for <div> wrappers, navigation bars and script tags that carry zero semantic value. This blog post you are reading takes 16,180 tokens in HTML and 3,150 tokens in Markdown. That is an 80% reduction.
Markdown has become the lingua franca for AI systems. Mescio for Agents lets your site speak it natively, at zero cost to your human visitors.
How it works
When an HTTP client sends a request with Accept: text/markdown, Mescio for Agents intercepts the WordPress request lifecycle before any template is rendered, converts the post content to clean Markdown, and returns it with the correct Content-Type: text/markdown header.
curl https://yoursite.com/your-post/ \
-H "Accept: text/markdown"
Features
- Zero configuration — works out of the box on any singular post, page or custom post type
/llms.txtendpoint — auto-generated index of all your content in the llmstxt.org standard format, so AI agents can discover what’s on your site/llms-full.txtendpoint — full site content in a single Markdown file, ready for RAG pipelines- WooCommerce support — product pages include price, SKU, stock status, rating, attributes and gallery; products are grouped by category in
llms.txt - Hide storefront pages — Cart, Checkout, My Account, Wishlist and payment-result pages stay out of
llms.txtautomatically; hide any other page from the metabox or a settings ID/URL list - YAML front matter — every document includes structured metadata (title, description, URL, date, categories, tags, featured image)
- Multilingual — detects language via WPML, Polylang, TranslatePress or WordPress locale; emits
Content-LanguageandLink: rel=alternateheaders - REST API endpoint —
/wp-json/mescio-for-agents/v1/markdown?id=<post_id>or?url=<permalink> - Page builder cleanup — aggressively strips Elementor, Divi, WPBakery and Beaver Builder layout noise
- Token count header —
X-Markdown-Tokenstells AI pipelines how large the document is before processing - Content Signals — emits
Content-Signal: ai-train=yes, search=yes, ai-input=yes - Cache-safe Markdown — permalink content negotiation is skipped when a full-page cache is detected (LiteSpeed, WP Rocket, …) so Markdown cannot replace the HTML page in cache; agents use the REST alternate instead
- Agent activity — see who requested Markdown,
/llms.txtand (with WebMCP Bridge) MCP tools. Local log only: no IP, 30-day retention. Counts what this site served, not citations in ChatGPT.
Optional companion: WebMCP Bridge
Mescio for Agents is the content layer (what agents can read). WebMCP Bridge — same author, also free — is the tool layer (what agents can do): search, menus, and WooCommerce cart actions, without scraping HTML.
When both plugins are active, WebMCP automatically unlocks get_markdown_content, get_llms_txt and retrieve. From 1.8.0, Agent activity in Mescio settings also lists those WebMCP tool calls next to Markdown and llms.txt hits — so you can see the readable layer and the usable layer in one place.
Mescio for Agents works fully on its own; WebMCP is optional. Agent activity is not a SaaS “Insights” product and not a GEO ranking score.
Response headers
Content-Type: text/markdown; charset=utf-8Content-Language: it(or detected language)Vary: AcceptX-Markdown-Tokens: 725Content-Signal: ai-train=yes, search=yes, ai-input=yesLink: <url>; rel="alternate"; hreflang="en"(when translations available)
Multilingual plugin support
- WPML — reads language and available translations automatically
- Polylang — reads language and links to translated post IDs
- TranslatePress — reads
trp_languagepost meta - Manual — configure primary language and additional languages in Settings Mescio for Agents
REST API
GET /wp-json/mescio-for-agents/v1/markdown?id=42
GET /wp-json/mescio-for-agents/v1/markdown?url=https://yoursite.com/my-page/
Developer hooks
Filter: mescio_enabled_post_types — add or remove post types dynamically.
Filter: mescio_pre_convert_content — modify the HTML before conversion to Markdown.
Filter: mescio_post_convert_content — modify the Markdown after conversion.
Filter: mescio_exclude_from_llms — hide or force-include a post in /llms.txt and /llms-full.txt.
Filter: mescio_excluded_llms_ids — add page IDs to the exclusion list.
Privacy
This plugin does not collect, store or transmit any personal data. It does not set cookies. It does not make external HTTP requests.
Written by Joobi from the project's own listing. See the source page
1.8.1
- REST GET /markdown is logged as Markdown (same channel as Accept: text/markdown) and emits mescio_agent_request so Mescio Insights sees linked copies
- Settings copy: this is for agents, not Google Search
1.8.0
- New: Agent activity — the observability slice of the Mescio + WebMCP stack (readable / usable / what was actually requested)
- Panel on the settings screen: Markdown, llms.txt, REST, and WebMCP tool calls when that plugin is active
- No IP addresses; user-agent classified (GPTBot, Claude, …); rows deleted after 30 days
- Disable under Settings Mescio for Agents Agent activity
- Readme and admin copy explain this is not GEO ranking and not an Insights SaaS
1.7.9
- New:
Accept: text/markdownon a posts-index homepage (is_home(), including “Your latest posts”) now returns Markdown — isitagentready.com probes/, not a singular post - The homepage Markdown list uses the main query, so Simple Custom Post Order and similar plugins keep their order
1.7.8
- Fixed: REST Markdown fatal
json_decode(): Argument #1 ($json) must be of type string, array givenwhen a post has array-valued custom fields (WordPress already unserializes meta)
1.7.7
- New: hide individual pages from
/llms.txtand/llms-full.txt— metabox checkbox plus a settings list of page IDs or URLs - New: WooCommerce Cart, Checkout, My Account and Terms are excluded automatically (wishlist and payment-result pages too)
- Fixed: stale My Account excerpt (“Hello admin… Cerrar sesión”) — session leftovers and storefront shortcodes are no longer used as descriptions
- Rank Math / Yoast noindex is not read; use the Mescio exclusion controls instead
- New filters:
mescio_exclude_from_llms,mescio_excluded_llms_ids
1.7.6
- Fixed:
Accept: text/markdownon the permalink works again with LiteSpeed — 1.7.5 skipped it entirely; Markdown is now uncacheable and LiteSpeed varies on Accept - Fixed: REST
?url=lookup failed on WPML “different domain per language” and/%category%/%postname%/permalinks (homepage-only worked) - Fixed:
llms.txt/llms-full.txtlisted every WPML translation twice; queries are language-scoped and de-duplicated - Fixed: yielding
/llms.txtto Rank Math left the homepage HTML because thellms_txtquery var was dropped duringWP::query_posts()
1.7.5
- Fixed: Markdown via
Accept: text/markdownon the permalink could be stored by LiteSpeed Cache (and other URL-keyed caches) as the HTML page, so browsers saw raw Markdown - When a full-page cache is detected, permalink content negotiation is skipped; Markdown stays on the REST endpoint advertised as
rel="alternate" - Markdown responses send
Cache-Control: private, no-storeandX-LiteSpeed-Cache-Control: no-cache - New filters:
mescio_disable_permalink_markdown,mescio_full_page_cache_detected
1.7.4
- Compatibility: when Rank Math SEO’s LLMS Txt module is active, Mescio yields
/llms.txtto Rank Math and keeps/llms-full.txtplus REST/Markdown - Sets Rank Math’s
llms_txtquery var so/llms.txtstill resolves if Mescio’s rewrite matched first - Admin notice on Plugins and Mescio settings explaining the split
- New filter:
mescio_yield_llms_txt_to_rank_math
1.7.3
- Optional companion: settings page now explains the content vs tools split with WebMCP Bridge (same author, free, not required)
- When WebMCP is missing, one-click install/activate from Settings Mescio for Agents
- After each plugin update, a dismissible notice on the Plugins screen offers the same pairing — it does not appear site-wide
- New filter:
mescio_companion_notice_enabled
1.7.2
- New: each singular page now advertises its Markdown representation in the HTML
<head>and as an HTTPLinkheader:rel="alternate"; type="text/markdown" - The alternate points at
/wp-json/mescio-for-agents/v1/markdown?id=Nso a plain GET returns Markdown (noAcceptheader required) - New filters:
mescio_markdown_alternate_enabled,mescio_markdown_alternate_url
1.7.1
- Fixed: Content-Signal line in robots.txt was discarded by Yoast SEO — hook now runs at priority 999999, after Yoast rebuilds robots.txt from scratch (priority 99999)
- Fixed:
/.well-known/api-catalogwas advertised in Link headers and HTML<link>tags but returned 404 because the route was never registered - New: RFC 9727 API catalog endpoint at
/.well-known/api-catalogservingapplication/linkset+json(with GET and HEAD support) - Added:
mescio_api_catalogfilter to customise the catalog document
1.6.6
solve problem robots.txt
1.6.5
- Security: added two-layer burst protection to rate limiter — IPs sending more than 20 req/5s are auto-blocked for 10 minutes; blocked IPs rejected with a single transient read before any WordPress processing
- All burst thresholds filterable:
mescio_burst_limit,mescio_burst_window,mescio_block_duration - REST 429 responses now include
Retry-After,X-RateLimit-Remaining,X-RateLimit-Resetheaders - New: Content Signals support (draft-romm-aipref-contentsignals) — site owners can now declare AI usage preferences
- Content Signals published in
robots.txtviaContent-Signal:directive and in all Markdown/REST response headers - Default values:
ai-train=no, search=yes, ai-input=yes(conservative — protects owners who install without reading docs) - Configurable from Settings Mescio for Agents with live preview
- Filterable by developers via
mescio_content_signalsfilter - Replaced hardcoded
Content-Signal: ai-train=yesheader with dynamic value from settings
1.7.0
- New: HTML
<link>tags in<head>for discovery — cache-proof fallback for WP Rocket and all full-page cache plugins; emitted on the homepage viawp_head - New: added FAQ entry explaining WP Rocket / full-page cache compatibility and the HTML tag fallback
- Improved:
wp_headersfilter replacessend_headersaction for HTTP Link headers — more compatible with standard setups - Added:
api-catalogLink (RFC 9727) pointing to/.well-known/api-catalog - Added:
service-docLink alongsideservice-desc— broader checker compatibility - Fixed: OpenAPI
service-descnow uses correct media typeapplication/vnd.oai.openapi+json - Fixed: Content Signals settings now save correctly — option group mismatch resolved
- Security: two-layer burst protection in rate limiter (20 req/5s 10-minute auto-block)
- New filter:
mescio_link_html_tags_enabledto disable HTML<link>tags independently
1.6.3
- Fix: shortcode builder tags (WPBakery, WoodMart, ecc.) rimossi anche dagli excerpt nel llms.txt index
- Fix: llms.txt ora serve titoli, excerpt e permalink nella lingua corretta su siti multilingua (WPML/Polylang)
- Fix: llms-full.txt ora serve il contenuto completo dei post nella lingua corretta (WPML/Polylang)
1.6.1
- Fixed 404 on multilingual sites using WPML or Polylang:
llms.txtandllms-full.txtnow resolve correctly under language-prefixed URLs (e.g./it/llms.txt,/en/llms-full.txt) - Added
parse_requestearly intercept (priority 1) as fallback for language plugins that rewrite REQUEST_URI before WordPress rewrite rules run - Added rewrite rule variant matching
/xx/llms.txtand/xx-XX/llms.txtpatterns
1.6.0
- Added rate limiting: per-IP request throttling on all endpoints via WordPress transients
llms-full.txtlimited to 10 req/60s, REST search to 20, other REST to 30, default to 60- Returns 429 Too Many Requests with
Retry-Afterheader when limit exceeded - Respects Cloudflare, nginx and standard
X-Forwarded-Forproxy headers - Added sensitive meta key filter: fields containing
password,token,email,phone,ibanand similar patterns are never exposed in Markdown front matter - Both rate limiting and sensitive key filter are filterable by developers
1.5.0
- Added automatic custom fields support in Markdown front matter
- If ACF is active, uses
get_fields()with label-keyed, typed values; nested groups and repeaters flattened to dot notation (e.g.group.field) - Without ACF, exposes plain post meta — skipping internal keys (
_prefix), serialized data, JSON blobs and known plugin internals - Added
mescio_custom_metafilter for developer overrides
1.4.0
- Added
/agents.txtendpoint following IETF draft-srijal-agents-policy-00 - SHA-256 hash computed automatically from directive content
- Configurable directives (path, ALLOW/DISALLOW, optional params) via admin settings
- Live preview of generated file with hash in settings page
- Default directives:
/ ALLOW,/wp-admin DISALLOW,/wp-login.php DISALLOW - Added
/agents.txtlink in Quick Links table
1.3.0
- Refactored monolith into modular architecture (6 separate class files)
- Added REST endpoint
/wp-json/mescio-for-agents/v1/context— site metadata + llms.txt in JSON for MCP servers - Added REST endpoint
/wp-json/mescio-for-agents/v1/search— full-text search with Markdown output - Added REST endpoint
/wp-json/mescio-for-agents/v1/page— page by slug or ID - Added REST endpoint
/wp-json/mescio-for-agents/v1/openapi— OpenAPI 3.1 schema - Added
llms-full.txtpagination via?limit=N&offset=NwithX-LLMS-Nextheader - Improved caching: real
Last-Modifiedfrom content timestamp,ETagfrom body hash, full 304 support - Fixed excess blank lines in Markdown output from Elementor and other page builders
- Expanded admin API Examples panel with 8 tabs and copy buttons
1.2.0
- Added
/llms.txtendpoint — auto-generated site index in the llmstxt.org standard format - Added
/llms-full.txtendpoint — full site content in a single Markdown file for RAG pipelines - Products in
llms.txtgrouped by WooCommerce category with price and stock status - Added
mescio_llms_txt_posts_limit,mescio_llms_txt_products_limit,mescio_llms_full_txt_limitfilters - Added flush rewrite rules on plugin activation/deactivation
- Added
/llms.txtand/llms-full.txtclickable links in the settings test panel
1.1.0
- Added multilingual support: WPML, Polylang, TranslatePress and manual configuration
- Added
Content-LanguageandLink: rel=alternateresponse headers - Improved HTML to Markdown converter with aggressive page builder noise removal
- Added UTF-8 and mojibake encoding auto-correction
- Improved whitespace normalisation
- Added 27-language selector in admin with flags and native names
- Added plugin detection badges in settings page
- Added test panel with ready-to-use curl and Python examples
1.0.0
- Initial release
- Content negotiation via
Accept: text/markdownheader - YAML front matter with post metadata
- WooCommerce product support
- REST API endpoint
/wp-json/mescio-for-agents/v1/markdown X-Markdown-Tokensheader with token count estimateContent-SignalheaderVary: Acceptfor correct HTTP caching
Follow this listing's changes (Atom feed)