Repository navigation
Conversation
evo.model.list|get selected columns that no longer exist in Evolution CMS 3.x (users.isfrontend/createdon/blocked..., user_roles.frames/home/rank/locked, permissions.description) and failed with "Unknown column". The allowlists now list only real columns; block state and timestamps stay available through UserAttribute. A new unit test checks every allowlisted field against the column listing of a stock Evo 3.5 install, so a projection can no longer point at a missing column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The site copy of the settings (core/custom/config/cms/settings/eMCP.php) is
created on first boot when missing: a plain `composer require` never runs
vendor:publish, so write tools could not be enabled without shell access.
- Tools -> MCP settings (`{manager_url}/emcp/settings`) shows the boolean
switches (write tools, endpoints, scopes, rate limit, audit, streaming) as
checkboxes. It needs Evo's `settings` permission on top of `emcp`. Values are
rewritten token by token so the file keeps its comments; missing keys are
inserted, a result that does not parse is refused.
- After publishing or saving, Evo 3.5.9+'s configuration cache (env.php) is
invalidated so the change applies on the next request.
- Manager pages return a 403 response instead of calling abort(), which Evo
does not define (was a 500), and follow manager_language instead of always
rendering English.
- Page and menu strings translated into all 22 locales.
- docker: drop the configuration cache after installing the package, otherwise
Evo 3.5.9 does not load the eMCP provider at all.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Settings page, a contract for tools contributed by other extras, and the gates that contract needs: per-tool permissions, destructive tools and writing backend code. Also fixes the model catalog on Evolution CMS 3.x and a
fail-open in tool registration.
Manager settings page
core/custom/config/cms/settings/eMCP.phpis published on first boot when it is missing. A plaincomposer requirenever runsvendor:publish, so before this write tools could not be enabled without shell access.{manager_url}/emcp/settings, needs Evo'ssettingspermission on top ofemcp) shows the boolean switches as checkboxes: endpoints, scopes, write / destructive / code tools, rate limit, audit,streaming. Values are rewritten token by token, so the file keeps its comments. Missing keys are inserted, and a result that does not parse is refused.
env.php) is invalidated so the change applies on the next request.abort(), which Evo does not define (it was a 500), and followmanager_language.Extension tool contract (DOCS 7.0.1)
Extras add tools through a
ToolProviderormcp.servers[].extra_tools. New optional contracts inEvolutionCMS\eMCP\Contracts:WritesSite(existing)security.enable_write_tools+mcp:writeDestructiveSitesecurity.enable_destructive_tools(off by default) +mcp:destructive; optionalreversible()ExecutesCodesecurity.enable_code_tools(off by default) +mcp:code+ a permission that already grants PHP in the manager (save_snippet/save_plugin/save_module)RequiresPermissionSecurityPolicy. The HTTP endpoint,/dispatchand the async worker path call it, andContentServerfilters its tool list with it, so the local (stdio) transport is covered too. Refusals:403 permission_denied,tool_deniedorscope_denied.tools/listhides tools the caller cannot use: missing permission, a disabled destructive or code tool,deny_tools. Disabledevo.write.*tools stay listed as before.extra.source = mcp,destructive,reversible,executes_code).Support\ToolError::make($code, $message, $status, $extra)returns anisErrorresult carrying one JSON object{ok:false, error, message, status[, errors, candidates]}. Codes:forbidden,not_found,ambiguous,invalid,refused,store_failure, or a prefixed extension code.candidateskeeps onlyidandtitle, at most 10.evo()->getLoginUserID('mgr'), nothing acts as a fallback user underauth.mode=none, and other users' resources are answered asnot_found.Backend code gate for built-in tools
The gate looks at the arguments of each call.
evo.write.elements.savefor asnippetorplugin, a TV definition with@EVAL/@SELECT/@INCLUDE(inelements,default_textordisplay_params), and documentfields or TV values starting with a code binding (also behind
@INHERIT) all need the code gate. Templates and chunks stay ordinary writes. The rules follow Evo'sBackendCodePermissions/TvBindingGuardwhen the core hasthem, with an identical fallback for older cores. So
save_templateorsave_documentalone can no longer store@EVALthrough MCP.Tool annotations
readOnlyHint/destructiveHintare derived from the markers, and hints a tool sets itself are kept.evo.write.content.updateandevo.write.elements.savearedestructiveHint: truebecause they overwrite without arevision.
WritesSitetools only getreadOnlyHint: false: MCP reads a missingdestructiveHintas true, so a tool that only adds data declares#[IsDestructive(false)]itself.Fixes
#[Name]was served under its class-derived name while the policy layer looked only at the attribute, so it skipped the write gates.ToolRegistrynow resolvesnames the way Laravel MCP does, and rejects tools it cannot name,
evo.*names, duplicates and non-Toolclasses (SPEC 6.4/6.5: throws in debug mode, logs otherwise).evo.model.list|getforUser,UserRoleandPermissionsselected columns that do not exist in Evolution CMS 3.x and failed with an SQL error. The allowlists now match the 3.x schema.tools/listpost-processing keeps empty JSON objects ({}schemas and annotations) instead of turning them into[].Housekeeping
Support\JsonRpcPayload).seiger/sapi^1.0andseiger/stask^1.0.10 || ^2.0replace*, socomposer validate --strictis clean again. sTask 2.x needs PHP 8.4, and the APIs eMCP uses are identical in 1.x and 2.x.composer run governance:update-lockno longer rewrites.ci/governance-lock.jsonwhen onlyupdated_atwould change.DOCS.uk.md/README.uk.mdare updated.Upgrade notes
mcp:destructiveandmcp:code. Each impliesmcp:write,mcp:callandmcp:readwhen a token is issued. Existing tokens keep working, but they can no longer save snippets or plugins, or write code bindings,until
security.enable_code_toolsis on and the token hasmcp:code.security.enable_destructive_tools,security.enable_code_tools(bothfalse),auth.destructive_scope,auth.code_scope.name()without a#[Name]attribute, or uses anevo.*name, is no longer served.