Provides full access to Strapi 5.x CMS, enabling AI agents to manage content types, entries, media, and schemas through CRUD operations, relation management, and media uploads.
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., "@Strapi MCP Serverlist the latest 5 entries from the blog collection"
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.
Strapi MCP Server (Strapi 5.x Only)
An MCP server for Strapi 5.x CMS that gives AI agents full access to content types, entries, media, and schema management through the Model Context Protocol.
Features
Full CRUD on collection types and single types
Media uploads — base64 or local file path
Relation management — connect/disconnect related entries
Schema management — create, update, delete content types and components (dev mode)
Per-request auth — override server-level credentials with a JWT or API token per tool call
Structured audit logging — JSON audit trail for all write operations
Request correlation — optional
requestIdfor multi-agent tracingInput validation — content type UIDs, entry IDs, file paths validated against injection (OWASP MCP02)
Structured logging —
LOG_LEVELenv var controls verbosity (error/warn/info/debug)Dev-mode gating — schema management tools hidden unless
STRAPI_DEV_MODE=true(20 tools in production, 25 in dev)TTL-based cache — content types cached with configurable
STRAPI_CACHE_TTL
Quick Start
1. Install
Or from source:
2. Configure
Create a .env file (add to .gitignore):
3. Add to your MCP client
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%/Claude/claude_desktop_config.json on Windows):
Cursor (~/.cursor/mcp.json):
If installed from source, replace "npx" / ["mcp-strapi"] with "node" / ["/path/to/mcp-strapi/build/index.js"].
Alternative — run directly:
Environment Variables
Variable | Required | Default | Description |
| No |
| Strapi instance URL |
| Recommended | — | Admin email for full functionality |
| Recommended | — | Admin password |
| No | — | API token fallback (limited permissions) |
| No |
| Enable schema management tools |
| No |
| Log verbosity: |
| No |
| Content type cache TTL in milliseconds (5 min) |
Authentication Priority
Per request: authToken > admin JWT > API token
Admin credentials are recommended for full functionality (schema access, publish/unpublish, content type management).
Tools
All 20 production tools accept an optional authToken parameter for per-request auth override.
Content (Collection Types)
Tool | Description |
| List all content types with |
| Get entries with filtering, pagination, sorting, population |
| Get a specific entry by ID |
| Create a new entry |
| Update an existing entry |
| Delete an entry |
| Publish an entry (admin required) |
| Unpublish an entry (admin required) |
Content (Single Types)
Tool | Description |
| Get a single type entry (e.g., homepage, site-settings) |
| Update a single type entry |
| Delete a single type entry |
| Publish a single type (admin required) |
| Unpublish a single type (admin required) |
Media
Tool | Description |
| Upload a file via base64 (max ~750KB file / 1MB base64) |
| Upload from local file path (max 10MB) |
Schema & Relations
Tool | Description |
| Get schema (fields, types, relations) |
| Connect related entries to a relation field |
| Disconnect related entries from a relation field |
| List all Strapi components |
| Get a component's schema |
Dev Mode Only (STRAPI_DEV_MODE=true)
Tool | Description |
| Create a new content type (admin required) |
| Update a content type's attributes (admin required) |
| Delete a content type (admin required) |
| Create a new component (admin required) |
| Update a component (admin required) |
Usage Examples
List content types
Get entries with filtering and pagination
Create an entry
Per-request auth token
Override server credentials with a role-specific JWT or API token:
Use cases:
Operate as a specific role (admin / author / reader)
Different content types need different permission levels
Test access with a scoped API token
Single type operations
Upload media
Base64 (small files):
File path (recommended for larger files):
Connect/disconnect relations
Create a content type (dev mode)
Request correlation ID
Pass a requestId to trace requests across multi-agent systems. It appears in audit log entries:
Enterprise Features
Audit Logging
All write operations emit structured JSON audit events to stderr:
Fields: timestamp, action, contentType, entryId, authMethod (authToken | adminJwt | apiToken | none), status (success | error), requestId, error.
Audit events are always emitted regardless of LOG_LEVEL.
Request Correlation IDs
Every tool accepts an optional requestId parameter. When provided, the ID is included in all audit log entries for that request, enabling end-to-end tracing in multi-agent deployments.
Content Type Caching
Content types are cached with a configurable TTL (default: 5 minutes). Set STRAPI_CACHE_TTL in milliseconds to adjust. The cache is automatically invalidated when schema management tools modify content types.
Security
No token logging — tokens never appear in logs (OWASP MCP01)
Input validation — regex validation for content type UIDs, entry IDs, component UIDs, file paths (OWASP MCP02)
Sanitized errors — raw Strapi error details only logged at debug level
Dev-mode gating — destructive schema tools hidden in production
Resource URIs
Content types are exposed as MCP resources:
strapi://content-type/api::article.article— all articlesstrapi://content-type/api::article.article/1— article with ID 1strapi://content-type/api::article.article?filters={"title":{"$contains":"hello"}}— filtered
Troubleshooting
Placeholder API Token Error
Replace "strapi_token" or "your-api-token-here" with a real API token from Strapi admin > Settings > API Tokens.
Connection Refused
Ensure Strapi is running (npm run develop), the URL is correct, and the database is up.
Authentication Failed
Verify admin email/password or API token permissions. Ensure the admin user is active.
Context Window Overflow with Uploads
Use upload_media_from_path instead of upload_media for files larger than ~500KB. The base64 tool has a 1MB limit (~750KB file).
Permission Errors (403)
Use admin credentials for full access. If using an API token, ensure it has "Full access" permissions.
Debugging
Opens the MCP Inspector for debugging tool calls in your browser.
Development
For deployment details, see DEPLOYMENT.md.
License
MIT