Strapi MCP Server
The Strapi MCP Server acts as a standardized interface for AI assistants to interact with Strapi CMS instances, enabling seamless content management and REST API operations.
Schema Introspection: Retrieve and analyze schemas of all content types and components
REST API Operations: Perform CRUD operations (GET, POST, PUT, DELETE) with built-in validation
Data Manipulation: Filter, sort, paginate, and populate data using REST API parameters
Media Upload: Upload files with format conversion, quality control, and metadata management
Content Type Management: List and manage content types with pagination support
Version Compatibility: Automatically handle differences between Strapi v4 and v5
Security Features: Implement strict write protection policies requiring explicit authorization
Multiple Server Support: Configure and manage multiple Strapi instances in one environment
Enables interaction with a Strapi CMS instance through its REST API, supporting content types management, media uploads, schema introspection, and CRUD operations with version compatibility for both Strapi v4 and v5.
Click on "Deploy 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 Server list all articles from the blog server"
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
A Model Context Protocol server for interacting with Strapi CMS. This server enables AI assistants to interact with your Strapi instance through a standardized interface, supporting content types and REST API operations.
โ ๏ธ IMPORTANT DISCLAIMER: This software has been developed with the assistance of AI technology. It is provided as-is and should NOT be used in production environments without thorough testing and validation. The code may contain errors, security vulnerabilities, or unexpected behavior. Use at your own risk for research, learning, or development purposes only.
Changelog
Version 2.6.0 - Enhanced Validation & Debugging Update
๐ง Implemented structured error handling with McpError and ErrorCode
โ Added comprehensive Zod validation for runtime type safety
๐ Integrated comprehensive logging system with request tracking
๐ Added debug mode configuration with environment variables
๐งน Removed unused prompt handlers for cleaner codebase
โฌ๏ธ Updated all dependencies to latest versions
๐ Added DEBUGGING.md guide for development workflow
๐ก๏ธ Enhanced security with better input validation
๐ Improved developer experience with detailed error messages
For complete version history, see CHANGELOG.md.
Related MCP server: Directus MCP Server
Features
๐ Schema introspection
๐ REST API support with validation
๐ธ Media upload handling
๐ JWT authentication
๐ Content type management
๐ผ๏ธ Image processing with format conversion
๐ Multiple server support
โ Automatic schema validation
๐ Write protection policy
๐ Integrated documentation
๐ Version compatibility management
Installation
You can use this server directly with npx in your Claude Desktop configuration:
{
"mcpServers": {
"strapi": {
"command": "npx",
"args": ["-y", "@bschauer/strapi-mcp-server@2.6.0"]
}
}
}Configuration
Create a configuration file at ~/.mcp/strapi-mcp-server.config.json:
{
"myserver": {
"api_url": "http://localhost:1337",
"api_key": "your-jwt-token-from-strapi-admin",
"version": "5.*" // Optional: Specify Strapi version (e.g., "5.*", "4.1.5", "v4")
}
}You can configure multiple Strapi instances by adding them to this file.
Version Configuration
The server now supports various version formats:
Wildcard: "5.", "4."
Specific: "4.1.5", "5.0.0"
Simple: "v4", "v5"
This helps the server provide version-specific guidance and handle API differences appropriately.
Getting a JWT Token
Log in to your Strapi admin panel
Create an API token with appropriate permissions
Add the token to your config file under the appropriate server name
Usage
List Available Servers
strapi_list_servers();
// Now includes version information and differences between v4 and v5Content Types
// Get all content types from a specific server
strapi_get_content_types({
server: "myserver",
});
// Get components with pagination
strapi_get_components({
server: "myserver",
page: 1,
pageSize: 25,
});REST API
The REST API provides comprehensive CRUD operations with built-in validation and version-specific handling:
// Query content with filters
strapi_rest({
server: "myserver",
endpoint: "api/articles",
method: "GET",
params: {
filters: {
title: {
$contains: "search term",
},
},
},
});
// Create new content
strapi_rest({
server: "myserver",
endpoint: "api/articles",
method: "POST",
body: {
data: {
title: "New Article",
content: "Article content",
category: "news",
},
},
});
// Update content
strapi_rest({
server: "myserver",
endpoint: "api/articles/123",
method: "PUT",
body: {
data: {
title: "Updated Title",
content: "Updated content",
},
},
});
// Delete content
strapi_rest({
server: "myserver",
endpoint: "api/articles/123",
method: "DELETE",
});Media Upload
// Upload image with automatic optimization
strapi_upload_media({
server: "myserver",
url: "https://example.com/image.jpg",
format: "webp",
quality: 80,
metadata: {
name: "My Image",
caption: "Image Caption",
alternativeText: "Alt Text",
},
});Version Differences (v4 vs v5)
Key differences between Strapi versions that the server handles automatically:
v4
Uses numeric IDs
Nested attribute structure
Data wrapper in responses
Traditional REST patterns
External i18n plugin
v5
Document-based IDs
Flat data structure
Direct attribute access
Enhanced JWT security
Integrated i18n support
New Document Service API
Security Features
Write Protection Policy
The server implements a strict write protection policy:
All write operations require explicit authorization
Protected operations include:
POST (Create)
PUT (Update)
DELETE
Media Upload
Each operation is logged and validated
Best Practices
Always check schema first with
strapi_get_content_typesUse proper plural/singular forms for endpoints
Include error handling in your queries
Validate URLs before upload
Start with minimal queries and add population only when needed
Always include the complete data object when updating
Use filters to optimize query performance
Leverage built-in schema validation
Check version compatibility for your operations
Follow the write protection policy guidelines
REST API Tips
Filtering
// Filter by field value
params: {
filters: {
title: "Exact Match";
}
}
// Contains filter
params: {
filters: {
title: {
$contains: "partial";
}
}
}
// Multiple conditions
params: {
filters: {
$and: [{ category: "news" }, { published: true }];
}
}Sorting
params: {
sort: ["createdAt:desc"];
}Pagination
params: {
pagination: {
page: 1,
pageSize: 25
}
}Population
// Basic request without population
params: {
}
// Selective population when needed
params: {
populate: ["category"];
}
// Detailed population with field selection
params: {
populate: {
category: {
fields: ["name", "slug"];
}
}
}Troubleshooting
Common issues and solutions:
404 Errors
Check endpoint plural/singular form
Verify content type exists
Ensure correct API URL
Check if using correct ID format (numeric vs document-based)
Authentication Issues
Verify JWT token is valid
Check token permissions
Ensure token hasn't expired
Version-Related Issues
Verify version specification in config
Check data structure matches version
Review version differences documentation
Write Protection Errors
Ensure operation is authorized
Check if operation is protected
Verify request follows security policy
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
Available Tools
5 toolsstrapi_get_componentsA
Get all components from Strapi with pagination support. Returns both component data and pagination metadata (page, pageSize, total, pageCount).
Inputs: server (required), page, pageSize.
strapi_get_content_typesB
Get all content types from Strapi. Returns the complete schema of all content types.
Initialization Steps (ALWAYS DO FIRST)
Get schema and analyze with this tool
Capture Content Types and structures
Remember endpoint names (pluralName/singularName)
Document fields and types
Identify relations
Consider required fields and validations
Schema Conventions
singularName: Used for single item queries (e.g., "article")
pluralName: Used for collection endpoints (e.g., "articles")
collectionName: Database collection name
Endpoint Patterns
Collection: GET /api/{pluralName}
Single: GET /api/{pluralName}/{id}
Create: POST /api/{pluralName}
Update: PUT /api/{pluralName}/{id}
Delete: DELETE /api/{pluralName}/{id}
Inputs: server (required).
strapi_list_serversC
List all available Strapi servers from the configuration.
Security Policy
STRICT_USER_AUTHORIZATION_REQUIRED: No write operations without explicit user authorization. Protected operations: POST (Create), PUT (Update), DELETE (Delete), Media Upload. All write operations require userAuthorized: true parameter.
Strapi Version Support
Supports both Strapi v4 and v5 with automatic version detection.
Version Differences
v4: Numeric IDs, nested attributes under 'attributes', data wrapper in responses
v5: Document-based IDs (documentId), flat structure, direct attribute access
Common Errors
404: Using numeric ID instead of documentId, wrong plural/singular form
405: Incorrect endpoint (/article instead of /articles)
400: Missing data wrapper in request body
Best Practices
Always check schema first with strapi_get_content_types
Use documentId (not numeric id) for Strapi v5
Always use data wrapper for updates: { data: { field: value } }
Use pluralName for collection endpoints (api/articles)
Validate URLs with webtools before using them
Inputs: no named parameters.
strapi_restA
Execute REST API requests against Strapi endpoints. IMPORTANT: All write operations (POST, PUT, DELETE) require explicit user authorization via the userAuthorized parameter.
Reading Data
params: { populate: ['SEO'] } // Populate a component params: { populate: { SEO: { fields: ['Title', 'seoDescription'] } } } // With field selection params: { filters: { title: { $contains: 'search' } } } // Filter results params: { sort: ['createdAt:desc'] } // Sort results params: { pagination: { page: 1, pageSize: 10 } } // Pagination
Writing Data (REQUIRES userAuthorized: true)
body: { data: { componentName: { Title: 'value' }, // Single component componentName: [{ field: 'value' }] // Repeatable component } }
Debugging Guide
404 Error: Check plural/singular form, use documentId not numeric id
400 Error: Check if data wrapper is present in body
405 Error: Check endpoint format (/articles not /article)
URL Errors: Validate URLs with webtools first
ID Problems: Use documentId for Strapi v5
Strapi v5 Specifics
Use documentId instead of numeric id
Direct attribute access (no nested attributes)
No data wrapper in GET responses
Inputs: server (required), endpoint (required), body, method, +2 more.
strapi_upload_mediaA
Upload media to Strapi's media library from a URL with format conversion, quality control, and metadata options. IMPORTANT: This is a write operation that REQUIRES explicit user authorization via the userAuthorized parameter.
Upload Steps
Upload via strapi_upload_media with URL and metadata
Get image ID from response
Link to content using strapi_rest PUT request
Linking Images to Content (Strapi v5)
After upload, use PUT request to link: { "method": "PUT", "endpoint": "api/articles/{documentId}", "body": { "data": { "images": ["imageId"] } }, "userAuthorized": true }
Inputs: url (required), server (required), format, quality, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 5 tools
Each tool targets a distinct function: schema introspection (components vs content types), server listing, generic REST execution, and media upload. No overlap in purposes.
Tools follow a strapi_verb_noun pattern mostly (get_components, get_content_types, list_servers, upload_media), but 'strapi_rest' deviates by using an acronym instead of a verb. Overall consistent.
5 tools is well-scoped for a Strapi MCP server, covering schema discovery, generic API access, media upload, and server management without superfluous tools.
The tool set provides schema introspection and a generic REST tool for all CRUD operations, plus media upload. Minor gap: no dedicated tool for content entry listing, but the REST tool covers it with schema guidance.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoโฆ
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
The Telnyx MCP server is an official implementation of the Model Context Protocol that enables AI clients (like Claude Desktop, Cursor, and OpenAI Agents) to interact with Telnyx's telephony, messaging, and AI assistant APIs. It provides comprehensive capabilities including making and managing phone calls, sending SMS/MMS messages, purchasing and configuring phone numbers, creating AI assistants with custom instructions, managing cloud storage buckets, scraping and embedding website content, and handling integration secrets. The server exists as both a local implementation and a remotely hosted version, allowing developers to integrate real-world communication infrastructure directly into AI applications.
Related MCP Servers
- AlicenseAqualityFmaintenanceA Model Context Protocol server that enables AI assistants to interact with Confluence content, supporting operations like retrieving, searching, creating, and updating pages and spaces.98 npm12MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that allows AI tools to connect to and interact with your Directus API, enabling automated access to collections, items, and user data.17 npm27MIT
- AlicenseNot gradedqualityDmaintenanceA server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.10 npm12MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides AI models with structured access to external data and services, acting as a bridge between AI assistants and applications, databases, and APIs in a standardized, secure way.2-