pocketid-mcp
MCP server for managing Pocket ID instances, providing 57 tools for user management, OIDC client configuration, group management, audit logs, and more.
README
pocketid-mcp
MCP (Model Context Protocol) server for managing Pocket ID instances. Provides 57 tools for user management, OIDC client configuration, group management, audit logs, and more — all accessible through any MCP-compatible client.
Requirements
- Bun v1.0+
- A running Pocket ID instance with an API key
Installation
From Release Binary
Download the latest binary for your platform from the Releases page.
From Source
git clone https://github.com/nikkomiu/pocketid-mcp.git
cd pocketid-mcp
bun install
Configuration
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
POCKETID_URL |
Yes | — | Base URL of your Pocket ID instance (e.g. https://auth.example.com) |
POCKETID_API_KEY |
Yes | — | API key for authentication (create via Pocket ID admin dashboard under Settings > API Keys) |
LOG_LEVEL |
No | info |
Log level (debug, info, warn, error) |
LOG_FILE |
No | pocketid-mcp.log |
Log file name or absolute path |
LOG_DIR |
No | (auto-resolved) | Directory for log file |
LOG_TO_STDERR |
No | true |
Also write logs to stderr |
LOG_TRUNCATE |
No | true |
Truncate old log entries on startup |
LOG_MAX_AGE_HOURS |
No | 24 |
Max age in hours for log truncation |
Claude Code
Add to your Claude Code MCP settings (~/.claude/settings.json or project .mcp.json):
{
"mcpServers": {
"pocketid": {
"command": "/path/to/pocketid-mcp",
"env": {
"POCKETID_URL": "https://auth.example.com",
"POCKETID_API_KEY": "your-api-key"
}
}
}
}
Or when running from source:
{
"mcpServers": {
"pocketid": {
"command": "bun",
"args": ["run", "/path/to/pocketid-mcp/src/index.ts"],
"env": {
"POCKETID_URL": "https://auth.example.com",
"POCKETID_API_KEY": "your-api-key"
}
}
}
}
Usage
Once configured, the following tools are available through your MCP client:
Users
| Tool | Description |
|---|---|
user_list |
List users with pagination, search, and sorting |
user_get |
Get a user by ID |
user_create |
Create a new user |
user_update |
Update an existing user |
user_delete |
Delete a user |
user_groups |
List groups for a specific user |
user_update_groups |
Update group memberships for a user |
user_create_one_time_access_token |
Create a one-time access token for a user |
user_send_access_email |
Send a one-time access email to a user |
User Groups
| Tool | Description |
|---|---|
user_group_list |
List user groups with pagination and search |
user_group_get |
Get a user group by ID |
user_group_create |
Create a new user group |
user_group_update |
Update a user group |
user_group_delete |
Delete a user group |
user_group_update_users |
Add or remove users from a group |
user_group_update_allowed_clients |
Configure which OIDC clients can access this group |
OIDC Clients
| Tool | Description |
|---|---|
oidc_client_list |
List OIDC clients with pagination and search |
oidc_client_get |
Get an OIDC client by ID |
oidc_client_create |
Create a new OIDC client |
oidc_client_update |
Update an OIDC client |
oidc_client_delete |
Delete an OIDC client |
oidc_client_create_secret |
Generate a new client secret |
oidc_client_update_allowed_groups |
Configure allowed user groups for a client |
oidc_client_preview_claims |
Preview token claims for a specific user |
oidc_client_authorized_list |
List authorized clients for a user |
oidc_client_revoke_authorization |
Revoke a client authorization |
API Keys
| Tool | Description |
|---|---|
api_key_list |
List API keys |
api_key_create |
Create a new API key |
api_key_renew |
Renew an API key's expiration |
api_key_delete |
Delete an API key |
Audit Logs
| Tool | Description |
|---|---|
audit_log_list |
List current user's audit logs |
audit_log_list_all |
List all audit logs (admin only) |
audit_log_filter_clients |
Get client names for audit log filtering |
audit_log_filter_users |
Get usernames for audit log filtering |
Custom Claims
| Tool | Description |
|---|---|
custom_claim_suggestions |
Get suggested custom claim names |
custom_claim_set_user |
Set custom claims for a user |
custom_claim_set_group |
Set custom claims for a user group |
App Configuration
| Tool | Description |
|---|---|
app_config_get |
Get public application configuration |
app_config_get_all |
Get all configuration (admin only) |
app_config_update |
Update application configuration |
app_config_test_email |
Send a test email |
app_config_sync_ldap |
Trigger LDAP synchronization |
Signup Tokens
| Tool | Description |
|---|---|
signup_token_list |
List signup tokens |
signup_token_create |
Create a signup token |
signup_token_delete |
Delete a signup token |
SCIM Provisioning
| Tool | Description |
|---|---|
scim_provider_create |
Create a SCIM service provider |
scim_provider_update |
Update a SCIM service provider |
scim_provider_delete |
Delete a SCIM service provider |
scim_provider_sync |
Trigger a manual SCIM sync |
OIDC Discovery
| Tool | Description |
|---|---|
oidc_discovery |
Get OpenID Connect discovery document |
oidc_jwks |
Get JSON Web Key Set |
App Images
| Tool | Description |
|---|---|
app_image_update_logo |
Upload or update the application logo |
app_image_update_favicon |
Upload or update the favicon |
app_image_update_background |
Upload or update the background image |
app_image_delete_default_profile_picture |
Remove the default profile picture |
Utility
| Tool | Description |
|---|---|
health_check |
Check Pocket ID instance health |
version_latest |
Get the latest available Pocket ID version |
Audit Trail
All mutating operations (POST, PUT, DELETE) are automatically logged at info level with structured fields:
{
"level": 30,
"time": "2026-02-13T10:30:00.000Z",
"tool": "user_create",
"httpMethod": "POST",
"path": "/api/users",
"resourceId": null,
"success": true,
"msg": "audit: user_create POST /api/users OK"
}
Request/response bodies, API keys, and PII are never logged.
Development
Run from Source
bun run start
Build Standalone Binary
bun run build
Produces dist/pocketid-mcp.
Type Check
bun run type-check
Lint
bun run lint
Format
bun run format
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。