InstantCMS MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/maxisoft-git/instantcms-mcp.git
cd instantcms-mcp
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add instantcms-mcp -- node "<FULL_PATH_TO_INSTANTCMS_MCP>/dist/index.js"

Replace <FULL_PATH_TO_INSTANTCMS_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

MCP server for developing InstantCMS 2 addons and templates

InstantCMS MCP Server

MCP (Model Context Protocol) сервер для разработки дополнений и шаблонов на базе InstantCMS 2.

Подключив этот сервер к AI-ассистенту (Claude, Cursor и др.), вы получаете полный контекст системы — хуки, API классов, структуры файлов — и можете создавать рабочие дополнения с первого запроса.


Возможности

  • 102 хука с описанием параметров, типов и готовыми примерами реализации
  • 170 событий из таблицы cms_events
  • 38 классов ядра (cmsModel, cmsTemplate, cmsDatabase и др.) с 500+ методами
  • Генерация скаффолда — все файлы дополнения за один вызов
  • 50 таблиц БД с полными схемами
  • 61 контроллер с 809 экшенами
  • 120 хелпер-функций (template, html, files, strings)
  • 6 PHP классов (Jevix, Google Auth, Mobile Detect, RSS, IDNA, YAML)
  • Валидация структуры дополнений
  • Поиск хуков по имени, описанию, категории
  • Примеры кода для типовых задач

Установка

Требования

  • Node.js 18+
  • npm

Клонирование и сборка

git clone https://github.com/your-username/instantcms-mcp.git
cd instantcms-mcp
npm install
npm run build

Подключение к Claude Desktop

Добавьте в ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) или %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "instantcms": {
      "command": "node",
      "args": ["/absolute/path/to/instantcms-mcp/dist/index.js"]
    }
  }
}

Перезапустите Claude Desktop. В чате появятся инструменты с префиксом instantcms.

Подключение к Cursor / другим MCP-клиентам

{
  "mcp": {
    "servers": {
      "instantcms": {
        "command": "node",
        "args": ["/absolute/path/to/instantcms-mcp/dist/index.js"]
      }
    }
  }
}

Запуск инспектора (отладка)

npm run inspector

Инструменты (38)

Базовые (14)

Tool Описание
get_addon_structure Структура файлов дополнения (5 типов)
scaffold_addon Генерация готового кода всех файлов
list_hooks Список хуков с фильтрацией
get_hook_details Детали хука + пример реализации
search_hooks Полнотекстовый поиск хуков
get_component_api API класса (cmsModel, cmsTemplate и др.)
list_components Список всех компонентов
validate_addon Валидация структуры дополнения
get_field_types Типы полей форм
get_code_example Примеры кода для типовых задач
scaffold_template Генерация шаблона темы
get_template_structure Структура и переменные шаблона
scaffold_layout_scheme Схема виджетов для modern
list_layout_presets Пресеты схем

База данных — статика (6)

Tool Описание
introspect_database Список таблиц БД
describe_table Структура таблицы
list_content_types Типы контента
list_database_events Карта событий
analyze_controller Анализ контроллера
list_controllers Список контроллеров

MariaDB — динамика (6)

Tool Описание
maria_execute_query SQL запрос
maria_list_tables Список таблиц
maria_describe_table Структура таблицы
maria_get_database_info Статистика БД
maria_search_tables Поиск таблиц
maria_get_table_data Данные с пагинацией

Исходный код (6)

Tool Описание
list_widgets Список виджетов
get_widget_info Детали виджета
list_traits Список трейтов
get_trait_info Методы трейта
list_field_types Типы полей
get_field_type_info Детали поля

Миграции (2)

Tool Описание
generate_migration Генерация SQL и install.php
get_field_suggestions Подсказки по полям

AI анализ (2)

Tool Описание
analyze_requirement AI анализ запроса
suggest_addon_structure Структура по типу

Ресурсы (4)

URI Описание
instantcms://hooks/all Все хуки (JSON)
instantcms://components/all Все компоненты (JSON)
instantcms://addon/types Типы дополнений (JSON)
instantcms://quickstart Краткое руководство (Markdown)

Примеры использования

Создать дополнение с нуля

Создай дополнение для отображения каталога товаров с категориями,
админ-панелью для управления, виджетом последних добавлений
и интеграцией с поиском сайта

Найти нужный хук

Какой хук использовать, чтобы добавить вкладку на страницу профиля пользователя?

Реализовать хук

Напиши реализацию хука content_after_add_approve, который добавляет
уведомление в нашу кастомную систему нотификаций

Разобраться с API

Как правильно использовать cmsModel для постраничного вывода
с несколькими JOIN и сортировкой?

Структура проекта

src/
├── data/
│   ├── hooks.ts           # 102 хука по 17 категориям
│   ├── components.ts     # API базовых классов
│   ├── core-api.t

Tools (11)

get_addon_structureReturns the file structure of an addon.
scaffold_addonGenerates the complete code for all addon files.
list_hooksLists system hooks with filtering capabilities.
get_hook_detailsProvides details and implementation examples for a specific hook.
search_hooksPerforms a full-text search across system hooks.
get_component_apiRetrieves the API for core classes like cmsModel or cmsTemplate.
list_componentsLists all available system components.
validate_addonValidates the structure of an addon.
introspect_databaseLists all database tables.
describe_tableProvides the structure of a specific database table.
maria_execute_queryExecutes a SQL query against the MariaDB database.

Configuration

claude_desktop_config.json
{"mcpServers": {"instantcms": {"command": "node", "args": ["/absolute/path/to/instantcms-mcp/dist/index.js"]}}}

Try it

Create a new InstantCMS addon for a product catalog with an admin panel and a recent items widget.
Which hook should I use to inject a custom tab into the user profile page?
Write an implementation for the content_after_add_approve hook to trigger a custom notification.
How do I use cmsModel to perform a paginated query with multiple JOINs and custom sorting?

Frequently Asked Questions

What are the key features of InstantCMS MCP Server?

Access to 102 system hooks with parameter descriptions and implementation examples.. Automated scaffolding for generating complete addon and template file structures.. Introspection of 50 database tables and 61 system controllers.. Comprehensive API documentation for 38 core classes including cmsModel and cmsTemplate.. Built-in validation for addon structures to ensure compliance with system standards..

What can I use InstantCMS MCP Server for?

Rapidly scaffolding new InstantCMS 2 extensions to reduce boilerplate code.. Debugging and implementing complex system hooks without manual documentation lookups.. Querying database schemas and controller actions directly from the AI chat interface.. Generating theme templates and layout schemes for InstantCMS modern designs..

How do I install InstantCMS MCP Server?

Install InstantCMS MCP Server by running: git clone https://github.com/maxisoft-git/instantcms-mcp.git && cd instantcms-mcp && npm install && npm run build

What MCP clients work with InstantCMS MCP Server?

InstantCMS MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep InstantCMS MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare