This is a community driven server! Contentful has released an official server which you can find here An MCP server implementation that integrates with Contentful's Content Management API, providing comprehensive content management capabilities. - Please note \; if you are not interested in the code, and just want to use this MCP in Claude Desktop (or any other tool that is able to use MCP servers
Add this skill
npx mdskills install ivo-toby/contentful-mcpComprehensive Contentful CMS integration with extensive CRUD operations, pagination, and bulk tools
1<img width="700" src="https://images.ctfassets.net/jtqsy5pye0zd/6wNuQ2xMvbw134rccObi0q/bf61badc6d6d9780609e541713f0bba6/Contentful_Logo_2.5_Dark.svg?w=700&q=100" alt="Contentful MCP server"/>23# Contentful MCP Server45## Notice67This is a community driven server! Contentful has released an official server which you can find [here](https://github.com/contentful/contentful-mcp-server)89[](https://smithery.ai/server/@ivotoby/contentful-management-mcp-server)1011An MCP server implementation that integrates with Contentful's Content Management API, providing comprehensive content management capabilities.1213- Please note \*; if you are not interested in the code, and just want to use this MCP in14 Claude Desktop (or any other tool that is able to use MCP servers) you don't have to15 clone this repo, you can just set it up in Claude desktop, refer to the section16 "Usage with Claude Desktop" for instructions on how to install it.1718<a href="https://glama.ai/mcp/servers/l2fxeaot4p"><img width="380" height="200" src="https://glama.ai/mcp/servers/l2fxeaot4p/badge" alt="contentful-mcp MCP server" /></a>1920## Features2122- **Content Management**: Full CRUD operations for entries and assets23- **Comment Management**: Create, retrieve, and manage comments on entries with support for both plain-text and rich-text formats, including threaded conversations24- **Space Management**: Create, update, and manage spaces and environments25- **Content Types**: Manage content type definitions26- **Localization**: Support for multiple locales27- **Publishing**: Control content publishing workflow28- **Bulk Operations**: Execute bulk publishing, unpublishing, and validation across multiple entries and assets29- **Smart Pagination**: List operations return maximum 3 items per request to prevent context window overflow, with built-in pagination support3031## Pagination3233To prevent context window overflow in LLMs, list operations (like search_entries and list_assets) are limited to 3 items per request. Each response includes:3435- Total number of available items36- Current page of items (max 3)37- Number of remaining items38- Skip value for the next page39- Message prompting the LLM to offer retrieving more items4041This pagination system allows the LLM to efficiently handle large datasets while maintaining context window limits.4243## Bulk Operations4445The bulk operations feature provides efficient management of multiple content items simultaneously:4647- **Asynchronous Processing**: Operations run asynchronously and provide status updates48- **Efficient Content Management**: Process multiple entries or assets in a single API call49- **Status Tracking**: Monitor progress with success and failure counts50- **Resource Optimization**: Reduce API calls and improve performance for batch operations5152These bulk operation tools are ideal for content migrations, mass updates, or batch publishing workflows.5354## Tools5556### Entry Management5758- **search_entries**: Search for entries using query parameters59- **create_entry**: Create new entries60- **get_entry**: Retrieve existing entries61- **update_entry**: Update entry fields62- **delete_entry**: Remove entries63- **publish_entry**: Publish entries64- **unpublish_entry**: Unpublish entries6566### Comment Management6768- **get_comments**: Retrieve comments for an entry with filtering by status (active, resolved, all)69- **create_comment**: Create new comments on entries with support for both plain-text and rich-text formats. Supports threaded conversations by providing a parent comment ID to reply to existing comments70- **get_single_comment**: Retrieve a specific comment by its ID for an entry71- **delete_comment**: Delete a specific comment from an entry72- **update_comment**: Update existing comments with new body content or status changes7374#### Threaded Comments7576Comments support threading functionality to enable structured conversations and work around the 512-character limit:7778- **Reply to Comments**: Use the `parent` parameter in `create_comment` to reply to an existing comment79- **Threaded Conversations**: Build conversation trees by replying to specific comments80- **Extended Discussions**: Work around the 512-character limit by creating threaded replies to continue longer messages81- **Conversation Context**: Maintain context in discussions by organizing related comments in threads8283Example usage:84851. Create a main comment: `create_comment` with `entryId`, `body`, and `status`862. Reply to that comment: `create_comment` with `entryId`, `body`, `status`, and `parent` (the ID of the comment you're replying to)873. Continue the thread: Reply to any comment in the thread by using its ID as the `parent`8889### Bulk Operations9091- **bulk_publish**: Publish multiple entries and assets in a single operation. Accepts an array of entities (entries and assets) and processes their publication as a batch.92- **bulk_unpublish**: Unpublish multiple entries and assets in a single operation. Similar to bulk_publish but removes content from the delivery API.93- **bulk_validate**: Validate multiple entries for content consistency, references, and required fields. Returns validation results without modifying content.9495### Asset Management9697- **list_assets**: List assets with pagination (3 items per page)98- **upload_asset**: Upload new assets with metadata99- **get_asset**: Retrieve asset details and information100- **update_asset**: Update asset metadata and files101- **delete_asset**: Remove assets from space102- **publish_asset**: Publish assets to delivery API103- **unpublish_asset**: Unpublish assets from delivery API104105### Space & Environment Management106107- **list_spaces**: List available spaces108- **get_space**: Get space details109- **list_environments**: List environments in a space110- **create_environment**: Create new environment111- **delete_environment**: Remove environment112113### Content Type Management114115- **list_content_types**: List available content types116- **get_content_type**: Get content type details117- **create_content_type**: Create new content type118- **update_content_type**: Update content type119- **delete_content_type**: Remove content type120- **publish_content_type**: Publish a content type121122## Development Tools123124### MCP Inspector125126The project includes an MCP Inspector tool that helps with development and debugging:127128- **Inspect Mode**: Run `npm run inspect` to start the inspector, you can open the inspector by going to http://localhost:5173129- **Watch Mode**: Use `npm run inspect:watch` to automatically restart the inspector when files change130- **Visual Interface**: The inspector provides a web interface to test and debug MCP tools131- **Real-time Testing**: Try out tools and see their responses immediately132- **Bulk Operations Testing**: Test and monitor bulk operations with visual feedback on progress and results133134The project also contains a `npm run dev` command which rebuilds and reloads the MCP server on every change.135136## Configuration137138### Prerequisites1391401. Create a Contentful account at [Contentful](https://www.contentful.com/)1412. Generate a Content Management API token from your account settings142143### Environment Variables144145These variables can also be set as arguments146147- `CONTENTFUL_HOST` / `--host`: Contentful Management API Endpoint (defaults to https://api.contentful.com)148- `CONTENTFUL_MANAGEMENT_ACCESS_TOKEN` / `--management-token`: Your Content Management API token149- `ENABLE_HTTP_SERVER` / `--http`: Set to "true" to enable HTTP/SSE mode150- `HTTP_PORT` / `--port`: Port for HTTP server (default: 3000)151- `HTTP_HOST` / `--http-host`: Host for HTTP server (default: localhost)152- `DISABLE_AI_ACTIONS`: Set to "true" to disable fetching AI Actions on startup (useful if you don't have access to this feature)153154### Space and Environment Scoping155156You can scope the spaceId and EnvironmentId to ensure the LLM will only do operations on the defined space/env ID's.157This is mainly to support agents that are to operate within specific spaces. If both `SPACE_ID` and `ENVIRONMENT_ID` env-vars are set158the tools will not report needing these values and the handlers will use the environment vars to do CMA operations.159You will also loose access to the tools in the space-handler, since these tools are across spaces.160You can also add the `SPACE_ID` and `ENVIRONMENT_ID` by using arguments `--space-id` and `--environment-id`161162#### Using App Identity163164Instead of providing a Management token you can also leverage [App Identity](https://www.contentful.com/developers/docs/extensibility/app-framework/app-identity/)165for handling authentication. You would have to setup and install a Contentful App and set the following parameters when calling the MCP-server:166167- `--app-id` = the app Id which is providing the Apptoken168- `--private-key` = the private key you created in the user-interface with your app, tied to `app_id`169- `--space-id` = the spaceId in which the app is installed170- `--environment-id` = the environmentId (within the space) in which the app is installed.171172With these values the MCP server will request a temporary AppToken to do content operation in the defined space/environment-id. This especially useful when using this MCP server in backend systems that act as MCP-client (like chat-agents)173174### Usage with Claude Desktop175176You do not need to clone this repo to use this MCP, you can simply add it to177your `claude_desktop_config.json`:178179Add or edit `~/Library/Application Support/Claude/claude_desktop_config.json`180and add the following lines:181182```json183{184 "mcpServers": {185 "contentful": {186 "command": "npx",187 "args": ["-y", "@ivotoby/contentful-management-mcp-server"],188 "env": {189 "CONTENTFUL_MANAGEMENT_ACCESS_TOKEN": "<Your CMA token>"190 }191 }192 }193}194```195196If your MCPClient does not support setting environment variables you can also set the management token using an argument like this:197198```json199{200 "mcpServers": {201 "contentful": {202 "command": "npx",203 "args": [204 "-y",205 "@ivotoby/contentful-management-mcp-server",206 "--management-token",207 "<your token>",208 "--host",209 "http://api.contentful.com"210 ]211 }212 }213}214```215216### Installing via Smithery217218To install Contentful Management Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@ivotoby/contentful-management-mcp-server):219220```bash221npx -y @smithery/cli install @ivotoby/contentful-management-mcp-server --client claude222```223224### Developing and using Claude desktop225226If you want to contribute and test what Claude does with your contributions;227228- run `npm run dev`, this will start the watcher that rebuilds the MCP server on every change229- update `claude_desktop_config.json` to reference the project directly, ie;230231```232{233 "mcpServers": {234 "contentful": {235 "command": "node",236 "args": ["/Users/ivo/workspace/contentful-mcp/bin/mcp-server.js"],237 "env": {238 "CONTENTFUL_MANAGEMENT_ACCESS_TOKEN": "<Your CMA Token>"239 }240 }241 }242}243```244245This will allow you to test any modification in the MCP server with Claude directly, however; if you add new tools/resources you will need to restart Claude Desktop246247## Transport Modes248249The MCP server supports two transport modes:250251### stdio Transport252253The default transport mode uses standard input/output streams for communication. This is ideal for integration with MCP clients that support stdio transport, like Claude Desktop.254255To use stdio mode, simply run the server without the `--http` flag:256257```bash258npx -y contentful-mcp --management-token YOUR_TOKEN259# or alternatively260npx -y @ivotoby/contentful-management-mcp-server --management-token YOUR_TOKEN261```262263### StreamableHTTP Transport264265The server also supports the StreamableHTTP transport as defined in the MCP protocol. This mode is useful for web-based integrations or when running the server as a standalone service.266267To use StreamableHTTP mode, run with the `--http` flag:268269```bash270npx -y contentful-mcp --management-token YOUR_TOKEN --http --port 3000271# or alternatively272npx -y @ivotoby/contentful-management-mcp-server --management-token YOUR_TOKEN --http --port 3000273```274275#### StreamableHTTP Details276277- Uses the official MCP StreamableHTTP transport278- Supports standard MCP protocol operations279- Includes session management for maintaining state280- Properly handles initialize/notify patterns281- Compatible with standard MCP clients282- Replaces the deprecated SSE transport with the modern approach283284The implementation follows the standard MCP protocol specification, allowing any MCP client to connect to the server without special handling.285286## Error Handling287288The server implements comprehensive error handling for:289290- Authentication failures291- Rate limiting292- Invalid requests293- Network issues294- API-specific errors295296[](https://mseep.ai/app/146d4235-bdb1-492e-b594-82fd27b77388)297298## License299300MIT License301302## Fine print303304This MCP Server enables Claude (or other agents that can consume MCP resources) to update, delete content, spaces and content-models. So be sure what you allow Claude to do with your Contentful spaces!305306This MCP-server is not officially supported by Contentful (yet)307
Full transparency — inspect the skill content before installing.