DEV Community

fileminto
fileminto

Posted on

Making a Content Site Agent-Readable: Remote MCP, Markdown Endpoints, and Access Modes

Most content sites treat AI agents like unwanted scrapers—blocking headless browsers, burying data in hydrated React trees, and leaving developers to parse brittle HTML.

When building AI Radar, we wanted the opposite: one URL an agent can plug into directly without scraping HTML, while still letting the site operator switch between open access and key-gated access without rewriting every route.

Here is the three-track access layer we ended up shipping on airadar.day/agent.

1. Remote MCP over Streamable HTTP (/api/mcp)

Instead of asking users to clone a repo and run a local stdio MCP server, /api/mcp speaks standard Streamable HTTP. Any client that supports remote MCP (Claude Code, Codex, Cursor, Claude Desktop, Cherry Studio) just points to one URL.

One pattern that kept the codebase clean: the total tool count isn't hardcoded. Core feed tools live in MCP_TOOLS, and vertical modules register their own tools through AGENT_PARTS:

export const mcpToolCount = () =>
  MCP_TOOLS.length + AGENT_PARTS.reduce((n, a) => n + (a.tools?.length ?? 0), 0);
Enter fullscreen mode Exit fullscreen mode

When a new module lands (like the AI coding quota reset calendar), its MCP tools and client snippets show up on /agent automatically.

2. Three access modes (open, key_only, closed)

A public feed should be frictionless when open, but you still want a clean kill-switch or commercial gate if traffic spikes or an API consumer needs SLA limits. Every track on /agent reads the same agentAccess policy:

  • open: Anonymous read-only access. No API keys, no tokens, no session cookies.
  • key_only: Requires Authorization: Bearer YOUR_API_KEY or X-Api-Key on both /api/mcp and REST endpoints, and the /agent UI automatically switches its copy-paste snippets to include the auth header.
  • closed: Disables external machine endpoints cleanly and updates the /agent status UI so clients don't waste retries.

3. Don't forget plain RSS and Markdown/JSON REST

Not every workflow needs MCP. Automation tools like n8n, Inoreader, Folo, and Reeder still work best with standard RSS feeds, and lightweight cron scripts just want a curl-friendly JSON or Markdown GET endpoint. Exposing all three (MCP, RSS, REST) over the same underlying data layer means you maintain one pipeline and let each caller pick the protocol that fits.

You can inspect the live endpoints and copy-paste configs for Claude Code, Codex, Cursor, and RSS readers at airadar.day/agent.

Top comments (0)