Home/Docs/AI & Vibe Coding
AI-Native & Vibe-Coder Hub

Vibe Coding with Murit CMS

Modern developers and vibe coders build fast using AI tools like Cursor, Windsurf, Claude Code, OpenCode, and Antigravity. Don't spend hours asking AI to scaffold custom Postgres tables, rich-text serializers, and image upload handlers. Give your AI our Content API spec and connect an enterprise-grade blog in 30 seconds.

1. The 30-Second Drop-In AI Prompt

Copy and paste this prompt into Cursor Composer, Windsurf Cascade, OpenCode, Claude, or ChatGPT. Your AI will generate the entire blog listing, dynamic article detail page, and sitemap in one shot:

Universal AI Integration Prompt
You are integrating a modern blog into this project using Murit CMS (a headless publishing platform).

Use these configuration environment variables:
- CMS_BASE_URL: Murit CMS origin (e.g. "http://127.0.0.1:3001" or production URL)
- CMS_SITE_KEY: Public website key (e.g. "site_your_site_key")

Public Content API v1 Endpoints:
1. List published posts:
   GET ${CMS_BASE_URL}/api/content/v1/sites/${CMS_SITE_KEY}/posts?limit=12
   Envelope: { data: [{ id, title, slug, excerpt, publishedAt, modifiedAt, featuredMedia, categories, tags, seo: { title, description, socialImage, canonicalURL, keywords } }], meta: { limit, nextCursor } }

2. Single post by slug:
   GET ${CMS_BASE_URL}/api/content/v1/sites/${CMS_SITE_KEY}/posts/${slug}
   Envelope: { data: { id, title, slug, excerpt, publishedAt, modifiedAt, featuredMedia, contentHtml, categories, tags, seo } }

3. Legacy & Astro Optimized Feed (for SSG or root-level blog migrations):
   GET ${CMS_BASE_URL}/api/content/v1/sites/${CMS_SITE_KEY}/legacy-posts
   Returns: { posts: [...] } envelope containing Astro-ready posts with preserved slugs, seoTitle/seoDescription, redirectUrls, and rich media fields (image, imageAlt, imageWidth, imageHeight).

4. Sitemap URLs:
   GET ${CMS_BASE_URL}/api/content/v1/sites/${CMS_SITE_KEY}/sitemap?limit=500
   Envelope: { data: [{ url, lastModified }], meta }

Requirements:
- Create the blog listing page and article detail page.
- In Next.js App Router, use /api/content/v1/sites/${CMS_SITE_KEY}/posts.
- In Astro 5 SSG, use /api/content/v1/sites/${CMS_SITE_KEY}/legacy-posts in getStaticPaths().
- CMS operators must deploy the registered 20260909_122610_legacy_redirects schema migration for legacy URL fields; frontend clients do not run CMS database migrations.
- Render post.contentHtml directly as it is sanitized server-side by the CMS.
- Set up caching with { next: { revalidate: 60 } } or stale-while-revalidate headers.
- Handle 404s gracefully if post is unpublished or missing.
- Add canonical SEO tags and OpenGraph image metadata.
- Create a sitemap generator that pulls from the /sitemap endpoint.

2. Machine-Readable Documentation: llms.txt

Murit CMS provides dedicated endpoints formatted specifically for Large Language Model context windows:

/llms.txt

A concise, markdown-formatted summary of Murit CMS, architecture rules, and endpoint contracts designed for system prompts and cursor rules.

/llms-full.txt

The complete API specification including all JSON request/response DTO schemas, TypeScript type definitions, and copy-paste Next.js/Astro templates.

Tip for Cursor & Windsurf: Add @https://your-cms-url/llms.txt directly into your chat or add it to your project's .cursorrules file to give the model immediate zero-shot awareness of your CMS.

3. Model Context Protocol (MCP) Server

Murit CMS includes a built-in stdio Model Context Protocol (MCP) server. This lets AI coding assistants like Claude Desktop, Cursor, and Antigravity call tools directly against your Murit CMS instance while you code.

verify_connectivity

Check connectivity to the Murit CMS server and verify the configured site key.

get_site_info

Retrieve public metadata and configuration for a registered Murit CMS website.

list_posts

List published post summaries with pagination and optional category/tag filters.

get_post_by_slug

Retrieve a single published post by slug, including full pre-rendered sanitized HTML.

get_sitemap

Fetch all published post URLs and last-modified dates for SEO sitemap generation.

get_legacy_posts

Fetch all published posts formatted as an Astro/flat legacy feed with preserved URLs, redirects, and rich HTML.

Add this configuration to your Claude Desktop config (claude_desktop_config.json), Cursor (.cursor/mcp.json), or OpenCode (opencode.json):

claude_desktop_config.json / .cursor/mcp.json / opencode.json
{
  "mcpServers": {
    "murit-cms": {
      "command": "npx",
      "args": ["-y", "tsx", "scripts/mcp-server.ts"],
      "env": {
        "CMS_BASE_URL": "http://127.0.0.1:3001",
        "CMS_SITE_KEY": "site_your_site_key"
      }
    }
  }
}

4. Agent System Rules (.cursorrules / CLAUDE.md / OPENCODE.md / AGENTS.md)

Drop these rules into your project's root directory as .cursorrules, CLAUDE.md, OPENCODE.md, or AGENTS.md. When you prompt your AI, it will automatically follow these rules without needing repeated instructions:

.cursorrules / CLAUDE.md / OPENCODE.md / AGENTS.md
# Murit CMS Agent Integration Rules
You are integrating or maintaining content features powered by Murit CMS.

## Configuration
- CMS Base URL: process.env.CMS_BASE_URL (or central instance origin)
- CMS Site Key: process.env.CMS_SITE_KEY (public site identifier, safe in client code)

## Endpoints
- List posts: GET ${CMS_BASE_URL}/api/content/v1/sites/${CMS_SITE_KEY}/posts?limit=12
- Single post: GET ${CMS_BASE_URL}/api/content/v1/sites/${CMS_SITE_KEY}/posts/${slug}
- Legacy / Astro posts: GET ${CMS_BASE_URL}/api/content/v1/sites/${CMS_SITE_KEY}/legacy-posts
- Sitemap: GET ${CMS_BASE_URL}/api/content/v1/sites/${CMS_SITE_KEY}/sitemap?limit=500
- OpenAPI 3.1 Spec: GET ${CMS_BASE_URL}/openapi.json
- LLM System Context: GET ${CMS_BASE_URL}/llms.txt

## Best Practices
1. Post content is sanitized server-side: render `post.contentHtml` directly with dangerouslySetInnerHTML or Astro set:html.
2. For Astro static generation, call `/legacy-posts` to map `getStaticPaths()` and preserve legacy URL structures and 301 redirects.
3. Never create custom database tables or migrations for editorial content; articles are authored in Murit CMS Payload Admin Console.
4. Content API responses provide HTTP caching: set `s-maxage=60, stale-while-revalidate=300` or Next.js `{ next: { revalidate: 60 } }`.