DevKit for Strapi MCP Server
Provides AI agents with ground-truth knowledge of Strapi projects by reading real schema files, enabling accurate queries and safe refactoring operations.
README
<p align="center"> <img src="assets/icon.svg" width="120" alt="DevKit for Strapi logo" /> </p>
<h1 align="center">DevKit for Strapi</h1>
<p align="center"> Accurate, project-aware tooling for Strapi <em>magic strings</em> — for your editor <strong>and</strong> your AI agent.<br/> Where Copilot <strong>guesses</strong>, DevKit for Strapi <strong>knows</strong>: it reads your real <code>schema.json</code>. </p>
Why
Strapi runs on magic strings — UIDs like api::article.article, service/controller refs, policy and
middleware names, component UIDs, route handlers. In most editors they have no autocomplete, no
validation, and broken navigation, and a typo fails silently at runtime. AI coding assistants make
it worse: they happily hallucinate UIDs and method names that don't exist in your project.
DevKit for Strapi reads the real content-types, components, services, controllers, policies, middlewares and routes of every Strapi project in your workspace, and turns those strings into first-class, verified code — in two surfaces that share one engine:
- a VS Code extension for humans, and
- an MCP server that gives AI agents the same ground truth.
The rule everywhere: guarantee, don't guess. When something can't be proven (a non-literal string, an unverifiable external plugin), DevKit stays silent rather than show a false positive.
🧩 The VS Code extension
Inside a Strapi project — zero config, no type generation:
- Autocomplete — inside a magic string, suggests the real values for the context at your cursor: UIDs, services, controllers, policies, middlewares, components, and a content-type's route actions.
- Diagnostics — underlines references that don't exist (with quick fixes that suggest the closest
match), and flags Strapi v4 patterns (
entityService,data.attributes) used in a v5 project. - Go to definition — <kbd>Ctrl/Cmd</kbd>-click a string to jump to the right target: a UID → its
schema.json, a service/controller/policy/middleware → its file, a routehandler→ the controller method, a component → its JSON, aplugin('a').service('b')chain → the plugin's service. - Find references & CodeLens — a “N references” lens on every definition, including per-method
usages (
strapi.service('x').find()calls and route handlers) the TypeScript server can't see, becausestrapi.service(...)is typedany. A second “N incoming relations” lens onschema.json. - Rename (<kbd>F2</kbd>) — on an entity or a method: propagates to every call-site and route
handler, renames the underlying file/folder, and updates relation
targets. No grep-and-pray. - Hover — describes what a string resolves to, with the signature for service methods and usage insights (incoming relations, route handlers, data usages).
🤖 The MCP server — ground truth for AI agents
The same engine, exposed over the Model Context Protocol so coding agents (Claude Code, Copilot agent mode, Cursor, …) query your project's real values instead of inventing them. 29 stdio tools, in three layers:
Know — read the project's truth
list_projects · list_content_types · list_components · list_artifacts · get_schema · resolve ·
validate_reference · find_references · list_routes
Understand — health & impact analysis
list_unused (dead code) · list_broken_refs · coverage · find_relation_usages · list_refs (glob) ·
dependencies / dependents (the dependency graph, for cut analysis)
Refactor — plan → review → apply
plan_rename_method / plan_rename_entity · plan_move / plan_move_entities · plan_change_relation ·
plan_rename_attribute · create_plugin · extract_to_plugin, then apply_edits / apply_rename.
Every refactor returns a contractual, reviewable plan (text edits + file creates/renames/deletes + content fingerprints). Applying is explicit and safe by construction: the executor is confined to your discovered project root(s) (symlink-resolved — no escape), refuses to silently overwrite, verifies the fingerprints first (a stale plan is rejected, not applied), is best-effort transactional (rolls back on a mid-write failure), and self-verifies afterward (re-checks for broken refs). Garantir, ne pas deviner — applied to writes too.
Set it up
- VS Code, Cursor, Windsurf, Antigravity — the server is bundled in the extension and auto-registered with the editor's MCP support. Nothing to configure: install the extension and your agent can use the tools.
- Other MCP clients — run
devkit-for-strapi-mcpas a stdio server, passing your project path. It also accepts the workspace folder via the client'srootscapability (so it just works wherever you open it), and a tool (add_project) to register a project on demand.
For Claude Code, Claude Desktop, or any standalone MCP client:
{
"mcpServers": {
"devkit-for-strapi": {
"command": "npx",
"args": ["-y", "devkit-for-strapi-mcp", "/absolute/path/to/your/strapi-project"]
}
}
}
Try it
Once it's wired, ask your agent:
- "Which content types exist in this project?"
- "What uses
api::article.article?" - "Is
api::article.artclea valid reference?"
It answers from your real schema.json — not from a guess.
Accurate by design
- Reads your real schema — answers come from your project's files, not from a model's guess.
- Multi-project — discovers every Strapi project in the workspace by content (scanning for
@strapi/strapi), never assuming workspace root = Strapi root. References resolve against the project that owns the edited file; an ambiguous request returns candidates, never a silent choice. - Strapi v4 and v5 — the version is detected per project; v4-in-v5 patterns are flagged. Knows the
difference between a
collectionTypeand asingleType(their auto-CRUD actions differ) and a schema-only content-type's auto-generated controller. - JavaScript & TypeScript — identical behavior for ESM and CommonJS projects (challenged by a JS⇄TS parity test).
- Runs everywhere — VS Code and its forks (Cursor, Windsurf, Google Antigravity) via Open VSX and the VS Code Marketplace.
Install
Editor — search “DevKit for Strapi” in the Extensions view (VS Code Marketplace), or install from Open VSX for Cursor / Windsurf / VSCodium. Open a Strapi project and it works.
Requirements — a Strapi v4 or v5 project, and VS Code 1.101+ (or a compatible fork). No
configuration, no type generation, no extra setup.
The MCP server needs no separate install in those editors — it ships inside the extension.
Architecture
A pnpm monorepo around one pure engine:
| Package | Role |
|---|---|
devkit-for-strapi-core |
The editor-agnostic engine — all Strapi knowledge, reads IO through a FileSystem seam, pure TypeScript. |
devkit-for-strapi |
The VS Code extension (providers, watcher) — glue, no Strapi logic. |
devkit-for-strapi-mcp |
The stdio MCP server — a third client of the same engine. |
The same core powers the editor, the MCP server, and the tests — so a fact verified once is true on every surface.
Trademark
Independent, community-built tool — not affiliated with, endorsed by, or sponsored by Strapi SAS. “Strapi” is a trademark of Strapi SAS, used here only to describe compatibility.
License
The core engine and the free editor/MCP wedge are free to use (licensed MIT)
(devkit-for-strapi-core, plus the read/navigation/diagnostics surface of the extension and the
read-only MCP tools).
The Pro write/refactor engine (propagated rename, move/extract, schema edits, plan→apply) is a
separate package that is not included in this repository — the packages/pro here is an
MIT-licensed stub that only preserves the public API so the free tier builds and runs. The real Pro
engine is licensed under PolyForm Shield 1.0.0 and is bundled into the published VS Code
extension and MCP server, so those distributed artifacts are governed by MIT AND PolyForm-Shield-1.0.0. Building from this repository produces the free tier; Pro features return a
"Pro required" upsell. Get Pro: https://devkit-for-strapi.paulrichez.fr/pro/.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。