Onelogin Mcp

io.github.onelogin由 GitHub 帳號 onelogin 發布v1.2.1更新於 Oct 25, 2026

MCP server for OneLogin API - manage users, apps, roles, and authentication

已驗證STDIO僅桌面效率與工作流安全與監控

概覽

AI 產生的概覽

一個本機 MCP 伺服器,將助理連接到 OneLogin API,用來管理使用者、角色、應用程式、身分驗證與安全設定。

可以做什麼
管理身分與存取:使用者、角色、權限、群組與對應,包括建立使用者以及為使用者指派角色或權限(R55、R56、R57、R58、R59、R60、R51)。管理應用程式:應用程式與連接器,包括列出 SAML 與 OAuth 應用程式(R61、R62、R63、R51)。處理身分驗證:MFA 權杖、工作階段、SAML 宣告、OAuth 權杖與邀請連結(R64、R65、R66、R67、R68、R69)。設定安全:原則、風險規則、Smart Hooks 與 API 授權範圍(R70、R71、R72、R73、R74)。自訂與監控:品牌、事件、報表與速率限制,以及子帳戶(R75、R76、R77、R78、R79、R80、R81、R82)。
適用情境
當助理需要直接操作 OneLogin 租用戶時適用:查詢或建立使用者、指派角色、列出 SAML 應用程式、產生 MFA 權杖、檢視稽核事件與報表,或透過自然語言調整安全原則與 API 範圍。
執行需求
透過 npm 套件 @onelogin/onelogin-mcp 以 npx 在本機執行,需要 Node.js。需要 OneLogin OAuth2 API 憑證(用戶端 ID 與密鑰)以及租用戶 URL,透過 ONELOGIN_CLIENT_ID、ONELOGIN_CLIENT_SECRET 與 ONELOGIN_URL 提供,或使用安裝指令碼存入本機設定檔。OAuth2 用戶端需在 OneLogin 管理面板中具備 API 權限。需要能存取 OneLogin 執行個體的網路。
安裝前請注意
此伺服器持有 OneLogin OAuth2 憑證(ONELOGIN_CLIENT_ID、ONELOGIN_CLIENT_SECRET),可授予對租用戶的管理存取權;請勿放入共用設定,並優先於測試租用戶試用。156 個工具中許多會寫入或變更資料,例如建立使用者、指派角色、產生 MFA 權杖、修改原則、風險規則與 API 授權。另可設定選用的舊版 API 金鑰(ONELOGIN_LEGACY_KEY)。所有請求都會送往所設定的 OneLogin 執行個體。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Onelogin Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

OneLogin MCP Server

A Model Context Protocol server providing comprehensive access to the OneLogin API. Enables Claude Desktop, OpenCode, and other MCP clients to manage users, apps, roles, authentication, and security settings.

Overview

This server provides tools covering a comprehensive set of supported OneLogin API endpoints:

  • Identity Management: Users, roles, groups
  • Applications: Apps, connectors, SAML, OAuth
  • Authentication: MFA, sessions, risk rules
  • Security: API authorization
  • Configuration: Brands, mappings
  • Operations: Events, reports, rate limits

All tools include comprehensive descriptions with warnings, best practices, and return data specifications.

Demo

https://github.com/user-attachments/assets/512abc44-6bb4-42e4-bb47-c0bc16f29beb

Installation

Prerequisites

Setup

Option 1: Environment Variables (Recommended)

Configure credentials directly in Claude Desktop config - no separate setup required.

Edit the config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Single environment:

json
{  "mcpServers": {    "onelogin": {      "command": "npx",      "args": ["-y", "@onelogin/onelogin-mcp"],      "env": {        "ONELOGIN_URL": "https://mycompany.onelogin.com",        "ONELOGIN_CLIENT_ID": "your_client_id",        "ONELOGIN_CLIENT_SECRET": "your_client_secret"      }    }  }}

Multiple environments (production/test separation):

json
{  "mcpServers": {    "onelogin-prod": {      "command": "npx",      "args": ["-y", "@onelogin/onelogin-mcp"],      "env": {        "ONELOGIN_URL": "https://company.onelogin.com",        "ONELOGIN_CLIENT_ID": "prod_client_id",        "ONELOGIN_CLIENT_SECRET": "prod_secret"      }    },    "onelogin-test": {      "command": "npx",      "args": ["-y", "@onelogin/onelogin-mcp"],      "env": {        "ONELOGIN_URL": "https://company-test.onelogin.com",        "ONELOGIN_CLIENT_ID": "test_client_id",        "ONELOGIN_CLIENT_SECRET": "test_secret"      }    }  }}

