authentik-mcp
# authentik-mcp
MCP server for [Authentik](https://goauthentik.io/) identity provider.
## Install
```json
{
"mcpServers": {
"authentik": {
"command": "uvx",
"args": ["--refresh", "--extra-index-url", "https://nikitatsym.github.io/authentik-mcp/simple", "authentik-mcp"],
"env": {
"AUTHENTIK_URL": "https://auth.example.com",
"AUTHENTIK_TOKEN": "your-api-token"
}
}
}
}
```
**Where to paste:**
- **Claude Desktop** — `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Cursor** — `.cursor/mcp.json` in your project
- **Claude Code** — `~/.claude.json` top-level `mcpServers`
Or use the [setup wizard](https://nikitatsym.github.io/authentik-mcp/) to generate the config.
### HTTP
`authentik-mcp --http` serves streamable HTTP at `http://127.0.0.1:8000/mcp` (`--host`, `--port`) instead of stdio, same environment variables. No authentication: put a gateway in front. The package can also be imported: `mcp`, `Settings`, the client class, and `client_var` (a `ContextVar` the host sets per request) let one process serve several instances.
## Getting an API token
Authentik admin panel → Directory → Tokens and App passwords → Create with API scope.
## Groups
| Tool | Description |
|------|-------------|
| `authentik_read` | Users, groups, apps, tokens, providers, outposts, crypto, RBAC (read-only) |
| `authentik_write` | Create/update core resources (non-destructive) |
| `authentik_delete` | Delete operations across all domains (destructive) |
| `authentik_flows_read` | Flows, stages, policies, sources, events (read-only) |
| `authentik_flows_write` | Create/update auth pipeline config (non-destructive) |
| `authentik_admin` | Admin settings, system info, lifecycle |
Call any group with `operation="help"` to list available operations.
## Application access control
Apps are open to all authenticated users until gated. Restrict an app to a group/user by binding it: `CreatePolicyBinding(target=<app pk>, group=<group pk>)` (or `user=`) in `authentik_flows_write`; inspect gates with `ListPolicyBindings` / `ShowPolicyBinding` in `authentik_flows_read`. Policy bindings live under the `authentik_flows_*` groups, not the core ones.
TDQS
Scored across 7 tools
Tools are mostly distinct but there is potential confusion between authentik_write and authentik_flows_write, and between authentik_read and authentik_flows_read, as the domain-specific tools overlap with general ones.
Naming uses a consistent authentik_ prefix and snake_case, but the pattern varies: some tools include a domain (e.g., authentik_flows_write) while others do not (e.g., authentik_write), leading to minor inconsistency.
With 7 tools, the count is well-scoped for an Authentik administration server, covering core operations without being overwhelming or insufficient.
The tool set covers CRUD operations (create/update via write, read via read and flows_read, delete via delete) and admin actions, but lacks a distinct update-only tool; the write tool handles both create and update, which is acceptable but not ideal.