Repository navigation
[MCP] Tool registry + class-level introspection + RBAC-aware tools/list filtering #615
Description
Activity
- addedenhancementNew feature or requestNew feature or requestarea:componentsComponents / applications subsystemComponents / applications subsystemarea:mcpModel Context Protocol (MCP) server: protocol, profiles, stdio CLIModel Context Protocol (MCP) server: protocol, profiles, stdio CLIfeature:mcp-v1Rollout of native MCP server v1 (HarperFast/harper#465). Removed when v1 closes.Rollout of native MCP server v1 (HarperFast/harper#465). Removed when v1 closes.
on May 19, 2026 - added a parent issue
on May 19, 2026 User-Level RBAC
I am a skeptical that we can really introspect this. Most Harper applications have highly restricted RBAC access to tables, and then programmatically grant permission to public users. And for Resource (not tables), there is no such thing as RBAC at all. So I don't know that we can really determine tools based on RBAC, the permissions will probably still need to be applied at execution time.
User-Level RBAC
I am a skeptical that we can really introspect this. Most Harper applications have highly restricted RBAC access to tables, and then programmatically grant permission to public users. And for Resource (not tables), there is no such thing as RBAC at all. So I don't know that we can really determine tools based on RBAC, the permissions will probably still need to be applied at execution time.
OK a bit of fire, and see what happens. Makes sense with our programmatic implementation of
allow*. Is there any harm in trying to introspect or should this be skipped for Resource class endpoints?Is there any harm in trying to introspect
There is no harm in trying introspect the presence of static methods, that's the right thing to do.
There is harm in trying to introspect RBAC permissions, they will often report no permissions even though permissions may be programmatically granted.- added 4 commits that reference this issue
on May 28, 2026 - added a commit that references this issue
on Jun 2, 2026
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Scope. Build the tool registry, JSON Schema input plumbing, and the RBAC-aware
tools/listfilter. No real tools yet — this PR ships the framework; the operations and application profiles plug into it in #617 and #618.Design reference. Sections "Tool-list filtering" and "Safety & Observability → Error mapping" in #465.
Acceptance criteria
addTool,removeTool,listTools(user)) with per-session caching of the filtered list.resources/openApi.ts:149-153(prototype.method !== Resource.prototype.method).dataLayer/schemaDescribe.ts:29-49(direct walk ofuser.role.permission[db].tables[table]). Does not useResource.allowRead/Create/Update/Delete— those are instance methods bound to a record id (resources/Resource.ts:413-427).tools/listpaginates via opaquecursor/nextCursor; page size capped bymcp.<profile>.maxTools.tools/calldispatches to a registered tool's handler; unknown tool → JSON-RPC-32601; invalid args →-32602; tool-execution error returnsresult.isError = true(NOT a JSON-RPC error).readOnlyHint,destructiveHint,idempotentHint,openWorldHint) flow through.Out of scope. No operations API integration (#617), no Resources registry integration (#618), no listChanged (#619), no rate limiting (#620).
Stacks on. #614 (transport + lifecycle).
Branch & PR conventions
feat/mcp-tool-registrymain(after [MCP] Streamable HTTP transport: session, lifecycle, Origin, contentTypes reuse #614 merges).Smoke test
Tracking. Part of #465. Sub-issue #3 of 11.