- Home
- MCP servers
- Strapi
Strapi
- javascript
0
GitHub Stars
javascript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"adityarapid-strapi_mcp": {
"command": "npx",
"args": [
"-y",
"strapi-mcp-server@2.6.0"
],
"env": {
"STRAPI_API_KEY": "your-jwt-token-from-strapi-admin",
"STRAPI_API_URL": "http://localhost:1337",
"STRAPI_VERSION": "5.*",
"STRAPI_SERVER_NAME": "default"
}
}
}
}You can use the Strapi MCP Server to interact with your Strapi CMS through a consistent, model-aware interface. It lets AI assistants perform content-type aware operations, REST API interactions, media handling, and version-aware requests across Strapi v4 and v5.
How to use
You use this MCP server by running it as a local or remote service and then connecting your MCP client to it. The server exposes a set of tools you can call to inspect Strapi content types, fetch components, and perform CRUD operations against the Strapi REST API. Use it to query data, create or update content, upload media, and navigate content structures with version-aware behavior for Strapi v4 and v5.
How to install
Prerequisites: you need Node.js and npm available on your machine. Ensure you have access to an environment where you can run MCP configurations and connect to your Strapi instance.
Install and run the Strapi MCP Server using the provided MCP command snippet.
Configuration and usage notes
Configuration supports two methods: environment variables (recommended for deployment) or a configuration file. The server expects a Strapi instance URL and an API token acquired from Strapi. You can optionally specify the Strapi version you target.
Environment variables to set when running the server:
Example installation snippet
{
"mcpServers": {
"strapi": {
"command": "npx",
"args": ["-y", "strapi-mcp-server@2.6.0"]
}
}
}
Configuration options
Option 1: Environment Variables (Recommended for Deployment). Set these variables in your runtime environment.
STRAPI_API_URL=http://localhost:1337 STRAPI_API_KEY=your-jwt-token-from-strapi-admin STRAPI_SERVER_NAME=default # Defaults to 'default' STRAPI_VERSION=5.* # e.g., "5.*", "4.1.5", "v4"
Option 2: Configuration File. Create a config at ~/.mcp/strapi-mcp-server.config.json with entries for each Strapi instance.
Example config file content:
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
Content you can manage with the MCP server
- List available content types and components from your Strapi instance
- Retrieve, create, update, or delete content via REST API calls
- Upload and process media with optional format conversion
- Work with version-aware endpoints and data structures for v4 and v5
Security and best practices
The server supports a write-protection policy that requires explicit authorization for write operations (POST, PUT, DELETE, and media uploads). Each operation is logged and validated to help you monitor changes and maintain security.
REST API tips
Use filters, sorting, pagination, and selective population to optimize queries and control the data you fetch.
Troubleshooting
Common issues include authentication problems (invalid or expired tokens), version-specific data structure mismatches, and write-protection violations. Verify your token, confirm the configured Strapi version, and ensure you follow the write-protection policy for write operations.
Notes on usage across Strapi versions
The MCP server handles v4 and v5 differences, including ID formats, data structure, and endpoint behavior, so you can work against the correct model expectations for your Strapi instance.
Available tools
strapi_list_servers
List available Strapi MCP servers with version info and differences between v4 and v5.
strapi_get_content_types
Fetch all content types from a specified server to understand available structures.
strapi_get_components
Retrieve component definitions with pagination support.
strapi_rest
Perform REST API operations (GET, POST, PUT, DELETE) against Strapi endpoints with validation and version-aware handling.
strapi_upload_media
Upload and process media assets with optional format conversion and metadata.