Architecture

MCP Server for a CMS: Plain-English Guide for Laravel Developers

By Lara Dashboard 1 view
MCP Server for a CMS: Plain-English Guide for Laravel Developers
You keep hearing that your CMS "needs an MCP server". Claude, Cursor and other AI clients can connect to one, and suddenly an agent can list your posts, draft a new one or check a support queue. But what is an MCP server for a CMS, in plain terms? And what should a Laravel developer look for before turning one on?
Here is the quick answer. An MCP server is a small, well-defined API that AI clients know how to read. It tells the client which actions exist, what inputs each one takes, and who is allowed to call them. For a CMS, those actions are things like "list posts", "create a draft" or "upload an image". The AI does not get your database. It gets a menu of named tools, and every call goes through the same permission checks as a human user.
A quick disclosure. We build Lara Dashboard, an MIT Laravel CMS that ships an MCP server, so we use it as the worked example. The concepts apply to any CMS. Protocol facts below come from the official MCP specification and Laravel docs as of November 2026.

MCP is a contract between an AI client and your app

MCP stands for Model Context Protocol. It is an open protocol, documented at modelcontextprotocol.io, for connecting AI applications to outside systems. There are two sides.
The client. This is the AI app: Claude.ai, Claude Desktop, Claude Code, Cursor, or your own script. It asks the server what it can do, shows those options to the model, and sends the calls the model decides to make.
The server. This is your app, or a thin layer in front of it. It answers "what can I do?" with a list of capabilities, then runs the calls it receives and returns results.
Messages use JSON-RPC. A remote server usually speaks the Streamable HTTP transport, and a local one can run over stdio as a command on your machine. As of November 2026, the current specification revision is 2026-07-28, which made the protocol stateless and removed protocol-level sessions. You rarely handle these details yourself, because SDKs do it for you. In Laravel, that SDK is the official laravel/mcp package.

A CMS server mostly exposes tools, not your whole database

An MCP server can offer three kinds of things. The Laravel MCP docs list the same three.
PrimitiveWhat it isCMS example
ToolsActions the model can call with typed inputslist-posts, create-post, upload-media
ResourcesRead-only data the client can load as contextA style guide or a page of docs
PromptsReusable prompt templates the user can pick"Write a release note from this changelog"
For a CMS, tools do most of the work. Each tool has a name, a description written for the model, and a JSON schema for its inputs. When the client connects, it reads that list. The model then picks a tool and fills in the arguments, much like a developer reading API docs.
This is the key difference from giving an AI raw database access or a shell. The model can only do what a tool allows, with inputs the schema accepts. If there is no delete tool, nothing gets deleted. If the schema caps a page size at 50, the model cannot ask for 10,000 rows.

What Lara Dashboard's MCP server actually exposes

Lara Dashboard ships its MCP server at /mcp, built on laravel/mcp and registered with Mcp::web() in routes/ai.php. It is off by default. You switch it on under Settings, then MCP. While it is off, /mcp and the OAuth endpoints return 404.
As of the v1.5.0 codebase, the server exposes tools only, with no resources or prompts. Core ships 25 tools in app/Mcp/Tools, in groups such as Content, Email, Operations, Modules and Discovery. A few examples:
  • Posts and terms: list-posts, get-post, create-post, update-post, delete-post, list-terms, assign-post-terms, generate-seo-meta
  • Media: list-media, upload-media, create-media-upload, finalize-media-upload, attach-featured-image
  • Overview and operations: get-daily-briefing, get-site-health, clear-cache, list-logs, get-log-tail
  • Discovery: list-mcp-tools, list-modules
Modules can add their own tools through the filter.mcp.tools filter hook, so they never have to edit core. When the CRM module is installed, for example, tools for contacts, deals and tickets appear in the same list. Our post on Laravel hooks and filters shows how those filters work.
Each tool is a normal PHP class. It extends Laravel\Mcp\Server\Tool, declares a name and description with attributes, validates input with Laravel's validator, and returns a JSON response. If you have written a controller, you can read one.

Permissions decide what an agent can do, not the prompt

A good CMS MCP server never trusts the model to behave. It checks permissions on every call. In Lara Dashboard, every tool checks two things before it runs.
Token ability. The token must carry the right MCP ability, such as mcp:posts.read or mcp:posts.write. If it does not, the tool returns an error.
User permission. The user behind the token must also hold the matching Laravel permission, such as post.view or post.create. These are the same spatie/laravel-permission roles your human editors use.
Abilities are calculated from the user's permissions when a token is created. An editor's token cannot activate modules, because an editor cannot activate modules in the admin either. This is why we tell teams to connect agents as a dedicated, limited user, not as the superadmin. Our guide to role-based access control in Laravel covers how to set up those roles.

Authentication comes in two shapes: bearer tokens and OAuth