Optional environment variables:

  • ONELOGIN_USE_PREPROD: Set to "true" for preprod environments
  • ONELOGIN_LEGACY_KEY: Legacy API key (rarely needed)
  • ONELOGIN_SERVER: Server name for logging (defaults to "default")

Restart Claude Desktop completely after configuration.

OpenCode Configuration

For OpenCode users, add to ~/.config/opencode/mcp.json:

Single environment:

json
{  "mcpServers": {    "onelogin": {      "command": "npx",      "args": ["-y", "@onelogin/onelogin-mcp"],      "env": {        "ONELOGIN_URL": "https://mycompany.onelogin.com",        "ONELOGIN_CLIENT_ID": "your_client_id",        "ONELOGIN_CLIENT_SECRET": "your_client_secret"      }    }  }}

Multiple environments:

json
{  "mcpServers": {    "onelogin-prod": {      "command": "npx",      "args": ["-y", "@onelogin/onelogin-mcp"],      "env": {        "ONELOGIN_URL": "https://company.onelogin.com",        "ONELOGIN_CLIENT_ID": "prod_client_id",        "ONELOGIN_CLIENT_SECRET": "prod_secret"      }    },    "onelogin-test": {      "command": "npx",      "args": ["-y", "@onelogin/onelogin-mcp"],      "env": {        "ONELOGIN_URL": "https://company-test.onelogin.com",        "ONELOGIN_CLIENT_ID": "test_client_id",        "ONELOGIN_CLIENT_SECRET": "test_secret"      }    }  }}

Restart OpenCode after configuration.

Option 2: Setup Script (servers.json)

Alternative method using a configuration file:

  1. Install the package:
bash
npm install -g @onelogin/onelogin-mcp
  1. Configure OneLogin credentials:
bash
npx onelogin-mcp-setup

