Skip to content

Add the MCP admin half - #3629

Merged
pournasserian merged 4 commits into
feature/a6from
3425-mcp-admin-half
Nov 24, 2026
Merged

pournasserian merged 4 commits into
feature/a6from
3425-mcp-admin-half

Conversation

@pournasserian

Copy link
Copy Markdown
Member

Closes #3425

What the half does

FluentCMS.Plugins.Mcp.Admin replaces the A-51 stub with four pages, in a site where the MCP plugin is enabled:

  • /mcp/clients, for mcp.manage for the instance only. It lists the clients with their client id, status, role, registration time and last activity. From this page an administrator can:

    • approve a pending client with a role, or reject it
    • give an approved client another role, or revoke it
    • remove a rejected client
    • register a client, which is approved at once with its role

    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, for mcp.manage in 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, for mcp.manage in 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 mcp settings stay on the generated page of A-34. The clients page links to /settings/mcp/defaults for a caller who may manage them for the instance.

Decisions

  • Bulk removal (Bulk removal of self-registered MCP clients, and fillers kept alive by consent #3397) is left out. Section 5.4 of the spec does not list POST /mcp/clients/remove among 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.
  • Shown once for a public client. A client registered here is public and has no secret, so the answer holds nothing secret. CmsSecretDialog of 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.
  • Roles offered. The roles of every site from 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.
  • A client that is gone or changed. FCMS1603 says the client no longer exists and names the server's cleanup. FCMS1604, FCMS1607 and FCMS1609 say it changed meanwhile. Both close the dialog and read the list again.
  • Agent writes. A page of its own, /mcp/activity, for activity.read in the site. It has no menu item; the other pages of the half link to it where the caller may open it. It reads GET /activity?origin=mcp in pages of 50, newest first. A client's own registration through /connect/register is 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/a6 at 185736d:

Check Result
dotnet build -c Release -warnaserror Succeeded
Component tests of the half 26/26 passed
McpTests of the API tests (records and request bodies against the OpenAPI document, approve, change role, revoke, register, instructions, prompts, the site-only caller) 4/4 passed
End-to-end case in slow mode (approve a client that registered itself, write the guidelines of the site) Passed
Architecture tests (before the merge) 43/43 passed
markdownlint on the changed markdown No issues

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.

@pournasserian pournasserian added type:feature New capability area:admin The Blazor WebAssembly admin and the admin halves of plugins labels Nov 24, 2026
@pournasserian
pournasserian merged commit e207189 into feature/a6 Nov 24, 2026
4 checks passed
@pournasserian
pournasserian deleted the 3425-mcp-admin-half branch November 24, 2026 03:47
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:admin The Blazor WebAssembly admin and the admin halves of plugins type:feature New capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant