Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MCP server

NanoIDP includes an MCP (Model Context Protocol) server for integration with Claude Code and other MCP-compatible tools. For a hands-on tour — prompts, workflows, end-to-end examples — see MCP with Claude Code. For the admin secret, readonly mode, and the exposure warnings, see the Security guide.

Available tools

ToolDescription
list_usersList all configured users
get_userGet details of a specific user
create_userCreate a new user
update_userUpdate an existing user (password, email, roles, …)
delete_userDelete a user
generate_tokenGenerate OAuth2 tokens for a user (pass scope with openid to also get an ID Token)
decode_tokenDecode JWT token (without verification)
verify_tokenVerify JWT token signature and expiration
list_clientsList OAuth clients
get_clientGet client details
create_clientCreate a new OAuth client
update_clientUpdate an existing OAuth client
delete_clientDelete an OAuth client
get_settingsGet current IdP settings
update_settingsUpdate IdP settings
save_configPersist the current configuration to the YAML files
reload_configReload configuration from files
get_oidc_discoveryGet OIDC discovery document (same document as /.well-known/openid-configuration)
get_jwksGet JSON Web Key Set
get_audit_logGet audit log entries (filter by limit, event type, username)
get_audit_statsGet audit statistics
clear_audit_logClear the audit log
get_keys_infoGet signing key info (active kid, previous keys)
rotate_keysRotate signing keys (old key stays valid for verification)

Claude Code configuration

Add to your project's .claude/settings.json:

{
  "mcpServers": {
    "nanoidp": {
      "command": "python",
      "args": ["-m", "nanoidp.mcp_server"],
      "env": {
        "NANOIDP_CONFIG_DIR": "./config"
      }
    }
  }
}

Or if NanoIDP is installed globally:

{
  "mcpServers": {
    "nanoidp": {
      "command": "nanoidp-mcp",
      "env": {
        "NANOIDP_CONFIG_DIR": "/path/to/config"
      }
    }
  }
}

Claude Desktop configuration

Add to ~/.claude/claude_desktop_config.json:

{
  "mcpServers": {
    "nanoidp": {
      "command": "nanoidp-mcp",
      "env": {
        "NANOIDP_CONFIG_DIR": "/path/to/nanoidp/config"
      }
    }
  }
}

Running standalone

# Run MCP server directly
python -m nanoidp.mcp_server

All MCP tool calls are logged to the audit log.