Enter your OneLogin server details when prompted:

  • Server name (e.g., "Production", "Test")
  • OneLogin subdomain URL (e.g., https://mycompany.onelogin.com)
  • OAuth2 client ID and secret

Configuration is stored in ~/.config/onelogin-mcp/servers.json.

  1. Add to Claude Desktop config:

Edit the config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Single environment:

json
{  "mcpServers": {    "onelogin": {      "command": "npx",      "args": ["-y", "@onelogin/onelogin-mcp"]    }  }}

Multiple environments (reference servers by name):

json
{  "mcpServers": {    "onelogin-prod": {      "command": "npx",      "args": ["-y", "@onelogin/onelogin-mcp"],      "env": {        "ONELOGIN_SERVER": "Production"      }    },    "onelogin-test": {      "command": "npx",      "args": ["-y", "@onelogin/onelogin-mcp"],      "env": {        "ONELOGIN_SERVER": "Test"      }    }  }}
  1. Restart Claude Desktop completely.

Usage

Use natural language to interact with OneLogin:

List all users with email ending in @example.comGet details for user ID 12345Create a user [email protected] with firstname John, lastname DoeAssign roles [123, 456] to user 789Generate MFA token for user 101112List all SAML apps

Claude will select the appropriate tool, call the OneLogin API, and present results.

API Coverage

This server provides 156 tools organized into 7 major categories:

Identity & Access (59 tools)

  • Users (14)
  • Roles (13)
  • Privileges (11)
  • Groups (6)
  • Mappings (15)

Applications (17 tools)

  • Apps (15)
  • Connectors (2)

Authentication (21 tools)

  • MFA (10)
  • Sessions (5)
  • SAML (2)
  • OAuth Tokens (2)
  • Invite Links (2)

Security (40 tools)

  • Policies (7)
  • Risk Rules (6)
  • Smart Hooks (11)
  • API Authorization (16)

Customization (6 tools)

  • Brands (6)

Monitoring (9 tools)

  • Events (2)
  • Reports (5)
  • Rate Limits (2)

Account Management (4 tools)

  • Accounts (4)

Configuration

Credential Management

The server supports two configuration methods:

  1. Environment Variables (recommended): Set ONELOGIN_URL, ONELOGIN_CLIENT_ID, and ONELOGIN_CLIENT_SECRET in your MCP client config (see Installation above)
  2. Configuration File: Use npx onelogin-mcp-setup to store credentials in ~/.config/onelogin-mcp/servers.json

Environment variables take precedence over the configuration file. See the Installation section above for complete configuration examples.

Optional Environment Variables

  • ONELOGIN_USE_PREPROD: Set to "true" for preprod environments
  • ONELOGIN_LEGACY_KEY: Legacy API key (rarely needed)
  • ONELOGIN_SERVER: Server name for logging (defaults to "default") or to select a named server from servers.json

Response Format

All tools return structured responses:

json
{  "success": true,  "request_id": "68F194DE-0A0D05A2-55F8-0A0F6C42-01BB-62EAE-0008",  "status": 200,  "data": {    // Tool-specific data  }}

The request_id matches the x-request-id HTTP header for tracing in Datadog and OneLogin logs.

Troubleshooting

Server not appearing in Claude Desktop

  1. Verify JSON config syntax
  2. Ensure absolute path to index.js
  3. Restart Claude Desktop completely (quit and reopen)

"spawn bun ENOENT" error

Claude cannot find the Bun runtime. Solutions:

bash
# Verify Bun is installedwhich bun
# If not found, install Buncurl -fsSL https://bun.sh/install | bash
# Or use full path in config{  "command": "/Users/yourname/.bun/bin/bun",  "args": ["run", "/path/to/index.js"]}

Authentication errors

  1. If using environment variables: Verify ONELOGIN_URL, ONELOGIN_CLIENT_ID, and ONELOGIN_CLIENT_SECRET in Claude Desktop config
  2. If using servers.json: Verify credentials in ~/.config/onelogin-mcp/servers.json
  3. Ensure OAuth2 client has API permissions in OneLogin admin panel
  4. Check client_id and client_secret are for API v2

Wrong environment

Using environment variables: Each MCP server entry has its own credentials - verify you're talking to the correct server instance in Claude.

Using servers.json: Check the ONELOGIN_SERVER environment variable in Claude Desktop config matches a server name in servers.json.

Project Structure

onelogin-mcp/├── index.js                    # MCP server entry point├── setup.js                    # Interactive credential setup├── lib/│   ├── config.js               # Credential management│   ├── onelogin-api.js         # OAuth2 client with token caching│   └── tools/│       ├── registry.js         # Tool registry and dispatcher│       ├── users.js            # User management (14 tools)│       ├── roles.js            # Role management (13 tools)│       ├── privileges.js       # Privilege management (11 tools)│       ├── apps.js             # App management (15 tools)│       ├── mfa.js              # MFA management (10 tools)│       ├── mappings.js         # User mappings (15 tools)│       ├── smart-hooks.js      # Smart Hooks (11 tools)│       ├── policies.js         # Security policies (7 tools)│       ├── risk-rules.js       # Risk rules (6 tools)│       ├── api-authorization.js # OAuth scopes (16 tools)│       ├── sessions.js         # Session tokens (5 tools)│       ├── brands.js           # Branding (6 tools)│       ├── connectors.js       # App catalog (2 tools)│       ├── reports.js          # Analytics (5 tools)│       ├── rate-limits.js      # API throttling (2 tools)│       ├── saml.js             # SAML assertions (2 tools)│       ├── invite-links.js     # Password resets (2 tools)│       ├── oauth-tokens.js     # OAuth tokens (2 tools)│       ├── events.js           # Audit logs (2 tools)│       ├── groups.js           # User groups (6 tools)│       └── accounts.js         # Child accounts (4 tools)├── package.json├── CONTRIBUTING.md├── PROGRESS.md└── README.md

Development

See CONTRIBUTING.md for guidelines on adding new tools.

Key conventions:

  • Tool descriptions include warnings, best practices, and return data structure
  • All modules export tools array and handlers object
  • Registry auto-discovers tools from module imports

Releasing

To publish a new version to npm:

  1. Merge your changes to the main branch

  2. Create a GitHub Release:

    • Go to Releases → "Draft a new release"
    • Create a new tag with the version (e.g., v1.1.0)
    • Set the release title (e.g., "v1.1.0 - MFA API fixes")
    • Add release notes describing the changes
    • Click "Publish release"
  3. Automatic Publishing: The GitHub Action will:

    • Extract the version from the release tag (strips v prefix)
    • Update package.json with the new version
    • Publish to npm under @onelogin/onelogin-mcp

Version Format: Use semantic versioning (MAJOR.MINOR.PATCH)

  • MAJOR: Breaking API changes
  • MINOR: New features, backward compatible
  • PATCH: Bug fixes, backward compatible

Manual Publishing (if needed):

  • Go to Actions → "Publish Package" → "Run workflow"
  • Optionally specify a version override

Support

License

MIT

來源:README.md,提交 1e7d1f2

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.2.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分