shel / neos-mcp
MCP server components for interaction with the Neos Content Repository, built on Sitegeist.Pandora. Gives an AI agent a seat in the Neos team: a user of its own, a role with defined privileges, a personal workspace and the review workflow of the editors, enforced by the policies of Neos.
Requires (Dev)
- editorconfig-checker/editorconfig-checker: ^10.0
- mikey179/vfsstream: ^1.6
- neos/behat: ^8.3
- neos/buildessentials: ^8.3
- neos/neos: ^8.3
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^11.0
- squizlabs/php_codesniffer: ^3.4
- symfony/css-selector: ~2.0
Suggests
- shel/neos-workspace-module: Adds the private workspaces that the user of the agent has been given access to to the list-workspaces listing. Without it, only the workspaces of Neos itself are known and the listing says so.
Provides
None
Conflicts
- sitegeist/slopmachine: *
Replaces
None
This package is auto-updated.
Last update: 2026-12-01 18:12:16 UTC
README
An AI agent that works in the content repository like a colleague: with a user of its own, a role with defined privileges, a personal workspace and the review workflow of the team.
This package turns an AI agent into a team member of a Neos installation: it gets a Neos user of its own, a role with defined privileges, a personal workspace, and the same review workflow an editor follows. Everything the agent may do is decided by the policies of Neos - the same mechanism that governs every human account - and not by anything in the agent.
The agent works in its own personal workspace, hands finished work over to a shared review workspace that humans review and publish, and it never publishes to the live workspace. Every capability it has is a separate privilege, so an installation decides what the agent may do - and what it may not.
Use it when AI should work on your content without becoming its own publisher: the agent edits like a colleague, and your editors approve like they always have.
The package does not decide how the agent authenticates: the installation does. The setup below uses a bearer token, which is what this repository uses.
The agent as a team member
The point of the package is not that an agent can talk to the content repository - it is that the agent occupies a place in the team and is bound by the same rules as everybody else in it.
| In the team | The agent |
|---|---|
| An account with a role | A Neos user with a token, and the role Shel.Neos.Mcp:McpAgent (read-only) or Shel.Neos.Mcp:McpAgentWithWriteAccess |
| A personal workspace nobody else may read | The personal workspace of that user - the changes stay private until the agent hands them over |
| A handover into a shared workspace for review | PublishOwnWorkspace into the shared review workspace |
| A topic branch, so nobody overwrites anybody | A topic workspace (CreateTopicWorkspace, RebaseOwnWorkspace) - two agents, or an agent and an editor, work on different topics at the same time |
| House rules from onboarding | The instruction providers of the package and the instructions the administrators write in the backend module "Agent instructions" |
| Rights that can be withdrawn | The token is revoked and the role is changed - a capability that is not granted is not merely denied, it is invisible to the agent |
For the editors of the installation none of this changes their workflow: the agent is another workspace that produces changes to be reviewed, and the review happens where it always happens - in the shared review workspace, with the preview of the document and the usual publish to live.
A typical work cycle
This is the workflow the agents are instructed with - told from the outside, it looks like this:
- Somebody gives the agent a task - a brief, a list, a file.
- The agent works in its own workspace. Nothing of it is visible on the site, and nothing of it is visible to the other users.
- When a coherent unit is done - a finished page, not every single node edit - the agent
hands that package over with
PublishOwnWorkspace. It publishes into the workspace it is based on: the shared review workspace, or the topic workspace while it works on a topic. - The editors review the changes in the shared review workspace, open the preview of the document and publish to live. The preview URL the agent shares with them is the one of the review workspace - the preview of its own workspace is private to the agent and must not be sent to anybody.
- Corrections travel the same way: the agent changes its own workspace and publishes again, and the publish replaces what it handed over before. It does not edit the review workspace itself - publishing is the only way for it to put content in there.
For a topic the agent rebases its own workspace onto the topic workspace before it starts: the changes it has made so far stay in its workspace, but they are relative to the new base from then on.
What you can use it for
The package does not prescribe a use case - it gives an agent the rights and the workspaces for the use cases of the installation. The ones that pay off in practice:
- Audits with a read-only agent. Missing alt texts, inconsistent teasers, empty SEO fields, questions about the structure: the agent reads and reports, and it cannot write at all, because the write capabilities are not granted.
- Editorial bulk work. Heading structures, metadata, moving and restructuring node trees
BulkWritingandMoveNodedo it in one validated batch.
- Pages from structured input. Product lists, locations, glossary terms: the agent creates the nodes with the node types of the installation, and the validators of the node type reject what does not fit.
- Language and dimension variants. The agent is instructed about the fallback chains of the dimension presets, so it writes into the variant that is asked for.
- Media. Uploads go into one asset collection and carry a tag, so every asset an agent brought in is easy to find and to clean up.
Why an agency can offer this to a customer
- No new security model. Access is Neos roles and policies, the review is the Neos workspace model. The integration adds no new place where content or credentials live.
- The human in the loop is enforced. Publishing to live is denied by the policy
Neos.Neos:Backend.PublishToLiveWorkspace- in the policies of the installation and covered by the tests of the package, not in a prompt. - A gradual path. Every customer starts on the read-only role, the write access is
granted per project, and a capability that is not needed is taken away again - with
capability:listthe agency sees exactly what a role unlocks. - Several agents per installation. Topic workspaces let an agency run more than one agent per installation without them writing over each other, while the editors keep reviewing in one place.
- Governance without code. The module "Agent instructions" holds the house rules per role, and the capabilities of the package hide themselves when they are not granted.
- Audit. Every handover is a workspace diff, every upload carries a tag, and the agent is a named account in the backend.
The workspaces
| Workspace | Who works in it | What it is |
|---|---|---|
user-<agent user> |
the agent | the personal workspace of the Neos user the agent is assigned to - the changes of the agent live here |
| the shared review workspace | humans | the workspace the agent hands its work over to; humans review it and publish it to live |
| a topic workspace | the agent, then humans | a branch of the shared review workspace, one per topic - so two agents on different topics do not write over each other |
The agent addresses its own workspace with the regular read and write tools. It cannot address the live workspace or the workspace of another agent.
The workspaces the agent may see
The list-workspaces capability tells the agent which workspaces exist and which of them it may
work in. It lists every workspace the user role of the agent may see - the internal workspaces
(the shared review workspace and the topic workspaces are internal workspaces) and the
workspaces of the Neos user the agent is assigned to - with the title and the description of
each one, and never the live workspace.
Every entry says whether the agent may read the content of the workspace and whether it may work in it, that is, whether it may base its own workspace on it. Only the shared review workspace and its topic workspaces are workspaces the agent may work in; the reason is part of every entry, so the agent does not have to guess why a workspace is refused.
The identity the visibility is checked against is the Neos user the agent is assigned to, not the account the agent authenticates with: the account is a token without a Neos user, and a check against it would keep the agent from seeing even its own personal workspace.
The personal workspace of another user is closed: the privilege that would open it is granted to nobody in Neos. It is in the list only when it has no owner, because a workspace without an owner is shared with every editor - that is the rule the workspace module applies, and the listing follows it.
The workspace module is optional. The private workspaces that the user of the agent has been
given access to are known to the workspace module only, so they are listed when that module is
installed and skipped when it is not; the listing then reports workspaceSharingKnown: false,
and the agent knows that the list may be incomplete. The package suggests the module in its
composer.json and does not require it.
Installation
composer require shel/neos-mcp
The package pulls in sitegeist/pandora, the MCP server for Neos Flow, which exposes the
endpoint /mcp of the installation. Pandora is not on Packagist yet, so the root
composer.json of the project needs an entry for it - composer ignores repository
declarations of required packages, integrators have to add it themselves:
"repositories": [ { "type": "vcs", "url": "https://github.com/sitegeist/Sitegeist.Pandora.git" } ], "require": { "sitegeist/pandora": "dev-main as 1.0.0" }
(The package's own composer.json carries the repository entry, so installs of the package
as a standalone project work; the as 1.0.0 alias is needed because Pandora has no tagged
versions, and projects with the default minimum-stability would not accept dev-main
otherwise.)
For the bearer token authentication of the setup below:
composer require flownative/token-authentication
Apply the database migrations - the package has two tables: the assignment of an agent to a Neos user, and the additional instructions the administrators write:
./flow doctrine:migrate
Setup
1. The shared review workspace
The workspace the agent hands its work over to. Its name goes into the settings - Neos
generates names like ki-review-a1b2c for a workspace titled "KI Review", and the content
repository addresses workspaces by name:
# Configuration/Settings.yaml Shel: Neos: Mcp: agent: sharedWorkspace: 'ki-review-a1b2c'
The workspace is created by the command of the package, which reads the name from the settings - so the command cannot set up a workspace the agent would not use:
./flow agent:createsharedworkspace
The workspace is based on live, because a human reviews it and publishes it: the agent never
publishes anything itself.
2. The Neos user the agent works as
./flow agent:createuser
The command creates the user mcp-agent if it does not exist yet, assigns the role
Shel.Neos.Mcp:McpAgent to it, and bases its personal workspace on the shared review
workspace - only then does the agent see what the humans are reviewing, and its own diff is
exactly the handover diff.
The account is a machine identity: it gets a random password that is never printed. The agent authenticates with a token, never with a password, and the role of the agent denies the backend login on top of that.
3. The token
./flow hashtoken:createhashtoken --role-names "Acme.Ai:McpAgent" --label "MCP agent" --expires-at "2027-01-01"
The role named here is the role of the account the token authenticates - not the role of the Neos user from step 2. The token is the only credential of the agent; treat it like a password.
4. The assignment
The token identifies the agent, and the assignment says which Neos user it works as:
./flow agent:assigntouser --agent-id "<the token>" --username "mcp-agent"
The agent works in the personal workspace of that user, and the policies of Neos treat it as its own - see step 7.
5. The authentication provider
The token authenticates the MCP endpoint. Without a provider bound to the controller, requests
to /mcp stay Neos.Flow:Anonymous and the privilege of the endpoint is never granted:
# Configuration/Settings.yaml Neos: Flow: security: authentication: providers: 'Acme.Ai:McpTokenAuthenticator': provider: Flownative\TokenAuthentication\Security\HashTokenProvider token: Flownative\TokenAuthentication\Security\HashToken requestPatterns: 'Sitegeist.Pandora:McpController': pattern: ControllerObjectName patternOptions: controllerObjectNamePattern: 'Sitegeist\Pandora\Controller\McpController'
No entry point is configured on purpose: an unauthenticated request has to fail rather than being redirected to a login form, which an MCP client cannot follow.
The second request pattern is for the preview of a document (step 8). It is the same type as the one above on purpose: a request pattern is active when at least one pattern of its type matches, so a second type would have to match as well - and the token would never be active at all.
The MCP endpoint is protected against DNS rebinding. The host names it may be addressed under are configured per installation:
# Configuration/Settings.yaml Sitegeist: Pandora: http: allowedHosts: - 'example.com'
6. The policy of the agent
Every capability is deny-by-default: the role of the account names the capabilities it may
use, and a capability that is not granted is silently hidden from the agent. The list of the
capabilities of this package is in the header of the Policy.yaml of the package - and
./flow capability:list --role "Acme.Ai:McpAgent" shows what a role unlocks.
The package ships two roles for the agent, so an installation does not have to name the capabilities itself:
| Role | What it grants |
|---|---|
Shel.Neos.Mcp:McpAgent |
the read-only baseline: everything that only reads |
Shel.Neos.Mcp:McpAgentWithWriteAccess |
the baseline plus the capabilities that create, change or remove content |
An installation that lets its agent write grants the second one - either directly, or through a role of its own that inherits from it:
# Configuration/Policy.yaml roles: 'Acme.Ai:McpAgent': label: 'MCP Agent' description: 'Lets a token-authenticated agent drive the content repository over /mcp' # The capabilities of the agent and the workspace access. The role of the package inherits # from Neos.Neos:RestrictedEditor, which grants the access to the internal workspaces - the # shared review workspace and the topic workspaces - and nothing else, so a leaked token # does not become a backend editor. parentRoles: ['Shel.Neos.Mcp:McpAgentWithWriteAccess']
An installation that wants the agent to read and nothing else inherits from
Shel.Neos.Mcp:McpAgent instead. A role of its own is only needed when the agent
shall have more or less than the package grants - for example when the agent may not remove
content, in which case the writing capabilities are granted one by one, as the header of the
Policy.yaml of the package lists them.
# Configuration/Policy.yaml roles: 'Acme.Ai:McpAgent': label: 'MCP Agent' description: 'Lets a token-authenticated agent drive the content repository over /mcp' parentRoles: ['Shel.Neos.Mcp:McpAgent'] privileges: # No login with a password: the agent is authenticated by a bearer token. - privilegeTarget: 'Neos.Neos:BackendLogin' permission: DENY # The endpoint itself. - privilegeTarget: 'Sitegeist.Pandora:MCP' permission: GRANT # The preview of a document is a frontend request, so it needs the privilege of the # frontend - and the account of the agent has no Neos role that would grant it. - privilegeTarget: 'Neos.Neos:ContentPreview' permission: GRANT # Reading - privilegeTarget: 'Shel.Neos.Mcp:Capability.Tool.find-children' permission: GRANT - privilegeTarget: 'Shel.Neos.Mcp:Capability.Tool.find-descendants' permission: GRANT - privilegeTarget: 'Shel.Neos.Mcp:Capability.Tool.find-subtree' permission: GRANT - privilegeTarget: 'Shel.Neos.Mcp:Capability.Tool.dimensionspace' permission: GRANT # ... one entry per capability, see ./flow capability:list
The capabilities of this package:
| Capability | What it does |
|---|---|
find-children, find-descendants, find-subtree |
read the content graph of the own workspace |
find-content, find-documents |
the content of one document, the documents below one |
nodetype-full-schema, nodetype-basic-schema |
the schema of a node type |
dimensionspace |
the dimension space points the installation allows |
search-sites, list-site-urls |
the sites and the URLs they are reached under |
query-patterns |
how to encode the parameters of the read tools |
find-asset-collections, find-tags, find-types, find-assets |
read the media |
upload-asset |
upload a file into the media collection |
CreateNodeAggregateWithNode, SetNodeProperties, SetNodeReferences, BulkWriting, MoveNode |
write content |
ListUnpublishedChanges |
what the agent has changed in its own workspace |
list-workspaces |
the workspaces the agent may see, and the ones it may work in |
DiscardChanges |
revert the changes of the agent |
RemoveNode |
remove content the agent has created |
PublishOwnWorkspace |
the hand-over into the shared review workspace |
CreateTopicWorkspace, RebaseOwnWorkspace |
the branch of the shared review workspace |
find-children-in-shared-workspace, find-descendants-in-shared-workspace |
read the workspace the agent hands over to |
RemoveFromSharedWorkspace |
remove content from the workspace the agent hands over to |
PreviewDocument |
the preview URLs of a document: the private one of the own workspace and the shareable one of the review workspace |
7. The user information of the policies
The policies of Neos compare the owner of a workspace with current.userInformation.backendUser
- the Neos user of the authenticated account. The account of the token has no Neos user of its own, so without this the personal workspace of the agent would look like the personal workspace of somebody else, and it would be closed: the rule that protects the personal workspaces of other users is granted to nobody.
# Configuration/Settings.yaml Neos: Flow: aop: globalObjects: userInformation: Shel\Neos\Mcp\Security\AgentAwareUserService
The service answers with the user the agent is assigned to when the current account is a token account, and behaves like the Neos user service for every other account.
Where this setting goes matters. It has to be merged after the settings of the Neos.Neos
package, which define the default - and the settings of a package are merged before the
settings of the application package. So it belongs in the settings of a distribution package
or in the application level Configuration/Settings.yaml, not in the settings of this package.
8. The client
The client connects to the endpoint of the installation and sends the token:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"my-mcp": {
"type": "remote",
"url": "https://example.com/mcp",
"enabled": true,
"oauth": false,
"headers": {
"Authorization": "Bearer <the token>"
}
}
}
}
9. The preview of a document
PreviewDocument returns two preview URLs - the rendered page, not the content of the document.
ownWorkspacePreviewUrl shows the unpublished changes of the agent. It is private: it is the
personal workspace of the agent, and the policies deny other users the personal workspace of
another user. Do not send it to a person.
reviewWorkspacePreviewUrl is the link a human opens: it shows the workspace the agent hands its
work over to - the shared review workspace, or the topic workspace while it works on a topic. It
contains only what the agent has already published there, and the human has to be logged into the
Neos backend. A personal workspace of the agent that is based on live has no review workspace,
so the review URL is not part of the result then.
The preview is a frontend request, and the agent fetches it with its token; without it the frontend answers with the login page instead of the page. The token is never part of a shared link:
curl -H "Authorization: Bearer <the token>" "<the url>"
The preview of a personal workspace of another user is denied by the policies.
The commands
| Command | What it does |
|---|---|
./flow agent:createuser [--username "mcp-agent"] |
the Neos user the agent works as |
./flow agent:assigntouser --agent-id "<token>" --username "<user>" |
which Neos user the agent works as |
./flow agent:createsharedworkspace [--workspace "<name>"] |
the shared review workspace |
./flow capability:list [--role "<role>"] |
the capabilities and what a role unlocks |
./flow instructions:show --roles "<roles>" |
the instructions the agents of a role are told |
The instructions
The agents are told what they may do by the instruction providers of this package and of Sitegeist.Pandora. They are assigned per role:
# Configuration/Settings.yaml Sitegeist: Pandora: instructions: 'Acme.Ai:McpAgent': contentRepository: 'Shel\Neos\Mcp\Domain\ContentRepositoryInstructionsProvider' sharedWorkspaces: 'Shel\Neos\Mcp\Domain\SharedWorkspaceInstructionsProvider'
The administrators of the installation add their own instructions in the backend module
"Agent instructions" - the module is granted to Neos.Neos:Administrator by the Policy.yaml
of this package.
What the policies enforce
The capabilities of this package run under the policies of Neos - none of them disables the authorization checks. The policies are therefore the boundary, not the code of the tool:
- the agent reads and writes in its own personal workspace, in the shared review workspace and in the topic workspaces - the internal workspaces it is based on;
- the personal workspaces of other users are closed;
- publishing to the live workspace is denied by
Neos.Neos:Backend.PublishToLiveWorkspace; - the backend of the installation is closed, the account of the agent has no privilege for it.
The live workspace is public content - anybody may read it, the agent included. The tools of the agent do not address it.
A capability can only narrow this down further: the tools address the workspace of the agent by construction, no argument of a tool can select a workspace.
The privileges of the content repository are not declared in most installations, so the boundary is per workspace, not per node. Declaring the node privileges of Neos makes the boundary finer - that is a project of its own.
Configuration
| Setting | Default | What it does |
|---|---|---|
Shel.Neos.Mcp.agent.sharedWorkspace |
~ |
the name of the workspace the agent hands its work over to; unset disables the shared workspace tools |
Shel.Neos.Mcp.agent.media.collectionTitle |
MCP Uploads |
the asset collection every upload goes into |
Shel.Neos.Mcp.agent.media.maxFileSize |
5242880 |
the largest accepted upload, in bytes |
Shel.Neos.Mcp.agent.media.allowedMediaTypes |
images and PDF | the media types that may be uploaded |
Shel.Neos.Mcp.agent.media.tagLabel |
mcp-upload |
the tag every upload carries, so agent uploads are easy to find |
Development
composer lint # phpcs and phpstan vendor/bin/phpstan analyse -c phpstan.neon
The tests
The tests are functional tests: they run against a content repository and let the policies of Neos decide what the agent may do. They need an installation with Neos - a Flow installation is not enough, because the content repository and the node types come with Neos:
FLOW_CONTEXT=Testing bin/phpunit --colors -c Build/BuildEssentials/PhpUnit/FunctionalTests.xml Packages/Application/Shel.Neos.Mcp/Tests/Functional/
What they hold:
- the agent may read its own personal workspace and the shared review workspace,
- the agent may not read the personal workspace of another user,
- the agent may not publish to the live workspace,
- the agent may not log in with a password,
- the agent may not reach its own workspace without the assignment of the agent to a user,
- a capability that is not granted is not visible to the agent,
- no capability switches the authorization checks off,
- the listing of the workspaces holds the shared review workspace, the topic workspaces and the own workspace, and leaves out the live workspace,
- the listing works without the workspace module as well - the check that depends on it is switched off,
- the preview of the own workspace and the preview of the review workspace name the workspace they render and carry no credential.
The fixture of the tests creates a site of its own and names it in every context it builds: a context without a site falls back to the default site of the installation, and the name it is configured under does not exist in a test database.
A new capability is a class with an #[McpTool] attribute in Classes/Domain. It is
discovered automatically, and it gets a privilege target
Shel.Neos.Mcp:Capability.Tool.<the name of the tool> - which has to be granted in the
Policy.yaml of the installation, or the tool stays hidden.
Fork and license
This package is a fork of Sitegeist.SlopMachine
by Sitegeist GmbH, published under GPL-3.0-or-later, whose complete license text ships in the
LICENSE file. The fork is maintained by Sebastian Helzle and started from the upstream version
at commit d33ec34 (2026-08-11). It has been substantially modified since - the git history of
this repository carries the original upstream history, so the authorship of every part remains
traceable.
It depends on Sitegeist.Pandora, the MCP server integration for Neos Flow, which is likewise GPL-3.0-or-later and stays untouched by this fork.
Upgrading from Sitegeist.SlopMachine
- Replace
sitegeist/slopmachinewithshel/neos-mcpin thecomposer.jsonof the project and of every package that requires it, then runcomposer update. - Run
./flow core:migrate --package-key <Your.Project.Package>for every package that references the old one: the core migration of this package renames the package key, the class names, the roles and node types and moves the settings to the new path. - Run
./flow doctrine:migrate: the database migration of this package renames thesitegeist_slopmachine_*tables toshel_neos_mcp_*, or creates them where an installation has none. - Adjust the role identifiers stored in the database by hand - the assignments of the accounts and
the role names of the authentication tokens still name
Sitegeist.SlopMachine:McpAgent*.