How To Extend Strapi's MCP Server With a Custom Tools via a Plugin
Blog post from Strapi
The article provides a comprehensive guide on extending Strapi's Model Context Protocol (MCP) server using plugins to create custom tools for content management. Strapi 5.47+ includes an MCP server, which can be enabled by configuring a single line in server.ts, allowing the use of CRUD tools for content types. However, these tools do not support custom controllers or workflows, which necessitates the creation of custom tools. The process involves using the strapi.ai.mcp.registerTool function to develop custom tools within a plugin, allowing for version control, clean folder structures, and easy sharing. The guide emphasizes the importance of using plugins for managing multiple tools, maintaining portability, and organizing code effectively. It also highlights the challenges and limitations, such as token permissions and the handling of dynamic zones, while providing solutions and workarounds. Additionally, the article covers the integration of tools with AI clients like Claude Code, demonstrating how to set up and use MCP tools for autonomous workflows, and proposes improvements for Strapi's MCP capabilities, particularly in terms of server instructions.