TypeScript headless CMS and application framework.
## Payload CMS MCP Server: TypeScript-First Headless CMS The **Payload CMS MCP Server** integrates Payload CMS into Google Antigravity, enabling code-first content management with TypeScript types, access control, and self-hosting directly from your development environment. ### Why Payload CMS MCP? - **TypeScript Native**: Full type safety from schema to API - **Self-Hosted**: Complete control with no vendor lock-in - **Access Control**: Powerful field-level access control - **Versions & Drafts**: Built-in versioning and draft system - **Local API**: Direct database access without HTTP overhead ### Key Features #### 1. Collection Queries ```python # Find documents posts = await mcp.find( collection="posts", where={"status": {"equals": "published"}}, sort="-publishedAt", limit=10, depth=2 # Populate relationships ) for post in posts["docs"]: print(f"Post: {post['title']}") # Find by ID post = await mcp.find_by_id( collection="posts", id="post_123", depth=1 ) ``` #### 2. CRUD Operations ```python # Create document post = await mcp.create( collection="posts", data={ "title": "New Post", "content": [...], # Rich text content "author": "author_123", "_status": "draft" } ) # Update document await mcp.update( collection="posts", id=post["id"], data={"_status": "published"} ) # Delete document await mcp.delete(collection="posts", id="post_123") ``` #### 3. Media Operations ```python # Upload media media = await mcp.upload_media( collection="media", file_path="./images/cover.jpg", data={ "alt": "Cover image", "caption": "Article cover" } ) # Get media with sizes media = await mcp.find_by_id( collection="media", id=media["id"] ) print(f"Thumbnail: {media['sizes']['thumbnail']['url']}") ``` #### 4. Global Operations ```python # Get global settings = await mcp.find_global(slug="site-settings") print(f"Site Name: {settings['siteName']}") # Update global await mcp.update_global( slug="site-settings", data={"maintenanceMode": True} ) ``` ### Configuration ```json { "mcpServers": { "payload": { "command": "npx", "args": ["-y", "@anthropic/mcp-payload"], "env": { "PAYLOAD_API_URL": "https://your-payload-app.com/api", "PAYLOAD_API_KEY": "your-api-key" } } } } ``` ### Use Cases **TypeScript Projects**: Build content-driven apps with end-to-end type safety. **SaaS Applications**: Power multi-tenant SaaS with custom schemas. **E-commerce**: Manage products with complex variant structures. **Internal Tools**: Build admin dashboards with granular permissions. The Payload CMS MCP enables TypeScript-first content management within your development environment.
{
"mcpServers": {
"payload": {}
}
}