Repository navigation
Add the MCP admin half - #3629
Merged
Merged
Conversation
…half # Conflicts: # admin/tests/FluentCMS.Admin.ApiTests/FluentCMS.Admin.ApiTests.csproj
pournasserian
added a commit
that referenced
this pull request
Nov 24, 2026
Milestone A6 of the admin: nothing a Must row needs takes the CLI or a direct API call. An administrator manages users, roles, keys, members, settings, locales, sites and host names, webhooks, MCP clients, plugins and jobs, and reads the startup report, from the admin alone; an editor runs AI actions on the opted-in fields. Closes #3419 Closes #3420 Closes #3421 Closes #3422 Closes #3423 Closes #3424 Closes #3425 Closes #3426 Closes #3427 Closes #3428 Closes #3429 Closes #3430 Closes #3431 Closes #3354 Closes #3446 Closes #3488 Closes #3504 Closes #3514 Closes #3630 ## What is in it - **A-51 (#3438): the administration area.** A lazy assembly of its own, access for the instance, core's menu entries and the stubs of five plugin halves. - **A-31 (#3493): users and invitations.** - **A-34 (#3498): the settings menu and the generated settings pages**, with secrets and reset. - **A-32 (#3503): roles**, with grants from the permission catalogue and the site's Public role; **A-52 (#3532): the constraints of a grant**: sites, locales, fields, resources and a row rule. - **A-40 (#3508): members and member groups.** - **A-33 (#3496): API keys**, with the secret shown once by one component, which the webhooks and MCP halves use too. - **A-35 (#3515): sites and locales, and the multi-site half.** - **A-38 (#3509): field actions in the form and the AI assist half**, with the usage page. - **A-39 (#3541): plugins, jobs, event dead letters and diagnostics**, and the search rebuild as a page of the search half. - **A-36 (#3628): the webhooks half.** The list and one form, the secret shown once on create and on rotation, header values asked again when the address moves, the delivery log with send again, and ping. - **A-37 (#3629): the MCP half.** The clients of the instance with approve, role, reject, revoke and register; the guidelines and instructions and the stored prompts of a site; the agent writes. Fixed on the way: - #3507: a sign-in completes only at the callback's own address (#3504). - #3518: the not-found and no-access states follow the address (#3488). - #3516: a page follows its query only at its own route while the router waits (#3514). - #3539: a loading state shows while a navigation waits for an assembly or a locale's access (#3446). - #3519: the component gallery and the JSON fast paths leave the first download (#3354). - #3510 and #3612: the tests of a half's first use count its configure per admin and show that first uses in any order load it once (#3505). - #3631: the test of the AI usage page writes the time as the runtime does, so it passes on Linux (#3630). ## Decisions The decisions of the milestone are in #3431 and in section 11 of `docs/planning/admin-technical-spec.md`; each issue has its own in a comment. The ones a reader meets first: - Core's pages of administration load lazily, in an assembly of their own, and so do the halves: the first download grows only by the gate of A-51, the field actions of A-38 and the manifests. - A page of an instance-only group (users, members, jobs, diagnostics, the MCP clients, the multi-site pages) is gated by the grant for the instance; roles, keys, settings and sites show what the caller may manage in the site. - The MCP half leaves out the bulk removal of #3397, which section 5.4 does not describe, and shows the agent writes on a page of its own. ## Dependencies None: no NuGet package, npm package or GitHub Action, no migration and no backend model change. Outside `admin/` the milestone changes `FluentCMS.slnx` (the new projects), one `COPY` line of the host's `Dockerfile`, `tests/FluentCMS.Architecture.Tests/AdminRulesTests.cs`, a comment in `ci.yml` and the admin specification. ## Size First download 3,594,429 B with every half, 5,571 B under the budget of 3,600,000 B. ## Verification - `main` is merged in at c13af58 (#3627). The one conflict, a paragraph of section 5.5 of the admin specification, kept the as-built text of A-38. - The manual CI on `feature/a6` at 7dd0d7c, the tree of this pull request, passed: the quick run 45324672156 and the full run 45390713433. - This pull request ran the full checks and the dry run of `Publish`, and both passed. - What the reviews of the last two halves left is on #3610 and #3611. #3502 and #3511 of the milestone stay open. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.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.
Closes #3425
What the half does
FluentCMS.Plugins.Mcp.Adminreplaces the A-51 stub with four pages, in a site where the MCP plugin is enabled:/mcp/clients, formcp.managefor the instance only. It lists the clients with their client id, status, role, registration time and last activity. From this page an administrator can:Reject, revoke and remove ask first. A change of role starts from the client's current role and stays off until another role is chosen.
/mcp/instructions, formcp.managein the site. It holds the guidelines of the site and the instructions of each content type. Each text is written, changed and removed (after a question) on its own. A type that is no longer in the schema is marked./mcp/prompts, formcp.managein the site. It lists the stored prompts and has one form to create or change a prompt (name, title, description, arguments, template). A refusal goes on the field it is about. A delete asks first./mcp/activity, the agent writes.The
mcpsettings stay on the generated page of A-34. The clients page links to/settings/mcp/defaultsfor a caller who may manage them for the instance.Decisions
POST /mcp/clients/removeamong the half's pages and actions, and the acceptance does not ask for it. The caller's own consents (/mcp/consents, A client that keeps refreshing can make the end of its consent answer 409 again and again #3594) are not part of this half either.CmsSecretDialogof A-33 shows the client id the agent is set up with, once, with its copy button. The list shows the client id too, since it is not a secret.GET /roles, sent by id, since a client belongs to the instance. A caller who may read no role is told that the roles could not be read. They can still reject, revoke and remove, but not approve, change a role or register.FCMS1603says the client no longer exists and names the server's cleanup.FCMS1604,FCMS1607andFCMS1609say it changed meanwhile. Both close the dialog and read the list again./mcp/activity, foractivity.readin the site. It has no menu item; the other pages of the half link to it where the caller may open it. It readsGET /activity?origin=mcpin pages of 50, newest first. A client's own registration through/connect/registeris recorded with that origin, so it shows there too.The full list of decisions is in the comment on #3425, and the spec has an "As built (A-37)" paragraph in 5.4.
Size
With the webhooks half merged, the first download is 3,594,429 B in Brotli (90 files), 5,571 B under the 3,600,000 B budget. The half's assembly loads lazily, so only its manifest entry is in the first download.
What was run
On the tree merged with
feature/a6at 185736d:dotnet build -c Release -warnaserrorMcpTestsof the API tests (records and request bodies against the OpenAPI document, approve, change role, revoke, register, instructions, prompts, the site-only caller)On the merged tree, one API test first failed. It expected no agent writes, but a self-registration is recorded with origin
mcp, and its row may be written in time for the read. The test now allows that row and still checks that none of the administrator's actions is listed.Only CI shows the PostgreSQL and SQL Server runs and the full suites.