Headless CMS and web application platform.
## KeystoneJS MCP Server: Headless CMS Framework The **KeystoneJS MCP Server** integrates KeystoneJS into Google Antigravity, enabling schema-based content management with auto-generated GraphQL APIs, admin UI, and database flexibility directly from your development environment. ### Why KeystoneJS MCP? - **Code-First Schema**: Define content models in TypeScript/JavaScript - **Auto GraphQL**: Instant GraphQL API from schema definitions - **Database Flexible**: Support for PostgreSQL, MySQL, and SQLite - **Built-in Admin**: Beautiful admin UI generated automatically - **Access Control**: Granular field-level permissions ### Key Features #### 1. GraphQL Queries ```python # Query items result = await mcp.query(""" query GetPosts { posts( where: { status: { equals: "published" } } orderBy: { publishedAt: desc } take: 10 ) { id title slug content { document } author { name } } } """) for post in result["posts"]: print(f"Post: {post['title']}") ``` #### 2. Mutations ```python # Create item result = await mcp.mutate(""" mutation CreatePost($data: PostCreateInput!) { createPost(data: $data) { id title slug } } """, variables={ "data": { "title": "New Post", "slug": "new-post", "content": {"document": [...]}, "author": {"connect": {"id": "author_id"}} } }) # Update item await mcp.mutate(""" mutation UpdatePost($id: ID!, $data: PostUpdateInput!) { updatePost(where: { id: $id }, data: $data) { id status } } """, variables={ "id": result["createPost"]["id"], "data": {"status": "published"} }) ``` #### 3. Relationship Queries ```python # Query with relationships result = await mcp.query(""" query GetAuthorWithPosts($id: ID!) { author(where: { id: $id }) { name email posts { id title publishedAt } postsCount } } """, variables={"id": "author_123"}) ``` #### 4. File Operations ```python # Upload file file = await mcp.upload_file( file_path="./images/cover.jpg", field="featuredImage" ) # Use in mutation await mcp.mutate(""" mutation UpdatePostImage($id: ID!, $fileId: ID!) { updatePost( where: { id: $id } data: { featuredImage: { connect: { id: $fileId } } } ) { id } } """, variables={"id": post_id, "fileId": file["id"]}) ``` ### Configuration ```json { "mcpServers": { "keystonejs": { "command": "npx", "args": ["-y", "@anthropic/mcp-keystone"], "env": { "KEYSTONE_URL": "https://your-keystone-app.com", "KEYSTONE_API_KEY": "your-api-key" } } } } ``` ### Use Cases **Custom Applications**: Build content-driven apps with custom schemas. **SaaS Backends**: Power SaaS applications with multi-tenant content. **E-commerce**: Manage product catalogs with complex relationships. **Startups**: Quickly build MVPs with full-featured content management. The KeystoneJS MCP enables schema-based content management within your development environment.
{
"mcpServers": {
"keystonejs": {}
}
}