MCP tools¶
Vector exposes the admin to AI agents over the Model Context Protocol,
through kinetis/mcp. The tools call the same services and policies as
the REST API: an agent sees what its identity may see, and every write
is validated, hooked and audited.
Tool |
Arguments |
Does |
|---|---|---|
|
— |
Lists the resources this identity may view: slug, label and group. |
|
|
Describes one resource’s fields, actions and permissions (below). |
|
|
Lists records under the list grammar. |
|
|
Reads one record, with its permissions. |
|
|
Creates a record, validated as the form validates it. |
|
|
Updates the fields in |
|
|
Deletes a record; on a soft-deleting resource it goes to the trash unless |
|
|
Runs an action on record |
|
|
Computes a dashboard widget ( |
An agent lists the resources, then describes the one it works with, so
its context holds one resource’s detail rather than all of them. For
each field, vector_describe (Kinetis\Vector\Mcp\ResourceDescription)
states:
writable: whether a create, an update, both or neither may write it.required: whether a create must send it. It follows the writer’s own rule, so a create with just the required fields succeeds.rules,options,default,unique: what a value must satisfy.format: what a value looks like, where the type alone doesn’t say (a date, a rich-text document, a list of ids).relation: the resource it points to.filter,sortable,searchable: whatvector_queryaccepts for it.visibleWhen,requiredWhen,disabledWhen: when these depend on other fields’ values.
The description also carries each action with its dialog fields, and what this identity may do. It is in the identity’s language, and a field a policy hides is left out. Files and images can’t be uploaded through the tools.
The resource vector://schema is the whole descriptor, as this identity
sees it.
values (on create, update and run-action) is a JSON object of field
values, as a REST write takes them. filter (on query) is the list
grammar’s filter as a JSON object: {field: value | {op: value}, or: [filter, ...], and: [filter, ...]}.
Serving them¶
Over HTTP, at
POST /mcp: your authentication middleware joins themcpgroup, as it joinsvector(Authentication).Over stdio, with
kinetis mcp:serve: the tools injectCurrentUserInterface, so without an authenticated identity they fail closed. The HTTPmcpgroup does not run over stdio.
Either way, the tools ask VectorAccessInterface whether the identity
may use the admin at all, as the vector group does for the UI.
When POST /mcp answers 401¶
If every caller of POST /mcp gets 401 Unauthenticated. while the same
token works on /vector/…, your authentication middleware is in the
vector group but not the mcp group. Add it there, at a priority
above the identity guard’s, as
the mcp middleware group
shows, and rebuild the compiled cache in production
(Deployment).
Warning
Do not set MCP_HTTP_PUBLIC=true to make the 401 go away. It lets
requests without an identity through to every tool: any tool of yours
that needs no identity becomes public, and Vector’s tools still have no
identity to run as.
See also¶
Authorization — what an identity may do.
REST API — the list grammar the tools share.