strapi cms.com
strapi cms.com logo

Strapi CMS

Integrates with Strapi CMS to enable creating, reading, updating, and deleting content entries with support for filterin...

Created byApr 23, 2025

Strapi MCP

An MCP server for Strapi CMS, providing access to content types and entries through the Model Context Protocol.

Overview

This MCP server integrates with any Strapi CMS instance to provide:
  • Access to Strapi content types as resources
  • Tools to create and update content types in Strapi
  • Tools to manage content entries (create, read, update, delete)
  • Support for Strapi in development mode

Setup

Environment Variables

  • `STRAPI_URL`: The URL of your Strapi instance (default: http://localhost:1337)
  • `STRAPI_API_TOKEN`: An API token with appropriate permissions (required)
  • `STRAPI_DEV_MODE`: Set to "true" to enable development mode features

Installation

Running

Features

  • List and read content types
  • Get, create, update, and delete entries
  • Upload media files
  • Connect and disconnect relations
  • Get content type schemas

Changelog

0.1.4

  • Improved error handling with more specific error codes
  • Added `ResourceNotFound` and `AccessDenied` error codes
  • Better error messages for common API errors

0.1.3

  • Initial public release

License

MIT

strapi-mcp MCP Server

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:
  • Access Strapi content types as resources
  • Create, read, update, and delete content entries
  • Manage your Strapi content through MCP tools

Features

Resources

  • List and access content types via `strapi://content-type/` URIs
  • Each content type exposes its entries as JSON
  • Application/JSON mime type for structured content access

Tools

  • `list_content_types` - List all available content types in Strapi
  • `get_entries` - Get entries for a specific content type with optional filtering, pagination, sorting, and population of relations
  • `get_entry` - Get a specific entry by ID
  • `create_entry` - Create a new entry for a content type
  • `update_entry` - Update an existing entry
  • `delete_entry` - Delete an entry
  • `upload_media` - Upload a media file to Strapi
  • `get_content_type_schema` - Get the schema (fields, types, relations) for a specific content type.
  • `connect_relation` - Connect related entries to an entry's relation field.
  • `disconnect_relation` - Disconnect related entries from an entry's relation field.

Advanced Features

Filtering, Pagination, and Sorting

The `get_entries` tool supports advanced query options:

Resource URIs

Resources can be accessed with various URI formats:
  • `strapi://content-type/api::article.article` - Get all articles
  • `strapi://content-type/api::article.article/1` - Get article with ID 1
  • `strapi://content-type/api::article.article?filters={"title":{"$contains":"hello"}}` - Get filtered articles

Development

Install dependencies:
Build the server:
For development with auto-rebuild:

Installation

For detailed step-by-step instructions on how to deploy and test this MCP server, please see the [DEPLOYMENT.md](./DEPLOYMENT.md) file.
Quick setup:
  1. Build the server: `npm run build`
  1. Configure your Strapi instance and get an API token
  1. Add the server config to Claude Desktop:
On MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json` On Windows: `%APPDATA%/Claude/claude_desktop_config.json`

Environment Variables

  • `STRAPI_URL` (optional): The URL of your Strapi instance (defaults to http://localhost:1337)
  • `STRAPI_API_TOKEN` (required): Your Strapi API token for authentication
  • `STRAPI_DEV_MODE` (optional): Set to "true" to enable development mode features (defaults to false)

Getting a Strapi API Token

  1. Log in to your Strapi admin panel
  1. Go to Settings > API Tokens
  1. Click "Create new API Token"
  1. Set a name, description, and token type (preferably "Full access")
  1. Copy the generated token and use it in your MCP server configuration

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector), which is available as a package script:
The Inspector will provide a URL to access debugging tools in your browser.

Usage Examples

Once the MCP server is configured and running, you can use it with Claude to interact with your Strapi CMS. Here are some examples:

Listing Content Types

Getting Entries

Creating an Entry

Uploading Media

Connecting Relations

Disconnecting Relations

Accessing Resources