MCP Server
Use the Model Context Protocol with Plate.
Plate has an official MCP server. This lets AI tools understand and work with our rich ecosystem of editor templates, plugin configurations, and UI components.
What is MCP?
The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to LLMs. This is useful for Plate because you can now give your AI-assisted IDE direct access to hundreds of Plate resources.
Using MCP with Plate
Your AI can now:
- Access to all our editor templates, plugins, and UI components
- Generate code with the right imports and configurations
- Help with setting up full editor instances or specific features
- Keep your Plate configurations and components up to date
Try asking your AI:
"Set up a Plate editor with basic formatting and table support"
"Add the Plate AI plugin and components to my current editor"
"Update my editor components to the latest version"
How it works
The Plate ecosystem provides structured information that MCP-enabled tools can read from two main sources:
- Plate Resources (
registry.json
): This registry includes editor templates, plugin configurations, UI components, and their dependencies. - Plate Documentation (
registry-docs.json
): This registry provides access to documentation files and migration guides.
This dual-registry approach ensures AI tools have comprehensive context for both code generation and understanding Plate's features.
Local Documentation
For teams working with Plate, integrating local documentation is key to maximizing the benefits of MCP. We recommend following our Local Docs guide to set this up. This approach offers several advantages for AI-powered development:
- Version-Specific Context: AI tools gain direct access to documentation that precisely matches your project's Plate version, ensuring relevant and accurate assistance.
- Superior to
llms.txt
: Unlike simply dumping documentation into a text file (which can struggle with large volumes and context limits), a structured local setup allows AI to efficiently access the specific information it needs. - Integrated Workflow: Documentation becomes a part of your codebase, simplifying updates, version control, and team collaboration.
- AI-Ready: A well-structured local documentation allows AI to more effectively assist with tasks such as generating code, creating summaries, or explaining complex Plate features within the context of your project.
Setup MCP
Copy and paste the code into .cursor/mcp.json
(or .codeium/windsurf/mcp_config.json
for Windsurf)
{
"mcpServers": {
"plate": {
"description": "Plate editors, plugins and components",
"type": "stdio",
"command": "npx",
"args": ["-y", "shadcn@canary", "registry:mcp"],
"env": {
"REGISTRY_URL": "https://platejs.org/r/registry.json"
}
},
"plate-docs": {
"description": "Plate documentation",
"type": "stdio",
"command": "npx",
"args": ["-y", "shadcn@canary", "registry:mcp"],
"env": {
"REGISTRY_URL": "https://platejs.org/r/registry-docs.json"
}
}
}
}
Best Practices
- Local Documentation: Set up local documentation to give AI tools version-specific context. This ensures more accurate assistance, especially for larger projects.
- AI-Assisted Development: Let AI handle editor setup, plugin integration, and component additions.
- Manual Fallback: Use the shadcn CLI for manual additions when needed (e.g., with small models or outdated documentation).
- Stay Updated: Keep both your Plate components and local documentation in sync. Check our changelog regularly or ask your AI about updates.