MCP cover image
See in Github
2025-03-08

Un servidor MCP para su CMS Strapi

1

Github Watches

1

Github Forks

3

Github Stars

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

Advanced Features

Filtering, Pagination, and Sorting

The 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"]
}

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:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

For detailed step-by-step instructions on how to deploy and test this MCP server, please see the DEPLOYMENT.md file.

Quick setup:

  1. Build the server: npm run build
  2. Configure your Strapi instance and get an API token
  3. 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

{
  "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"
      }
    }
  }
}

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
  2. Go to Settings > API Tokens
  3. Click "Create new API Token"
  4. Set a name, description, and token type (preferably "Full access")
  5. 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, which is available as a package script:

npm run inspector

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

use_mcp_tool(
  server_name: "strapi-mcp",
  tool_name: "list_content_types",
  arguments: {}
)

Getting Entries

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"]
  }
)

Creating an Entry

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"
    }
  }
)

Uploading Media

use_mcp_tool(
  server_name: "strapi-mcp",
  tool_name: "upload_media",
  arguments: {
    "fileData": "base64-encoded-data-here",
    "fileName": "image.jpg",
    "fileType": "image/jpeg"
  }
)

Accessing Resources

access_mcp_resource(
  server_name: "strapi-mcp",
  uri: "strapi://content-type/api::article.article"
)

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • Mintplex-Labs
  • La aplicación AI de escritorio todo en uno y Docker con trapo incorporado, agentes de IA, creador de agentes sin código, compatibilidad de MCP y más.

  • modelcontextprotocol
  • Servidores de protocolo de contexto modelo

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • n8n-io
  • Plataforma de automatización de flujo de trabajo de código justo con capacidades de IA nativas. Combine el edificio visual con código personalizado, auto-anfitrión o nube, más de 400 integraciones.

  • OffchainLabs
  • Implementación de la prueba de estaca Ethereum

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 llM 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Resumen de los mejores recursos del mundo.

  • open-webui
  • Interfaz de IA fácil de usar (admite Ollama, Operai API, ...)

    Reviews

    2 (1)
    Avatar
    user_BUJzUwDD
    2025-04-15

    I've been using the Didlogic MCP Server from UserAd for a while now, and it has exceeded my expectations. The performance is top-notch, and it's incredibly reliable. The setup process was straightforward, and the support team is always responsive and helpful. Highly recommend this server for anyone in need of a robust and efficient solution!