An MCP server for your Strapi CMS
This is a TypeScript-based MCP server that integrates with Strapi CMS. It provides access to Strapi content types and entries through the MCP protocol, allowing you to:
strapi://content-type/
URIslist_content_types
- List all available content types in Strapiget_entries
- Get entries for a specific content type with optional filtering, pagination, sorting, and population of relationsget_entry
- Get a specific entry by IDcreate_entry
- Create a new entry for a content typeupdate_entry
- Update an existing entrydelete_entry
- Delete an entryupload_media
- Upload a media file to StrapiThe get_entries
tool supports advanced query options:
{
"contentType": "api::article.article",
"filters": {
"title": {
"$contains": "hello"
}
},
"pagination": {
"page": 1,
"pageSize": 10
},
"sort": ["title:asc", "createdAt:desc"],
"populate": ["author", "categories"]
}
Resources can be accessed with various URI formats:
strapi://content-type/api::article.article
- Get all articlesstrapi://content-type/api::article.article/1
- Get article with ID 1strapi://content-type/api::article.article?filters={"title":{"$contains":"hello"}}
- Get filtered articlesInstall dependencies:
npm install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
For detailed step-by-step instructions on how to deploy and test this MCP server, please see the DEPLOYMENT.md file.
Quick setup:
npm run build
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"strapi-mcp": {
"command": "/path/to/strapi-mcp/build/index.js",
"env": {
"STRAPI_URL": "http://localhost:1337",
"STRAPI_API_TOKEN": "your-api-token-here",
"STRAPI_DEV_MODE": "false"
}
}
}
}
STRAPI_URL
(optional): The URL of your Strapi instance (defaults to http://localhost:1337)STRAPI_API_TOKEN
(required): Your Strapi API token for authenticationSTRAPI_DEV_MODE
(optional): Set to "true" to enable development mode features (defaults to false)Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
Once the MCP server is configured and running, you can use it with Claude to interact with your Strapi CMS. Here are some examples:
use_mcp_tool(
server_name: "strapi-mcp",
tool_name: "list_content_types",
arguments: {}
)
use_mcp_tool(
server_name: "strapi-mcp",
tool_name: "get_entries",
arguments: {
"contentType": "api::article.article",
"filters": {
"title": {
"$contains": "hello"
}
},
"pagination": {
"page": 1,
"pageSize": 10
},
"sort": ["title:asc"]
}
)
use_mcp_tool(
server_name: "strapi-mcp",
tool_name: "create_entry",
arguments: {
"contentType": "api::article.article",
"data": {
"title": "My New Article",
"content": "This is the content of my article.",
"publishedAt": "2023-01-01T00:00:00.000Z"
}
}
)
use_mcp_tool(
server_name: "strapi-mcp",
tool_name: "upload_media",
arguments: {
"fileData": "base64-encoded-data-here",
"fileName": "image.jpg",
"fileType": "image/jpeg"
}
)
access_mcp_resource(
server_name: "strapi-mcp",
uri: "strapi://content-type/api::article.article"
)
Seamless access to top MCP servers powering the future of AI integration.