static-mcpify pulls structured content from your CMS, builds it into static files, and serves them as a fully-featured Model Context Protocol server. Your AI agents get instant access to your content — no database, no runtime dependencies.
# Initialize your content structure
$ npx smcp init --output my-mcp
# Pull content and build static files
$ npx smcp build --output my-mcp
# Your MCP server is ready! 🚀
Everything you need to bridge your content with AI agents
Content is pre-built into static files. No database queries at runtime. Lightning fast responses for your AI agents.
Built with an adapter pattern. Contentful support out of the box, with room to add any content source you need.
Implements the Model Context Protocol with streamable HTTP transport. Works with any MCP-compatible AI client.
Tools are auto-generated from your content structure. List entries, get details, and access specific content fields.
Runs on any Node.js server, serverless functions, or edge runtime. First-class Netlify support included.
Full TypeScript codebase with Zod validation. Type-safe from config to runtime, with descriptive error messages.
Three simple steps from content to AI-accessible MCP server
Run smcp init to set up your output directory. Choose your content types and define which fields power each tool.
$ npx smcp init --output my-mcp
# Creates:
# my-mcp/config.json
# my-mcp/content/entries/<type>/config.json
# my-mcp/content/assets/
Run smcp build to pull content from your CMS and generate markdown files, data.json files, and download assets.
$ npx smcp build --output my-mcp
# Generates per entry:
# content/entries/person/bob-smith/data.json
# content/entries/person/bob-smith/tools/biography.md
# content/entries/person/bob-smith/tools/skills.md
The MCP server reads your static files and auto-generates tools. Connect any MCP client and start querying.
# Auto-generated MCP tools:
list_person # Filter & list people
get_person # Get person data.json
get_person_biography # Get biography markdown
get_person_skills # Get skills markdown
list_assets # List all assets
get_asset # Get asset info
my-mcp/
├── config.json # Source configuration
└── content/
├── assets/ # Downloaded assets
│ └── photo.png
└── entries/
├── person/
│ ├── config.json # Tools: biography, skills
│ ├── bob-smith/
│ │ ├── data.json # All non-rich-text fields
│ │ └── tools/
│ │ ├── biography.md # Rich text → Markdown
│ │ └── skills.md
│ └── steve-baker/
│ ├── data.json
│ └── tools/
│ ├── biography.md
│ └── skills.md
└── place/
├── config.json
└── work-site/
├── data.json
└── tools/
└── description.md
First-class integration with the Contentful CMS
Add your Contentful API token and Space ID to a .env file.
Run smcp init --output my-mcp. The CLI will connect to your Contentful space, show you all available content types, and let you pick which fields to expose as tools.
Run smcp build --output my-mcp. All entries are pulled, rich text fields converted to markdown, and assets downloaded.
Push to Netlify (or any server) and your MCP endpoint is live.
CONTENTFUL_API_TOKEN=nP...your_token...mo
SPACE_ID=1x...your_space...mb
{
"contentType": "blog",
"tools": [
{
"name": "summary",
"fields": ["summary", "tags"]
},
{
"name": "body",
"fields": ["body"]
}
]
}
Contentful rich text fields are automatically converted to clean Markdown for optimal AI consumption.
Referenced images and files are automatically downloaded to the local assets directory.
Use --content-type flags to rebuild only specific content types.
Serverless MCP endpoints in seconds
Configure your build and function settings. static-mcpify includes a ready-made configuration.
Each MCP endpoint is a Netlify function that serves content from your static files.
Connect your repo to Netlify and deploy. Your MCP server is live at /example/static/mcp.
[build]
publish = "brand"
[functions]
directory = "netlify/functions"
node_bundler = "esbuild"
[[redirects]]
from = "/example/static/mcp"
to = "/.netlify/functions/static-mcp"
status = 200
[[redirects]]
from = "/example/contentful/mcp"
to = "/.netlify/functions/contentful-mcp"
status = 200
import { createMcpServer } from 'static-mcpify';
// The server reads your content directory
// and auto-generates MCP tools
const server = createMcpServer(contentDir);
// Connect transport and handle requests
await server.connect(transport);
await transport.handleRequest(req, res, body);
Get started in under 5 minutes. Open source, free forever.