Directory / plugin
Corsen Context
v1.5.18 · by corsenai
Owner-controlled AI access to your public content: llms.txt, a read-only MCP endpoint, and opt-in WebMCP tools for agents in the browser.
About this plugin
Corsen Context publishes a bounded overview of selected public WordPress content and provides four core read-only content tools through a JSON-RPC endpoint. Five further extension tools are opt-in and owner-controlled: get_product (live price, stock, images and variants via WooCommerce, plus an agentPurchase policy the agent must respect), get_sections (a page outline plus one bounded section per call), get_structured_data (typed JSON-LD blocks), check_agent_access (reads the result of the owner’s latest agent-access self-test) and request_expert_call (a human-only expert intake, annotated readOnlyHint:false and refused server-side for AI callers with error code human_only). 1.5.0 also registers the enabled tools through the experimental WebMCP browser API when the site owner opts in and the browser exposes that API, and through the WordPress Abilities API on WordPress 6.9 or newer.
What it does
The plugin provides three separate surfaces, with one implementation behind all of them:
-
Static Layer — Generates
/llms.txtwith a structured overview of selected public content. An optional, bounded/llms-full.txtexport can be enabled in settings. -
Dynamic Layer — Exposes the enabled tools through a Model Context Protocol (MCP) JSON-RPC endpoint at the canonical URL generated by WordPress. The four core tools and four WordPress read extensions are read-only; the optional human-only expert intake is explicitly non-read-only and refuses agent calls server-side. The endpoint targets protocol version 2025-11-25 with JSON responses and no server-sent event stream.
-
In-Page Layer (opt-in) — Registers the enabled tools through WebMCP
document.modelContext, including explicit per-tool annotations. Serving the bridge does not enable WebMCP in every browser: a compatible browser/client and, where applicable, current trial enrollment or a development flag are also required.
WebMCP: your tools inside the browser
WebMCP is the draft browser API (document.modelContext) through which a page offers tools to an AI agent running in the browser: Chrome with WebMCP enabled, or an agent client with built-in support such as ChatGPT’s in-app browser. With Corsen Context, your WordPress site offers in the page the same read-only tools it already serves over MCP: search_site, get_page_content, list_content, get_sitemap, plus any extension tool you enable.
- Nothing to code – the plugin enqueues the registration script with the tool definitions; every tool call goes back to your site’s own MCP endpoint, so the browser never reimplements a tool.
- Annotated and bounded – each tool carries a title plus
readOnlyHintanduntrustedContentHintannotations, and the human-only expert tool is markedconsequentialHintso a browser agent asks before calling it; the bridge stays same-origin, sends no cookies, visitor credentials or API key, and refuses to register inside frames. Tool errors reach the agent as structured results (error_code, message, handoff URL) rather than a bare exception. - Opt-in – off until you enable it under Settings > Corsen Context. An optional origin-trial token field emits Chrome’s first-party meta tag for public deployments.
To try it: enable WebMCP in Settings > Corsen Context; open the site over HTTPS as a top-level page in a browser that exposes the API (Chrome 149 or newer with chrome://flags/#enable-webmcp-testing, the Chrome origin trial that runs from Chrome 149 to 156, or an agent client with built-in support); check typeof document.modelContext === 'object' in DevTools; then ask the agent to search the site and read one page. WebMCP is experimental and browser support changes; the browser setup guide tracks the current paths.
Key Features
- Three surfaces, one contract — static
/llms.txt, a read-only MCP endpoint, and opt-in WebMCP in-page tools expose the same owner-selected content; the heavier/llms-full.txtexport and the WebMCP bridge are opt-in. - WebMCP bridge — registers the enabled tools through
document.modelContextwith per-tool annotations, same-origin and credential-free; optional origin-trial token setting. - MCP 2025-11-25 target — Supports
initialize,ping,tools/list,tools/call,resources/list,resources/read, andnotifications/initialized. The endpoint returns JSON responses and does not provide server-sent event streaming. - 4 core read-only tools —
search_site,get_page_content,list_content,get_sitemap; every other surface tool is an opt-in extension, off by default. - SEO integration — Reads Yoast SEO and Rank Math metadata for better descriptions.
- Request controls — Rate limiting, strict input validation, same-site content URL checks, defensive MCP response headers, and optional API-key authentication.
- Admin settings page — Choose public post types, exclude paths, set rate limits, toggle surfaces, and select any subset of the tools.
- Control Center (Settings > Corsen Context Control) — one card per surface and tool, honest exposed/needs-config/off badges, a per-tool “hide from in-page agents” switch, what-agents-see preview, and a bounded local audit log (transport, outcome, error code, per-tool totals) with a one-click purge.
- Dashboard widget — See your AI context status at a glance.
- Bounded generation — Total item and output-byte limits protect the optional full-content export.
- Content safety — Drafts, private posts, password-protected posts, excluded paths, and content vetoed by the exposure filter are not served.
- Credit line (opt-in) — an optional “Powered by Corsen Context” line in generated files, off by default.
Published Endpoints and Discovery Hints
When the corresponding settings are enabled, Corsen Context publishes:
- robots.txt — An
MCP:line containing the canonical endpoint URL generated by WordPress - llms.txt — When MCP is enabled, the generated file includes its canonical endpoint URL; the separate promotional credit is opt-in and off by default
- HTML head —
<link rel="mcp">link element added automatically - Direct URL —
/llms.txtremains available to clients that know the convention
These are project discovery hints, not universally consumed standards. They do not guarantee that a search engine or client will discover or use the endpoint.
Requirements
- WordPress 6.0 or higher
- PHP 8.0 or higher
- A web-server configuration that routes the published
/llms.txtpath to WordPress. Pretty permalinks are recommended for this static path. The MCP REST endpoint itself uses WordPress’s canonical URL and can use the?rest_route=/corsen-context/v1/mcpform with Plain permalinks.
WebMCP additionally needs a browser and agent/client that implement the evolving API. Chrome’s development flag and public origin-trial path can change; follow the current browser setup guide.
Part of a Bigger Ecosystem
Corsen Context is an open-source project by Corsen AI. The project also provides TypeScript packages for Node.js, Next.js, and Astro, plus a reference Express server. WordPress uses this dedicated PHP plugin.