An MCP server on the open web needs authentication. The Laravel MCP docs describe OAuth 2.1 with Passport, Sanctum tokens, or custom middleware. Lara Dashboard uses Sanctum for its tokens and adds its own OAuth layer on top, so clients can connect in two ways.
Agent tokens. You generate a token under Settings, then MCP, then Agent tokens. Clients that can send headers, such as Cursor, Claude Desktop, Claude Code or a script, pass it as an Authorization: Bearer header. This is simple and works everywhere.
OAuth. Some clients, such as Claude.ai custom connectors, cannot send custom headers. Since v1.5.0, they connect with just the URL. The client gets a 401 pointing at the protected resource metadata, registers itself, and opens a consent screen in your browser. You sign in and click Allow. PKCE with S256 is required, access tokens last 60 minutes, and refresh tokens last 30 days and rotate on every use. Reusing an old refresh token revokes the whole grant. We covered the release in Lara Dashboard v1.5.0: Claude.ai OAuth MCP.
Either way, the result is the same kind of credential, with abilities that follow the user's permissions. You can revoke an OAuth connection from the same token list.

MCP does not replace your REST API

It is easy to think "we have MCP now, so we don't need an API". That is a mistake. They solve different problems.
A REST API is for software you write: a mobile app, a front end, an integration with another system. It needs versioning, stable responses and docs. Lara Dashboard's API uses Sanctum with Scramble for OpenAPI docs, which we compared in REST API first: WordPress vs Laravel with Sanctum and Scramble.
An MCP server is for AI clients operated by people. Its tool descriptions are written for a model. Its job is to help someone get a task done in conversation, like "draft a post from these notes and tag it Security". Keep both. Let them share the same services underneath so the rules stay in one place.

Trade-offs and when not to turn MCP on

MCP is useful, but it adds a new way into your app. Be honest about the costs before you switch it on.
It is another attack surface. An agent with a write token can do real damage if the prompt is wrong or a page it reads contains hidden instructions. Scope tokens tightly and keep a human approval step for publishing, sending email and deleting.
Models make mistakes. An agent can pick the wrong post ID or write a weak excerpt. Read what it drafted before it goes live. Our post on MCP with a small human in the loop describes a simple review habit.
The spec still moves. The 2026-07-28 revision changed sessions and deprecated some features. It also deprecated Dynamic Client Registration in favour of Client ID Metadata Documents, though it stays available for compatibility. Lara Dashboard's OAuth flow uses Dynamic Client Registration today. Expect SDK and client updates over the next year.
Your web server can get in the way. Some nginx configs block every path that starts with a dot. OAuth discovery needs /.well-known/ to reach Laravel, so check that before you blame the client.
Skip MCP for now if nobody on the team uses an AI client daily, if you cannot spare a limited user account for agents, or if your site is static and rarely changes. A CMS without MCP is still a good CMS.

Self-check before you connect an agent to your CMS

  1. Is the MCP server off by default, and do you know where to turn it off again?
  2. Does every tool check a permission on every call, not just at connect time?
  3. Will the agent connect as a dedicated user with the smallest role that works?
  4. Can you list exactly which tools that token can use?
  5. Are publish, send and delete gated by a human, either by token scope or by team rule?
  6. Can you revoke a token or OAuth grant in one click?
  7. Do access tokens expire, and do refresh tokens rotate?
  8. Is the /.well-known/ path reachable through your web server?
  9. Do you log what agents changed, so you can review it later?
If you can answer yes to most of these, you are ready to try one agent on drafts. Start with read-only tools, then add write tools once you trust the flow.

Verdict

An MCP server for a CMS is not magic. It is a typed menu of actions that AI clients understand, guarded by the same roles and permissions you already use. The questions that matter are simple: which tools exist, who can call them, and how you revoke access. If your Laravel project already needs content, media and roles, and you want Claude or Cursor to help with daily work without a custom integration, try Lara Dashboard. Turn MCP on, connect a limited user, and ask an agent to list your drafts. For a hands-on walkthrough, read AI agents on your CMS with Cursor and Claude.

FAQ

What is an MCP server in simple terms?

It is a service that tells AI clients what actions they can take in your app and runs those actions when asked. Each action is a named tool with a typed input schema. The client discovers the tools, and the model decides which one to call.

Does an MCP server give the AI access to my database?

Not directly. A well-built server only exposes the tools you write, and each tool decides what data it reads or changes. In Lara Dashboard, every tool also checks a token ability and a user permission before it runs.

Is MCP only for Claude?

No. MCP is an open protocol. Claude.ai, Claude Desktop, Claude Code and Cursor are common clients, and you can write your own client with an official SDK.

Do I need Laravel Passport to build an MCP server in Laravel?

No. The laravel/mcp docs recommend OAuth 2.1 through Passport for wide client support, but also support Sanctum tokens and custom middleware. Lara Dashboard uses Sanctum tokens plus its own OAuth endpoints, so it does not require Passport.

Can modules add their own MCP tools?

Yes, in Lara Dashboard. Core passes its tool list through the filter.mcp.tools filter hook, so a module can add its own tool classes. With the CRM module installed, for example, contacts, deals and tickets tools show up alongside the core ones.

Is it safe to let an agent publish posts?

It can be, with care. Use a limited user, scope the token, and keep a human review step before publishing until you trust the workflow. Revoke the token if anything looks wrong.
Laravel CMS Open source laravel authorization laravel access control

Try Lara Dashboard for Free

Explore every feature live — no sign-up required.

Launch Live Demo