Foundry logo Foundry MCP server

Enabling the server

MCP is disabled unless it is explicitly enabled in content/config/site.yaml:

mcp:
  enabled: true
  read_only: true
  audit: false
  max_concurrency: 16
  rate_limit:
    requests_per_minute: 600
    burst: 120
  scopes:
    - read:content
    - read:docs
    - read:themes
    - read:plugins
    - read:ops

The initial release is read-only. When scopes is omitted, every read scope is enabled and every mutating scope stays disabled. read_only defaults to true; setting it to false is reserved for future mutating capabilities and does not by itself grant write access. max_concurrency defaults to 16 in-flight requests, and rate_limit defaults to 600 requests per minute with a 120 request burst.

Running the server

foundry mcp serve --transport stdio

In stdio mode the process speaks newline-delimited JSON-RPC on stdout and writes logs and diagnostics to stderr. It exits cleanly when the client closes stdin. Startup banners never touch stdout, so the protocol stream stays clean.

Configuring a client

Point any MCP-compatible client at the Foundry binary. Run it from the project root (or set cwd) so Foundry loads the normal configuration and content.

{
  "mcpServers": {
    "foundry": {
      "command": "foundry",
      "args": ["mcp", "serve", "--transport", "stdio"],
      "cwd": "/path/to/foundry-project"
    }
  }
}

Capability catalog

All capabilities are read-only in the initial release and are namespaced and versioned.

Tools

Tool Scope Purpose
search_contentread:contentRanked search across content.
list_documentsread:contentList content with type, language, and status filters.
get_documentread:contentFetch a single document by slug, URL, or id.
get_navigationread:contentRead navigation menus and the published page index.
get_project_documentationread:docsList or read project documentation files.
get_api_documentationread:docsRead the API documentation definition.
get_theme_manifestread:themesRead a theme manifest.
get_theme_security_reportread:themesRead the external asset and CSP report.
validate_themeread:themesValidate a theme without applying changes.
list_pluginsread:pluginsList installed plugins and their status.
get_plugin_statusread:pluginsRead a plugin health and diagnostics report.
get_runtime_healthread:opsRead runtime health and readiness.
validate_configurationread:opsValidate config, theme, and site graph.

Resource templates

URI template Scope
foundry://content/pages/{slug}read:content
foundry://content/collections/{type}read:content
foundry://themes/{name}/manifestread:themes
foundry://themes/{name}/security-reportread:themes
foundry://pluginsread:plugins
foundry://runtime/healthread:ops
foundry://docs/{path...}read:docs

Capability schemas and stable names

Every capability is registered with a stable name, a version, an input schema, an output schema, a read-only or mutating classification, a required scope, an optional owning plugin, an audit category, a timeout, a result-size limit, and a default-enabled state. Names are namespaced: core capabilities use plain snake_case names such as search_content, and plugin capabilities are prefixed with the plugin name, for example myplugin_reports.

Representative input schemas:

search_content
{
  "type": "object",
  "properties": {
    "query": { "type": "string" },
    "type": { "type": "string" },
    "lang": { "type": "string" },
    "limit": { "type": "integer" },
    "cursor": { "type": "string" }
  },
  "required": ["query"]
}

get_document
{
  "type": "object",
  "properties": {
    "slug": { "type": "string" },
    "url": { "type": "string" },
    "id": { "type": "string" }
  }
}

get_plugin_status
{
  "type": "object",
  "properties": { "name": { "type": "string" } },
  "required": ["name"]
}

Names and schemas are part of the public contract. Renaming a capability or removing a field is a breaking change; add a new version instead.

Plugin-provided capabilities

Plugin-provided MCP capabilities are planned after the core read-only contract is stable. The registry already reserves the namespace and governance hooks for them, and the intent is that a plugin capability must:

A plugin never gains filesystem, network, admin, or runtime privileges simply because it registers an MCP capability. Until plugin registration ships, only the core read-only capabilities in this guide are exposed.

Scopes and authorization

MCP scopes map onto existing Foundry capabilities. A scope that is not enabled is denied by default, and an authenticated actor must also hold a matching Foundry capability.

MCP scope Foundry capability
read:contentdocuments.read
read:docsdashboard.read
read:themesthemes.manage
read:pluginsplugins.manage
read:opsdashboard.read
write:contentdocuments.write
publish:contentdocuments.publish
manage:pluginsplugins.manage
manage:themesthemes.manage

Local process access is not the same as authenticated access. The stdio server runs as a local actor and only exposes the scopes enabled in configuration.

Redaction and limits

Disabling MCP

Remove the mcp block or set mcp.enabled to false. The foundry mcp serve command then refuses to start, and no MCP capabilities are exposed.

Protocol revision

Foundry pins MCP protocol revision 2026-07-28 and also accepts 2025-06-18 during initialization. The negotiated revision is reported in the initialize response.

Roadmap

Authenticated Streamable HTTP transport, mutating tools (with explicit opt-in, confirmation, idempotency, and before/after auditing), and plugin-provided capabilities are planned after the read-only contract is reviewed and tested.