How custom MCP tools in a Strapi plugin fit the platform
A custom MCP tool lets an AI client run one specific Strapi action, such as creating a draft entry or running a publish check, through a plugin that registers the tool with the Strapi MCP server. The reason to build it this way is that the editorial or operations team can ask an assistant for a named outcome instead of giving the client broad access to the admin panel or the content API. Every tool is a write path that must respect the same roles that govern a human editor. Before anything else, confirm in the Strapi documentation which release introduced the MCP server, the exact registration API a plugin uses to add a tool, and how the server passes the calling user's identity and permissions to the handler. Those three points decide whether the tool can be built as planned at all.
Custom tools inherit the risk of any write path in Strapi. A tool that creates or changes content can do harm if its permission check is missing, too broad, or evaluated against the wrong identity, and an AI client may call it in sequences nobody tested by hand. The plugin therefore needs its own explicit checks on each action, separate from whatever the admin panel enforces for the UI. Plan for review of tool inputs, clear error messages for denied calls, and audit visibility where your Strapi plan provides it. The features that log administrator activity are covered by the Strapi self-hosted pricing page, so confirm which plan includes them before you rely on them for accountability.
This work is usually scoped once a team already has at least one working Strapi plugin, because the tool registration, build, and verification steps reuse the plugin project, its test app, and its release process. The scope should name each action the client may perform, the roles allowed to perform it, the content types it touches, and the failure cases the team expects to see. Ask any implementation partner to describe how they will test tool calls against a non-production instance with real role configurations, and to state which Strapi versions the tools will support. Effort depends mainly on the number of actions, the complexity of their permission rules, and how many Strapi versions must be supported, so ask for the quote to itemize those three items.
What a plugin-registered MCP tool does in Strapi
A plugin tool is a small contract between your plugin and an AI client. Each part of that contract, from the definition the client reads to the result it gets back, is something you design and test. The cards below describe those parts in plain terms; confirm exact field names in the Strapi MCP documentation for your target version before you write code.
The tool definition
The definition is what the AI client sees before it calls anything: a tool name, a plain-language description and an input schema that lists the arguments and their types. The client chooses tools from these descriptions, so vague wording leads to wrong calls. Check that the name is unique across installed plugins, that the description states what the tool changes or reads, and that the schema rejects inputs you do not expect.
The handler running plugin server code
The handler is the server-side function that runs when the client calls the tool. It executes inside your plugin, so it can call your services and content types, but it also inherits every side effect those services have. Keep handlers thin, route writes through the same services the admin panel uses, and confirm how the handler receives the validated arguments for your Strapi version.
The permission check before the handler
The permission check decides whether the caller may run the tool at all, and it must run before the handler does any work. Tie it to the identity behind the MCP session and to the same roles that govern the feature in the admin panel, so an AI client cannot reach data an editor could not open. Test a token with reduced rights and confirm that a denied call never reaches your handler code.
The result shape returned to the client
The result is what the AI client receives back, usually structured content the model can read and act on. Return only the fields the task needs, state errors in a consistent form, and avoid echoing secrets, tokens or full records that the caller was not meant to see. Agree the shape with the people who will consume it, and confirm the exact response envelope in the Strapi MCP documentation for your version.
How an AI client call reaches plugin code and permission checks
The diagram starts at the AI client, which sits outside the trust boundary and sends a tool call to the Strapi MCP server. The server looks up the registered plugin tool and resolves the authenticated admin or user context before anything runs. A permission check happens at that point, and a denied call returns an error to the client without touching the plugin handler or its services. Confirm with your Strapi version's docs which identity types the MCP server accepts and where the check is enforced.
Tool call path from AI client through the permission check to plugin code.
Which tool design fits each domain action
This table compares the main design choices for a plugin-registered MCP tool: access type, granularity, scope of change and timing of results. Read each row against the domain action you need to expose, and treat the right-hand column as the list of points to settle with your team before any code is written.
| Design choice | When it fits | Permission and audit implications | Confirm before building |
|---|---|---|---|
| Read-only tool | AI clients need to look up content, status or plugin records without changing them | Lowest risk. Still check the caller's permissions on every query so results do not expose content the user cannot open in the admin panel | Which content types and fields may be returned, and whether reads must be logged |
| Write tool | AI clients must create or update records, such as drafting an entry or changing a status | Needs explicit permission checks for each action and an audit trail naming the acting user or token | Which roles may write, whether drafts are required, and how a bad write is reversed |
| One broad tool with many actions | A single domain has several related operations and you want fewer tools for clients to choose from | Permission logic becomes branched and harder to review. Each action needs its own check inside the tool | Whether the team can test every action path, and how the schema of the tool will be documented |
| Several narrow tools | Each operation has a distinct purpose and different permission requirements | Easier to review and grant separately, though more tools increase what clients must select correctly | How many tools clients will handle, and whether naming and descriptions are clear enough for selection |
| Single-document action | The request targets one known entry, such as publishing or unpublishing one article | Checks apply to one record. Audit entries map cleanly to one document | Whether the tool must identify the document by ID, slug or another unique key |
| Bulk action | Operators need to update many entries at once, such as a batch status change | Checks must apply to every item, and a partial failure must be reported. Audit volume grows with the batch | Maximum batch size, whether the batch is all-or-nothing, and who approves large runs |
| Synchronous result | The action is short and the client needs the outcome in the same response | The response can state the result directly, and the audit record is written before the reply returns | Expected response time for the action and how timeouts are reported to the client |
| Queued or asynchronous work | The action is long-running or depends on other jobs, so the client should receive a job reference | Permission checks happen at submission and may need repeating when the job runs. Audit must cover both steps | How job status is retrieved, who can cancel a job, and what happens if the underlying data changes while queued |
Permission checks and lifecycle timing for MCP tools
The permission check belongs inside the tool handler, not only in the admin UI. An AI client does not click through the admin panel. It calls the tool directly, so any check that lives in a menu, a button or a hidden page does nothing for that caller. Each tool should resolve the identity behind the request, then confirm that identity holds the Strapi role and plugin permission needed for the specific action before it reads or writes anything. Confirm with your plugin documentation how the MCP server passes the caller's identity into the tool context, whether that identity is a user session, an API token or a service identity, and which Strapi permission checks are available to call from the handler. Test each tool with a low-privilege account and a token that lacks the permission, because a tool that works for an administrator can still expose data to everyone else.
Registration order decides whether tools start cleanly. A plugin usually registers its tools during Strapi startup, through the lifecycle hook where plugin server code is initialized. If that registration runs before the content types, services or database connections a tool depends on are ready, the tool may load but fail on its first call, or reference a service that is undefined. Keep registration declarative (names, descriptions, input schemas) and defer any lookup of content types or services to execution time. Confirm the exact lifecycle hook names and their order in the current plugin documentation for your Strapi 5 version before you rely on them.
Plan for upgrades and disabled states before the tools reach users. When a plugin is disabled, or an upgrade removes or renames a tool, AI clients that cached the old tool list can still send calls. Decide in advance whether those calls return a clear error, and make sure no partial write happens mid-upgrade. Version tool names and input schemas the same way you version the plugin, and keep a changelog that tells client owners what changed. Test disable, enable and upgrade on a copy of production data, and confirm how your MCP client handles a tool list that changes while a session is open.
Build sequence for a custom MCP tool
This sequence takes a set of domain actions from an inventory through permission mapping, plugin registration, handler code, automated tests, a staged run with a real AI client, and release. Each step closes with a artifact the team signs off before moving on.
Inventory candidate tools and map permissions
Start by listing the domain actions the AI client should be able to run, such as looking up an order status or drafting a content entry. For each action, record the input it takes, the data it reads or writes, and the Strapi roles or permissions that should allow it. Include actions you will not expose, with the reason. Have the content owner and a security reviewer sign off on the list. The output is a signed-off tool list with required roles, read or write status and data classification for each tool, which becomes the specification for every later step.
Confirm the MCP server and plugin hook points
Before writing code, confirm in your Strapi version how the MCP server is enabled and how a plugin registers tools with it. Check the plugin documentation for your installed release and record the exact registration API, the context the handler receives (authenticated user, role and request metadata) and when registration runs during the application lifecycle. Note whether tools are loaded once at startup or can change at runtime. The output is a short design note that names the registration point, the context fields your handlers can rely on, and the open questions to resolve with the vendor documentation or a test app.
Register tools inside the plugin
Create or extend the plugin so that it registers each approved tool at the lifecycle point confirmed in the previous step. Give every tool a stable name, a clear description written for the AI client, and an input schema that rejects unexpected fields. Keep registration declarative so a reviewer can read the full tool surface in one file. Do not register tools that were excluded in the inventory. The output is a plugin build in which the registered tool list matches the signed-off inventory exactly, verified by starting a test app and listing the tools the server reports.
Implement handlers with server-side permission checks
Write each handler to call existing Strapi services or the Document Service API rather than querying the database directly, so that Strapi's own validation and lifecycle hooks still apply. Inside every handler, check the authenticated user's permission for the specific action and do not rely on the AI client's request or the tool description to enforce access. Return errors that explain the refusal without exposing internal data. Limit output size and remove fields the role cannot read. The output is handler code with a permission check at the top of each tool and a reviewed list of fields returned per tool.
Build a permission test matrix and run tests against a test app
Create a test matrix with one row per tool and one column per role, plus rows for unauthenticated calls, malformed inputs and attempts to pass another user's identifiers. Run the matrix against a test app with seeded content and record expected and actual results for each cell. Add tests for schema rejection, output field filtering and error messages. Repeat the matrix after any role or permission change. The output is a passing permission test matrix stored with the plugin, and a list of any failures with owners and fixes that must close before the next step.
Run a staged session with a real AI client
Connect a real AI client to a non-production Strapi instance that uses the same plugin build, configuration and role setup as production will. Run scripted sessions for each role, including prompts that try to reach tools outside that role, and record every tool call, input, output and refusal in a run log. Confirm that the client sees only the tools its user is allowed to use and that audit logging captures the calls if your plan includes it. Ask the security reviewer to review the log. The output is a recorded run log and a sign-off that the observed behavior matches the permission matrix.
Release with a rollback path and ongoing review
Package the plugin using your normal release process, record the Strapi version it was tested against and document the tool list, roles and configuration in the operations runbook. Deploy to production with the same configuration tested in staging, and confirm the registered tools match the signed-off list after deployment. Plan a rollback that removes the plugin or disables the MCP server without touching content. Schedule a repeat of the permission matrix and the run log when Strapi is upgraded or roles change. The output is a release record, a tested rollback procedure and a dated review entry in the runbook.
How tool behavior changes for reads, writes and bulk actions
Read-only tools look harmless, but they are the most common route for an AI client to reach data it should never see. A lookup can return fields from several content types at once, and the client can call it repeatedly, so the exposure grows with every query. Treat each read as a data disclosure event, not a free convenience.
- Field-level scope: Confirm the tool returns only fields the calling user's Strapi role may read, not every field the plugin can access.
- Result limits: Ask how the tool caps page size and whether it blocks unbounded searches over large content types.
- Draft and unpublished content: Check whether drafts, pending review or restricted locales are excluded unless the caller holds the right permission.
- Logging: Record who ran the lookup, which query or filter was used and how many records were returned, without writing the returned content itself into logs.
- Risk location: The main risk is over-broad reads that expose personal data or unpublished material through an otherwise trusted assistant.
Before approval, run the tool as a low-privilege user and confirm that restricted fields and drafts stay hidden from the response.
A single-record write changes one entry, and that change is what editors and downstream sites rely on. The control question is whether the AI client acts with the authority of the signed-in user or with broader plugin credentials. Writes should pass the same permission checks as the admin panel and the content API for that record.
- Permission check per record: Confirm the tool verifies the caller's rights on the specific content type, locale and status before it writes.
- Input validation: Check that the tool applies the content type's validation rules and rejects fields the schema does not define, instead of passing raw input to the database layer.
- Publish separation: Ask whether creating or updating a draft is separate from publishing, and whether publishing needs its own permission.
- Audit trail: Log the actor, the target document, the changed fields and the before and after state so a bad change can be traced and reverted.
- Risk location: The main risk is a model that rewrites live content it was asked only to draft, often through a prompt that was itself manipulated.
Confirm with a test that an unauthorized caller cannot write, and that every write produces a log entry the security team can query.
Bulk actions and long-running jobs affect many records or external systems in one request, and they may keep running after the AI client has moved on. The risk is less about a single mistake and more about scale, partial completion and the lack of a clear point to stop. Plan for these actions to be bounded, observable and interruptible.
- Explicit scope: Require the tool to name the set of records or the filter it will act on, and reject open-ended requests such as all entries of a type.
- Confirmation step: Ask whether the tool returns a preview or count and needs a second, explicit approval before it runs.
- Progress and status: Confirm the caller can check job state and that partial results are reported, not hidden.
- Rate and concurrency limits: Check how the tool throttles itself so a single prompt cannot saturate the database or exhaust API quotas.
- Risk location: The main risk is a job that continues after the user's session or approval has ended, or that repeats on retry and duplicates changes.
Test a bulk action on a staging copy, interrupt it halfway and confirm the log shows exactly which records changed.
Tools that upload, replace, delete or return files and media carry risks that structured content does not. Files can contain malicious payloads, expose private documents through guessable links, or consume storage without limit. Upload and download paths also tend to sit outside the normal content permission model unless someone designs them in.
- Type and size checks: Confirm the tool validates MIME type, extension and file size against the same rules as the Strapi upload settings.
- Access to returned URLs: Check whether returned media URLs are public, signed or time-limited, and whether the caller's role governs access to private assets.
- Deletion controls: Ask whether deleting a file also detaches it from entries and whether the action needs stronger approval than a text update.
- Logging without content: Record file identifiers, actor, action and size, but do not place file contents or sensitive metadata in logs.
- Risk location: The main risk is an AI client that uploads untrusted material or exposes private files through a URL it was never meant to share.
Confirm the upload limits and URL policy with your platform team, and check how the storage provider you use handles access and deletion before go-live.
Effort drivers for custom MCP tools in Strapi
This table lists the factors that most change the effort of a custom MCP tool build in a Strapi plugin, and how each one moves the work up or down. Read each row as a question to put to a partner: the driver tells you what to scope, and the last column tells you what to ask them to price. No cost or duration figures appear here because none were supplied for this work.
| Driver | Why it changes effort | What to ask a partner to price |
|---|---|---|
| Number of tools | Each tool needs its own input schema, handler, error handling and tests, so effort grows with the count of tools. | Price per tool class (read, write, bulk, file) and whether shared helpers are included |
| Roles and permission combinations | Each tool must check the caller's Strapi permissions, and every role and content type pair is a case to test. More roles multiply the test matrix. | Number of roles in scope, and whether a permission matrix is delivered as a test artifact |
| Write access to content | Tools that create, update or publish entries need validation, draft and publish handling, and audit-friendly logging. Read-only tools are simpler to verify. | Whether write tools are included, and how publish and delete actions are gated |
| Bulk or file actions | Bulk operations need limits, partial-failure handling and timeouts. File actions touch the media library and need upload checks and size limits. | Batch size limits, file type rules and any rate limiting work |
| Strapi versions to support | A plugin built for one Strapi 5 release may need changes for another. Supporting several releases adds a compatibility build and test run for each one. | Which Strapi 5 releases must be covered and how upgrades are handled after launch |
| Existing plugin tests | If the team already tests the plugin server and permission code, new tools plug into that harness. Without tests, the harness must be built first. | Whether the test harness is built as part of the scope or assumed to exist |
| AI clients to verify | Each MCP client may discover, call and display tools differently. Verification covers tool listing, argument handling and error messages per client. | Named list of clients and the verification depth for each one |
How MCP tools connect to SSO, roles and other platform parts
A custom MCP tool sits at the meeting point of identity, content access, plugin code and delivery. Each connection below decides who can run the tool, what data it touches, and whether the change can be traced and rolled back.
Admin SSO and caller roles
When an administrator signs in through an identity provider, Strapi maps that person to an admin role, and that role governs what their session can reach. Tool calls made from an administrator's AI client inherit those permissions, so the role is the first check to design. SSO applies only to administrator login to the admin panel, so do not assume it covers the people or agents that call tools on behalf of end users. Confirm the SSO add-on or Enterprise plan on the Strapi self-hosted pricing page before you plan around it.
Strapi SSO docsUsers and Permissions for end-user contexts
Tools that serve end users rely on the Users and Permissions plugin, not admin SSO. Decide whether a tool runs with a public role, an authenticated role, or only with administrator context, and write that rule into the tool's permission check. A tool that is open to the public role can expose data that the admin panel would never show. Test the same tool with each role before release.
Plugin content types and services
Most useful tools call the plugin's own services, which hold the domain logic and enforce business rules. Keep tool handlers thin and delegate to these services so the same checks apply whether a call comes from the admin panel, a route or an MCP client. Review each service method a tool can reach, because a tool that calls a service directly skips any guard placed only on the route.
Document Service for content access
Content reads and writes from a tool should go through the Document Service API rather than older query paths, since Strapi 5 uses it as its content interface. Limit each tool to the content types and fields it needs, and check draft and published status explicitly. Ask your team to confirm which Document Service calls a given tool will make and whether they respect the same permissions as the admin UI.
Audit logs and tool call traces
Record which identity invoked each tool, the arguments that matter, the outcome and any content changed. Audit logs are an Enterprise feature in Strapi's self-hosted plans, so confirm that your plan provides them, or add application-level logging in the plugin. Without this record, a change made through an AI client is hard to attribute during an incident or a compliance review.
Deployment pipeline for plugin releases
The plugin reaches production through the same pipeline as the rest of the Strapi project, so tool definitions, permission rules and schema changes should ship together and roll back together. Use staging with the same Strapi version and database engine before release. Check that the Node.js version and database versions in staging match production, since Strapi 5 supports a defined set of both.
Questions teams ask before building MCP tools in Strapi
What does it cost to build custom MCP tools in Strapi?
The cost depends on how many tools you need, how much domain logic sits behind each one, and how much permission and audit work the tools require. Most of the spend is engineering time: designing tool inputs and outputs, writing the server-side logic that runs each action, testing it against your roles, and documenting it for the teams that will call it. There are also recurring costs to plan for, including retesting after Strapi upgrades and maintaining the tools as your content model changes. Strapi's own licensing is a separate line. The Community Edition is free, and the self-hosted pricing page lists the Growth and Enterprise plans for teams that need the features discussed below. Ask any partner for a quote that separates one-time build work from ongoing support, and ask which tools are in scope.
How long does an MCP tool build take?
Duration is set by the number of tools, the complexity of the actions they perform, and how many environments and roles must be verified. A single read-only tool that wraps an existing service is a much smaller job than a set of write actions that change published content and must respect editorial review. Time also depends on how quickly your team can answer questions about the domain rules, approve the tool contracts, and provide a test Strapi instance that matches production. No supplied figure gives a standard duration, so ask for a timeline built from a written scope with named tools and acceptance checks.
What does our team need to provide for an MCP tool project?
The team needs to supply the business rules behind each action, a list of the users and roles that should be able to call each tool, and access to a non-production Strapi instance running the same version and database as production. You will also need a named owner who can approve tool names, input schemas and error behavior, and someone who can review how each tool records its actions. If the tools call external systems, provide sandbox credentials and API documentation for those systems. Check the plugin's Strapi version target early, because the tools will be tied to the Strapi release they are built against.
Can our in-house team build Strapi MCP tools without a partner?
Yes, if your team already has Strapi plugin development experience and someone who understands both the MCP tool contract and your permission model. The work sits in the plugin's server code, so backend engineers familiar with Strapi's Document Service API and plugin lifecycle can handle it. The risks to weigh are the time needed to learn how AI clients call tools, the testing effort for permission boundaries, and the ongoing responsibility for upgrades. A partner is useful when you need the tools reviewed by an outside team before an AI rollout, or when you want the build and the retest handled together. Decide which of these fits your team's capacity.
How do we test permission checks on MCP tools?
Test every tool with at least one identity per role, including roles that should be denied, and confirm that denied calls fail without returning data or changing content. Run the same test against the admin and end-user paths, since the permissions that apply to an AI client may differ from those used by the admin panel. Check that each tool validates its inputs, that errors do not leak internal details, and that write actions are logged with the acting identity. Record the results so a later Strapi upgrade can be compared against them. If your organization needs independent evidence, plan a security test of the tools rather than relying only on developer tests.
What happens to custom MCP tools when Strapi is upgraded?
Tools can break during an upgrade if the Strapi APIs they call change, so every Strapi minor release needs a regression pass on the tool suite. Strapi 5 minor releases ship frequently. The release history lists v5.56.0 on September 30, 2026, v5.57.0 on October 7, 2026 and v5.58.0 on October 14, 2026, which means a pinned version can fall behind quickly. Check the release notes for each target version, rerun your permission tests, and confirm that the tool contracts still match what AI clients expect. Also plan for the v4 to v5 path if any project still runs Strapi 4, since v4 reached end of life on April 30, 2026.
Do custom MCP tools in Strapi require an Enterprise license?
Not necessarily. Strapi's Community Edition is licensed under the MIT Expat license, and code under the ee directories is the Enterprise Edition under a separate Strapi license. A plugin that lives entirely outside those directories does not depend on Enterprise code, but you must confirm which Strapi modules and features your tools call, because some admin features such as audit logs and review workflows sit on the Enterprise plan. Read the LICENSE file in the Strapi repository and the self-hosted pricing page before you design tools that depend on those features. Get written confirmation from your legal or procurement team before the build starts.
Which Strapi plan do we need to support audit trails for MCP actions?
Audit logs are an Enterprise feature in Strapi's self-hosted plans, so if your compliance team requires Strapi-level audit logs for actions taken through the admin, plan for that tier. Custom MCP tools can still write their own audit entries from the plugin, but those entries are only as trustworthy as the code that writes them, so they should be designed, tested and reviewed like any other control. Confirm the plan required with Strapi's pricing page and with your own compliance requirements before deciding whether to rely on built-in logs, plugin-level logs or both.
How DeployOpen scopes and delivers MCP tool work in Strapi
DeployOpen treats custom MCP tools in Strapi as part of the plugin and the security review, not as a bolt-on. The work starts with a written scope that names each tool, the actions it performs and who may call it, then builds, tests and documents those tools inside your own Strapi deployment.
How we scope
- Inventory the domain actions AI clients should run, and mark which ones read data and which change it
- Agree in writing which Strapi roles and permission checks each tool must respect before any code is written
- Confirm the Strapi version, Node.js version and hosting model so tool registration matches your environment
How we build
- Build the tools inside a plugin using the Plugin SDK, with server-side permission checks on every call
- Test tool registration timing against your Strapi startup sequence and confirm each tool loads on first start
- Run security tests on tool inputs, returned data and credential handling before the MCP server is exposed to clients
How we hand over
- Deliver the plugin source, build and verification steps, and a list of every registered tool with its permissions
- Document how to add, change or remove a tool, and which Strapi version the plugin was verified against
- Provide a retest record for the tools so your team can repeat the checks after upgrades
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts
- Ongoing support, upgrades and continuous testing for MCP tools are available as a retainer
- Ask any partner to confirm how tool changes are reviewed and released before quoting ongoing work

