MCP Tools
Overview
Foundry integrates with the Model Context Protocol (MCP) via @nuxtjs/mcp-toolkit. This exposes your documentation to AI agents (ChatGPT, Claude, Cursor, etc.) as structured tools.
Available Tools
list-pages
Lists all documentation pages with titles, descriptions, paths, and content hashes.
Input: None
Output: Array of { title, path, description, contentHash, url }
Use case: AI agent needs to explore documentation structure or detect which pages changed.
get-page
Retrieves the full content of a specific documentation page.
Input: { path: string } — The page path (e.g., /docs/getting-started/quickstart)
Output: { title, path, description, content (raw markdown), contentHash, url }
Use case: AI agent needs the full text of a known page.
list-decisions
Lists all decision log / changelog entries with metadata and content hashes.
Input: None
Output: Array of { title, path, date, label, description, contentHash, url }
Use case: AI agent or mentorship system needs to review a founder's decision history.
get-decision
Retrieves the full markdown content of a specific decision entry.
Input: { path: string } — The decision path (e.g., /decisions/01.template-first-launch)
Output: { title, path, date, label, description, content (raw markdown), contentHash, url }
Use case: AI agent needs the full text of a specific strategic decision for review.
what-changed
Lightweight change detection tool for efficient remote polling.
Input: { since?: string } — Optional ISO 8601 timestamp. Only returns items modified after this date.
Output: { items: [{ path, collection, contentHash, modifiedAt }], total, since }
Use case: A centralized system polls this tool periodically, compares SHA-256 content hashes against stored values, and fetches only changed documents via get-page or get-decision. This avoids re-fetching all content on every poll.
list-pages, get-page, list-decisions, and get-decision cache for 1 hour. what-changed caches for 5 minutes.
Docs Page Header Links
The docs layout includes AI-friendly actions in each page's header dropdown:
- Copy Page — Full raw Markdown to clipboard
- Copy Link — Raw Markdown URL
- GPT — Opens ChatGPT with a prompt to read the page
- Claude — Opens Claude with a prompt to read the page
- Copy MCP Server URL — For adding to AI tool configuration
- Add MCP Server (Cursor) — Cursor deeplink to add the MCP server
nuxt-llms Integration
The foundry example also includes nuxt-llms which generates llms.txt and llms-full.txt files — a simpler alternative to MCP for AI consumption.
Configure sections in nuxt.config.ts:
llms: {
domain: 'https://yoursite.com',
title: 'Your Product',
description: 'What your product does.',
sections: [
{
title: 'Documentation',
description: 'Full docs',
contentCollection: 'docs',
},
],
}
See the nuxt-llms documentation for full options.
Enabling MCP
MCP toolkit is included in the layer by default. The tools are registered automatically from server/mcp/tools/. No additional configuration is needed.
To verify, visit /_mcp/tools in development to see registered tools.
Content Hashing
All MCP tools include a contentHash field — a SHA-256 digest of the raw markdown content. This enables remote systems to efficiently detect changes without re-fetching full content:
- Poll
what-changedto get all paths + hashes - Compare hashes against previously stored values
- Fetch only changed documents via
get-pageorget-decision
Hashes are computed from the raw markdown body, not filesystem metadata, so they reflect actual content changes regardless of deployment timestamps.
Auto-Registration
When NUXT_FOUNDRY_REGISTER=true is set in production, the Foundry layer sends a one-time registration to the Incubrain mentorship network on server startup. The payload includes your site URL, MCP endpoint, and available RSS feeds. This enables mentors to automatically discover and poll your site.
See Environment Variables for configuration details.