The MCP server

View Source

Everything you can do in the admin, an agent can do over MCP. Wraith.Tools is one registry — posts, pages, revisions, publishing and scheduling, newsletters, tags, authors, members, comments, Lua widgets (docs, test, save, versions, rollback, live state), uploads, settings, themes, redirects, API keys, export/import, search — served as an MCP server (Streamable HTTP, JSON) at POST /mcp, and as the studio agent's tool server over the bridge.

Create a key at /admin/integrations and point any client at it:

{"mcpServers": {"wraith": {"url": "https://your-site/mcp",
                            "headers": {"Authorization": "Bearer <key>"}}}}
kiro-cli mcp add --name wraith --url https://your-site/mcp --header "Authorization: Bearer <key>"

An Admin key gets every tool; a Content key only site_info, posts_list, post_get, search, tags_list and widget_docs, and those see only published posts with the paywall applied. Destructive tools carry destructiveHint. resources/list exposes the settings, the widget guide and every post as wraith://posts/<slug> (published ones only for a Content key). The test test/wraith_web/mcp_test.exs drives the whole site lifecycle through the endpoint and checks the catalogue against the admin's actions.