surajitkar/strapi-mcp-server
If you are the rightful owner of strapi-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A Model Context Protocol (MCP) server that provides CRUD functionalities for Strapi CMS.
Strapi MCP Server
A Model Context Protocol (MCP) server that provides CRUD functionalities for Strapi CMS.
Overview
This MCP server enables AI applications to interact with Strapi CMS through a standardized protocol, providing full CRUD (Create, Read, Update, Delete) operations for your Strapi content types.
Features
- Standards Compliant: Follows MCP 2025-06-18 specification
- Multi-Content Type Support: Works with any Strapi content type automatically
- Auto-Discovery: Automatically discovers available content types
- Full CRUD Operations: 7 tools for complete content management
- Flexible: Dynamic content type selection per operation
- Secure: Bearer token authentication
- Well Documented: Comprehensive error handling and logging
Available Tools
- list_content_types - Discover all available content types
- get_all_entities - Retrieve all items from any content type (parameterized)
- get_entity_by_id - Get specific item by ID from any content type (parameterized)
- create_entity - Create new items in any content type (parameterized)
- update_entity - Update existing items in any content type (parameterized)
- delete_entity - Remove items from any content type (parameterized)
- search_entities - Search through items in any content type (parameterized)
Multi-Content Type Support
Architecture Note:
The MCP server is designed so that each operation (CRUD/search/list) is implemented as a single, generic tool. The tool count remains fixed regardless of the number of content types. Each tool accepts a contentType parameter (and other relevant data), allowing it to operate on any discovered content type dynamically. This approach ensures scalability, maintainability, and flexibility.
Example Usage:
// Get all inventories
get_all_entities({ contentType: "inventories" })
// Get all articles
get_all_entities({ contentType: "articles" })
// Create a new user
create_entity({
contentType: "users",
data: { name: "John", email: "john@example.com" }
})
**Benefits:**
- Tool count remains fixed (one per operation)
- Adding new content types does not require new tools
- All tools are flexible and future-proof
Quick Start
Prerequisites
- Node.js 18+
- Running Strapi CMS instance
- Strapi API token
Installation
cd strapi-mcp-server
npm install
MCP Configuration
Use a sample mcp.json configuration:
{
"servers": {
"strapi-cms-server": {
"command": "node",
"args": ["strapi-mcp-server/strapi-mcp-server.js"],
"env": {
"STRAPI_URL": "http://localhost:1337",
"STRAPI_TOKEN": "<your_api_token_here>",
"STRAPI_VERSION": "v5"
}
}
}
}
Replace <your_api_token_here> with your actual Strapi API token.
Running the Server
npm start
Or with custom environment:
STRAPI_CONTENT_TYPE=inventories STRAPI_TOKEN=your_token npm start
Testing
All test scripts have been removed for production. If you need to add tests, create your own scripts and update package.json accordingly.
Project Structure (Minimal Production Setup)
strapi-mcp-server/
├── strapi-mcp-server.js # Main MCP server
├── package.json # Dependencies and scripts
├── package-lock.json # Dependency lock file
├── README.md # This documentation
└── docs/ # Documentation
└── IMPLEMENTATION-SUMMARY.md
└── CODE-EXPLANATION.md
└── INSTRUCTION.md
Configuration
The server supports the following environment variables:
STRAPI_URL: Strapi server URL (default: http://localhost:1337)STRAPI_TOKEN: API authentication tokenSTRAPI_CONTENT_TYPE: Content type to manage (default: inventories)STRAPI_VERSION: Strapi version ("v4" or "v5"). Determines whether entity IDs are handled asid(v4) ordocumentId(v5). Set this to match your Strapi instance for correct CRUD operations.
Example:
"STRAPI_VERSION": "v5"
If not set, the server will attempt to auto-detect, but explicit configuration is recommended for reliability.
Documentation & Agent Workflow
For agent-driven development, see INSTRUCTION.md and AGENT-INSTRUCTION.md for custom workflows to generate requirements and actionable tasks from prompts.
License
MIT