The Kapiti MCP Server enables AI assistants to interact comprehensively with the Headlesshost platform for complete content and site management.
Core System Operations: Test connectivity with ping/health checks, access system reference data, and utilize GPT Assistant for AI-powered tasks.
User & Account Management: Register users, perform full CRUD operations on accounts, manage roles/claims/permissions, upload profile images, and handle team management.
Content Site Administration: Create, list, update, and delete content sites with full lifecycle management. Access analytics including hit tracking, activity logs, daily hit data, and manage associated accounts and user claims.
Staging Site Management: Comprehensive staging operations including creation, updates, publishing, cloning, reverting, and deletion. Access detailed configurations, change logs, published versions, and manage permissions.
Page & Section Management: Full CRUD operations for pages within staging sites, including content updates and log access. Create, update, publish, revert, and delete sections with activity monitoring.
File Management: Upload files to staging sites and user profiles.
Advanced Features: AI-powered content generation, audience segmentation and targeting, content and product catalog management, style guide development, template creation and sharing, analytics and reporting, and business operations including invoicing, billing, and subscription management.
Provides billing integration capabilities including Stripe checkout processing and payment session management for business operations
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Kapiti MCP Servershow me the analytics for our main website this month"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Headlesshost MCP Server
A Model Context Protocol (MCP) server that provides complete communication with the Headlesshost platform API. This server enables AI assistants to manage content sites, staging sites, pages, sections, audiences, users, and file uploads through the Headlesshost platform.
Built with @modelcontextprotocol/sdk v1.26 and includes tool annotations, structured logging, and Zod input validation.
Demo
https://www.youtube.com/watch?v=xGGwcrI7gSo&feature=youtu.be
Installation
Clone this repository
Install dependencies:
npm installBuild the server:
npm run build
Configuration
The server requires a Headlesshost API key set via the HEADLESSHOST_API_KEY environment variable.
Usage
With Claude Desktop
Add this configuration to your Claude Desktop config file:
Local development
Via npx
With Claude Code
Add to your .claude/settings.json:
With Other MCP Clients
This server is compatible with any MCP client including VS Code, Zed Editor, Continue.dev, and custom MCP implementations.
Configure your client to use:
Command:
nodeArgs:
["/path/to/kapiti.mcp/build/index.js"]Environment: Set
HEADLESSHOST_API_KEY
Tools (53)
All tools include MCP annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) to help clients present appropriate UI and confirmation prompts.
General (3)
Tool | Description |
| Test authentication and connection |
| Check API health status |
| Get system reference data and lookups |
User Management (4)
Tool | Description |
| Create a new user in the current account |
| Get user details by ID |
| Update user information and claims |
| Delete a user from the system |
Account Management (3)
Tool | Description |
| Create a new user account |
| Get current account information |
| Update account information |
File Uploads (3)
Tool | Description |
| Upload a profile image for a user |
| Upload a file to a staging site |
| Upload an image to a staging site |
Content Sites (5)
Tool | Description |
| Create a new content site |
| Get all content sites in the account |
| Get content site details by ID |
| Update content site information |
| Delete a content site |
Staging Sites (9)
Tool | Description |
| Update staging site information |
| Delete a staging site |
| Publish a staging site to make it live |
| Get staging site details |
| Get staging site pages |
| Get staging site configuration including section types |
| Get change logs since last publish |
| Get published sites for a content site |
| Revert a staging site to a previous state |
| Clone a staging site |
Pages (6)
Tool | Description |
| Create a new page |
| Get page details (with optional sections) |
| Update a page |
| Delete a page |
| Revert a page to a previous state |
| Get page change logs since last publish |
Sections (7)
Tool | Description |
| Create a new section in a page |
| Get section details |
| Update a section |
| Delete a section |
| Publish a single section |
| Revert a section to a previous state |
| Get section change logs since last publish |
Site Audiences (4)
Tool | Description |
| Create an audience (locale/segment combination) for a site |
| Get audience details |
| Update an audience |
| Delete an audience (base audience cannot be deleted) |
Section Audiences (4)
Tool | Description |
| Create an audience override for a section |
| Get section audience details |
| Update a section audience override |
| Delete a section audience override |
Analytics (4)
Tool | Description |
| Get the last 15 activity logs |
| Get daily hit analytics |
| Get associated accounts |
| Get current user claims |
Resources
The server provides 2 resources for configuration and monitoring:
API Configuration (
config://api) — Available endpoints and current settingsAPI Health Status (
health://api) — Real-time connectivity and response time
Development
Build the server:
Run in development mode:
Watch for changes:
Run the MCP inspector for debugging:
Error Handling
The server includes structured error handling:
API authentication validation
Network connectivity checks
Structured logging via MCP logging capability (errors are sent to the client)
Graceful fallbacks for API timeouts
Security
API key authentication required for all operations
Secure environment variable handling
Input validation via Zod schemas on all tool inputs
Tool annotations signal destructive operations to clients