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.
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.
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:
Configuration
Create a configuration file at ~/.mcp/strapi-mcp-server.config.json
:
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
Content Types
REST API
The REST API provides comprehensive CRUD operations with built-in validation and version-specific handling:
Media Upload
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_types
- Use 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
Sorting
Pagination
Population
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
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A Model Context Protocol server that enables AI assistants to interact with Strapi CMS instances through a standardized interface, supporting content types and REST API operations.
- Changelog
- Features
- Installation
- Configuration
- Usage
- Version Differences (v4 vs v5)
- Security Features
- Best Practices
- REST API Tips
- Troubleshooting
- Contributing
- License
Related Resources
Related MCP Servers
- -securityFlicense-qualityA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.Last updated -31TypeScript
- AsecurityFlicenseAqualityA Model Context Protocol server that enables AI assistants to interact with the Omi API for retrieving and creating conversations and memories for users.Last updated -42TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol server enabling AI assistants to scrape web content with high accuracy and flexibility, supporting multiple scraping modes and content formatting options.Last updated -46162TypeScriptMIT License
- -securityFlicense-qualityA 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.Last updated -2Python