add(auth): personal access tokens, user impersonation and permission-aware write tools - #3
Merged
Conversation
elcreator
commented
Sep 15, 2026
Contributor
- auth.mode=pat (default): emcp_tokens table, Bearer endpoint at /{api_prefix}/{server} without sApi, self-service manager page (Tools -> MCP tokens), emcp:token:* commands
- ImpersonateManagerUser: API requests run as the token/JWT owner with their role, permissions, document groups and locks (mirrors UserLogin::writeSession, never persisted); the emcp permission is required in API mode too
- content read tools honour document groups and view_unpublished; content.get returns the body fields; model catalog reads need the permission of the matching manager screen
- evo.elements.list|get and evo.write.content.update|create|publish, evo.write.elements.save, evo.write.cache.clear, gated by manager permissions, enable_write_tools and the mcp:write scope; each writes a manager_log row
- ToolProvider / WritesSite / ToolRegistry: other extras contribute tools to a server handle at runtime or via mcp.servers[].extra_tools, with the same write gates
- JSON-RPC notifications and ping map to mcp:read (sent by MCP clients on connect)
- docker/ compose environment with a preinstalled site, token, smoke test and opt-in extras
…aware write tools
- auth.mode=pat (default): emcp_tokens table, Bearer endpoint at /{api_prefix}/{server}
without sApi, self-service manager page (Tools -> MCP tokens), emcp:token:* commands
- ImpersonateManagerUser: API requests run as the token/JWT owner with their role,
permissions, document groups and locks (mirrors UserLogin::writeSession, never persisted);
the emcp permission is required in API mode too
- content read tools honour document groups and view_unpublished; content.get returns the
body fields; model catalog reads need the permission of the matching manager screen
- evo.elements.list|get and evo.write.content.update|create|publish, evo.write.elements.save,
evo.write.cache.clear, gated by manager permissions, enable_write_tools and the mcp:write
scope; each writes a manager_log row
- ToolProvider / WritesSite / ToolRegistry: other extras contribute tools to a server handle
at runtime or via mcp.servers[].extra_tools, with the same write gates
- JSON-RPC notifications and ping map to mcp:read (sent by MCP clients on connect)
- docker/ compose environment with a preinstalled site, token, smoke test and opt-in extras
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.