r/Strapi 17h ago

Made a free VS Code extension + MCP server that gives real autocomplete & find-references on Strapi magic strings (v4 & v5)

5 Upvotes

Hey all — I build with Strapi a lot, and the magic strings kept biting me: api::article.article, service/controller/policy names, component UIDs, route handlers. Your editor treats them as plain text — no autocomplete, no go-to-def, and a typo compiles fine then fails at runtime.

The one that really got me: I renamed a service and spent an hour hunting the call-sites I broke. grep misses them (a UID behind a const, or strapi.service('x').findLatest() — grep can't tie the method to the service), and TypeScript is blind too, because strapi.service() returns any and half these strings live in schema.json (JSON, no types).

So I built DevKit for Strapi — it reads your real schema.json and turns the magic strings into first-class code:

  • Autocomplete on UIDs / services / controllers / policies / middlewares / components
  • Diagnostics for refs that don't exist (with "did you mean")
  • Go-to-definition + real find-references (incl. the any-typed service calls TS can't see)
  • v4 & v5, JS & TS, zero config, no codegen, no telemetry

It also ships an MCP server (bundled, or npx devkit-for-strapi-mcp) so AI agents (Claude Code, Copilot agent mode, Cursor) query your project's real values instead of guessing.

It's free and MIT. There's a paid tier for the refactor automation (propagated rename etc.), but everything above is free.

Repo: https://github.com/PaulRichez/devkit-for-strapi
(I wrote up the grep/TypeScript "why" in more detail here.)

Would genuinely love feedback — especially a magic-string pattern it misses, or v4/v5 quirks. That's the stuff I want to fix.