MCP Authentik
MCP server for Authentik identity management. Manage users, groups, applications, flows, policies, providers, and more through natural language in Cursor, Claude Code, and Claude Desktop.
Features
- 297 tools across 22 categories covering the complete Authentik API
- Read-only mode via
AUTHENTIK_ACCESS_TIER=read-onlyfor safe monitoring - Category filtering via
AUTHENTIK_CATEGORIESto expose only the tools you need - Type-safe SDK client via
@goauthentik/api - Docker images for
linux/amd64andlinux/arm64on GHCR - Remote MCP via HTTP transport (
MCP_TRANSPORT=http) using the Streamable HTTP protocol - TypeScript/ESM with full type safety
API Compatibility
Built for Authentik 2026.5.
Quick Start
Run the server directly with npx:
AUTHENTIK_URL="https://auth.example.com" \
AUTHENTIK_TOKEN="your-api-token" \
npx -y @samik081/mcp-authentik
The server validates your Authentik connection on startup and fails immediately with a clear error if credentials are missing or invalid.
Docker
Run with Docker (stdio transport, same as npx):
docker run --rm -i \
-e AUTHENTIK_URL=https://auth.example.com \
-e AUTHENTIK_TOKEN=your-api-token \
ghcr.io/samik081/mcp-authentik
To run as a remote MCP server with HTTP transport:
docker run -d -p 3000:3000 \
-e MCP_TRANSPORT=http \
-e AUTHENTIK_URL=https://auth.example.com \
-e AUTHENTIK_TOKEN=your-api-token \
ghcr.io/samik081/mcp-authentik
The MCP endpoint is available at http://localhost:3000 and a health check at http://localhost:3000/health.
Configuration
Claude Code CLI (recommended):
# Using npx
claude mcp add --transport stdio authentik \
--env AUTHENTIK_URL=https://auth.example.com \
--env AUTHENTIK_TOKEN=your-api-token \
-- npx -y @samik081/mcp-authentik
# Using Docker
claude mcp add --transport stdio authentik \
--env AUTHENTIK_URL=https://auth.example.com \
--env AUTHENTIK_TOKEN=your-api-token \
-- docker run --rm -i ghcr.io/samik081/mcp-authentik
# Using remote HTTP (connect to a running Docker container or HTTP server)
claude mcp add --transport http authentik http://localhost:3000
JSON config (works with Claude Code .mcp.json, Claude Desktop claude_desktop_config.json, Cursor .cursor/mcp.json):
{
"mcpServers": {
"authentik": {
"command": "npx",
"args": ["-y", "@samik081/mcp-authentik"],
"env": {
"AUTHENTIK_URL": "https://auth.example.com",
"AUTHENTIK_TOKEN": "your-api-token"
}
}
}
}
Docker (stdio):
{
"mcpServers": {
"authentik": {
"command": "docker",
"args": ["run", "--rm", "-i",
"-e", "AUTHENTIK_URL=https://auth.example.com",
"-e", "AUTHENTIK_TOKEN=your-api-token",
"ghcr.io/samik081/mcp-authentik"
]
}
}
}
Remote MCP (connect to a running Docker container or HTTP server):
{
"mcpServers": {
"authentik": {
"type": "streamable-http",
"url": "http://localhost:3000"
}
}
}
Access Tiers
Control which tools are available using the AUTHENTIK_ACCESS_TIER environment variable:
- full: All 297 tools. Includes creating, updating, and deleting users, groups, applications, flows, providers, and all other resources.
- read-only: 144 tools. Listing and viewing resources only. No state changes.
Tools that are not available in your tier are not registered with the MCP server. They will not appear in your AI tool's tool list, keeping the context clean.
Environment Variables
Available Categories
admin, authenticators, core, crypto, endpoints, enterprise, events, flows, managed, oauth2, outposts, policies, property-mappings, providers, rac, rbac, reports, root, sources, ssf, stages, tenants
Tools
mcp-authentik provides 297 tools organized by category. Each tool's Access column shows the minimum tier required: read-only (available in both tiers) or full (requires full tier). The Hints column shows tool behavior: read-only (no state changes), destructive (modifies existing state), idempotent (same result if called twice).
Users
Groups
Applications
Tokens
Brands
Enterprise device and endpoint management: managed devices, device access groups, device-to-policy bindings, and connectors for agents, enrollment, Fleet, Google Chrome, and Apple ISE-PSSO.
Devices
Device Access Groups
Device Bindings
Agent Connectors
Enrollment Tokens
Fleet Connectors
Google Chrome Connectors
ISE-PSSO Agents
Connectors (generic registry)
Events
System Tasks
Policies use a type+config pattern. Cross-type tools operate on any policy, while per-type tools accept a policy_type parameter. Available types: dummy, event_matcher, expression, geoip, password, password_expiry, reputation, unique_password.
Property mappings use a type+config pattern. Cross-type tools operate on any mapping, while per-type tools accept a mapping_type parameter. Available types: notification, provider_google_workspace, provider_microsoft_entra, provider_rac, provider_radius, provider_saml, provider_scim, provider_scope, source_kerberos, source_ldap, source_oauth, source_plex, source_saml, source_scim.
Providers use a type+config pattern. Cross-type tools operate on any provider, while per-type tools accept a provider_type parameter. Available types: oauth2, saml, ldap, proxy, radius, scim, rac, google_workspace, microsoft_entra, wsfed.
RBAC permissions are role-only: assign permissions to roles, then grant a role to users via role membership.
Sources use a type+config pattern. Cross-type tools operate on any source, while per-type tools accept a source_type parameter. Available types: oauth, saml, ldap, plex, kerberos, scim, telegram.
Stages use a type+config pattern. Cross-type tools operate on any stage, while per-type tools accept a stage_type parameter. Available types: account_lockdown, authenticator_duo, authenticator_email, authenticator_endpoint_gdtc, authenticator_sms, authenticator_static, authenticator_totp, authenticator_validate, authenticator_webauthn, captcha, consent, deny, dummy, email, endpoint, identification, invitation, mtls, password, prompt, redirect, source, user_delete, user_login, user_logout, user_write.
Known Limitations
- Application icons are URL-only.
authentik_apps_set_icon_urlsets themeta_iconfield to an external URL, or clears the current icon withclear: true. Uploading a binary icon file is not supported through this MCP server. - Endpoint enrollment keys are not retrievable. Enrollment tokens can be created and managed, but the raw enrollment key value cannot be viewed back through the
@goauthentik/apiSDK.
Verify It Works
After configuring your MCP client, ask your AI assistant:
"What version of Authentik is running?"
If the connection is working, the assistant will call authentik_admin_version and return your server version and build hash.
Usage Examples
- "List all users in the admin group" -- calls
authentik_users_listandauthentik_groups_listto find and display admin group members. - "What applications are configured?" -- calls
authentik_apps_listto show all applications with their providers and groups. - "Create a new user for [email protected]" -- calls
authentik_users_createto set up the new user account. - "Show me a summary of all managed endpoint devices" -- calls
authentik_endpoints_devices_summaryto report aggregate device statistics.
Troubleshooting
Connection errors
- Verify
AUTHENTIK_URLis reachable from the machine running the MCP server - Ensure there is no trailing slash on the URL (use
https://auth.example.comnothttps://auth.example.com/) - Verify HTTPS is configured correctly if your instance uses TLS
Token permissions
- The API token must have sufficient permissions for the tools you intend to use
- Tools with
fullaccess tier will fail if your token only has read permissions -- setAUTHENTIK_ACCESS_TIER=read-onlyto limit exposure - Create tokens in the Authentik admin interface under Directory > Tokens and App passwords
Category filtering
- Use
AUTHENTIK_CATEGORIESwith the actual category values listed above (e.g.,core,admin,flows), not source file names - Users, groups, applications, tokens, and brands are all under the
corecategory, not separate categories - Use comma-separated values with no spaces (e.g.,
core,admin,events)
Development
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode (auto-reload)
npm run dev
# Open the MCP Inspector for interactive testing
npm run inspect