Okta Workspace MCP

Okta Workspace MCP

A community security-research MCP server providing Browser Session and OIDC authentication for Okta workspaces, enabling read-only exploration of Okta organizations and user identity.

Category
访问服务器

README

Okta Workspace MCP

Okta Workspace MCP is one local stdio MCP server with a guided authentication choice:

  • Browser Session opens an isolated browser and publishes valid JSON cookie objects with every value replaced by [REDACTED].
  • OIDC / OAuth uses Authorization Code with PKCE for identity and optional read-only Okta organization tools.

The server is a community security-research project and is not affiliated with or endorsed by Okta. Use only organizations and identities you are authorized to test.

Canonical startup

There is one MCP entrypoint:

node scripts/okta-mcp.mjs

On Windows, the equivalent wrapper is:

scripts\start-okta-mcp.cmd

An MCP client launches this command over stdio. On first use, when the user asks to start or configure Okta, the client calls okta-start. The MCP then uses form elicitation to ask:

  1. Browser Session or OIDC / OAuth.
  2. The exact authorized Okta organization URL.
  3. The same tenant URL again (or its exact hostname). Selecting Continue explicitly confirms authorization.
  4. OIDC client settings only when OIDC was selected.

Later okta-start calls reuse the saved mode and tenant without reopening the form. Use reconfigure=true only to deliberately change the setup.

Do not launch MCP Inspector for normal startup. Inspector is a development debugger and is not this MCP's configuration or authentication experience.

Install from source

Requirements:

  • Node.js 20 or newer for OIDC mode
  • Node.js 22 or newer for Browser Session mode
  • Edge or Chrome for Browser Session mode
  • An MCP client supporting local stdio servers
npm ci
npm run build

Connect an MCP client

Codex

Register the source checkout once with its absolute entrypoint:

npm run setup:codex

The setup script writes the okta-workspace entry through codex mcp add and checks that Codex retained the exact absolute path. A checked-in relative cwd is intentionally not used: desktop Codex processes may resolve an MCP working directory from the application directory instead of the repository.

Verify the registration at any time with:

npm run check:codex

Restart Codex once after registration. Then ask:

Start Okta MCP

Codex reads the server instructions and calls okta-start; it should not open Inspector.

Visual Studio Code

The checked-in .vscode/mcp.json starts the same canonical entrypoint. Reload VS Code, start okta-workspace from MCP: List Servers, and ask the client to start Okta MCP.

Other MCP clients

Use a stdio configuration equivalent to:

{
  "type": "stdio",
  "command": "node",
  "args": ["C:\\absolute\\path\\to\\scripts\\okta-mcp.mjs"]
}

Running the command directly in an ordinary terminal only leaves it waiting for MCP JSON-RPC input. Configuration forms are presented by the attached MCP client after it calls okta-start.

Browser Session mode

Browser mode asks only for the Okta tenant; it does not require an OIDC client ID. After confirmation, it:

  1. Starts the loopback-only collector on 127.0.0.1:8765 if needed.
  2. Opens Edge or Chrome with a temporary isolated profile.
  3. Lets the user authenticate directly on the configured Okta origin.
  4. Verifies the session with same-origin /api/v1/users/me.
  5. Exports browser cookie objects as valid JSON with every value exactly [REDACTED].
  6. Keeps the visible isolated browser alive so the user and MCP can work in the same authenticated session.
  7. Publishes a new redacted proof every five minutes, after authentication or reauthentication, and when authenticated session material rotates.
  8. Closes the browser and deletes its temporary profile on explicit close, MCP shutdown, manual browser close, or 30 minutes of inactivity. The collector retains only the newest proof by default.

Endpoints:

http://127.0.0.1:8765/
http://127.0.0.1:8765/v1/cookie-proofs

Cookie metadata can include name, domain, path, expiry, size, HttpOnly, Secure, SameSite, session, priority, source scheme, and source port. The collector rejects the entire POST if any cookie value is not [REDACTED].

The live worker communicates with the MCP through private child-process IPC; it does not expose a browser-control HTTP port. Browser tools are intentionally read-only: they provide sanitized page snapshots, same-tenant navigation, and credentialed GET requests limited to /api/v1/. Cross-origin navigation, arbitrary JavaScript, form filling, clicks, and state-changing requests are not available in this first version.

OIDC / OAuth mode

OIDC mode additionally asks for:

  • Public Okta Native OIDC client ID
  • Authorization server (org by default, or a custom server ID)
  • OAuth scopes
  • Loopback callback host and port

The default identity scopes are:

openid profile email offline_access

The default callback is:

http://localhost:8749/callback

Okta treats localhost and 127.0.0.1 as different redirect URIs. Register the exact URI selected in okta-start.

The OAuth proof uses the same in-memory bearer token for two read-only UserInfo requests and publishes only a SHA-256 fingerprint and response metadata:

http://127.0.0.1:8765/v1/oauth-token-proofs

Base64 is not used because it is reversible. Raw access, refresh, and ID token values are never returned by MCP tools or sent to the collector.

Create the Native OIDC application

This setup is required only for OIDC mode:

  1. In Okta Admin, create an OIDC - OpenID Connect integration.
  2. Choose Native Application.
  3. Enable Authorization Code and Refresh Token.
  4. Register the exact loopback redirect URI.
  5. Keep client authentication set to None.
  6. Assign only authorized users or groups.
  7. Copy the public client ID into the okta-start form.

For organization-read tools, an administrator must also grant the requested okta.* scopes to the application. The signed-in user must separately have an appropriate Okta role or custom resource assignment.

MCP tools

Setup and evidence

Tool Purpose
okta-start Choose Browser or OIDC, collect relevant configuration, save it, and begin authentication
okta-status Show selected mode, tenant, connection state, collector state, and latest redacted proofs
okta-browser-session-proof Open or reuse the live isolated Browser Session
okta-browser-status Show live-session, identity, page, timeout, and proof-refresh state
okta-browser-snapshot Return sanitized visible page structure without input values or credentials
okta-browser-navigate Navigate to a URL or path on the configured Okta origin only
okta-browser-read Run a same-origin, read-only GET under /api/v1/ using the browser session
okta-browser-refresh-proof Publish a redacted proof immediately
okta-browser-close Close the browser and delete its temporary profile
okta-oauth-login Repeat PKCE authentication when OIDC mode is selected
okta-oauth-reuse-proof Produce the redacted two-use OAuth fingerprint proof

OIDC identity and read tools

Tool Requirement
whoami, userinfo, token-details Connected OIDC authorization
my-groups Optional groups ID-token claim
my-apps, list-users, get-user, search-users okta.users.read and suitable Okta authorization
list-groups okta.groups.read and suitable Okta authorization
list-apps okta.apps.read and suitable Okta authorization

Saved configuration

The current OS user's configuration directory is ~/.okta-workspace-mcp (%USERPROFILE%\.okta-workspace-mcp on Windows):

  • startup.json stores the selected authentication mode and tenant.
  • config.json stores OIDC client configuration only when OIDC is selected.
  • tokens.json stores live OAuth credentials only after OIDC authentication.

The live Browser Session is deliberately not saved here. Its authenticated temporary profile exists only while its browser worker is running.

Normal okta-start calls reuse these settings. To change modes or settings, call okta-start with reconfigure=true; the MCP presents the choice again and overwrites only the relevant configuration.

The CLI remains available for OIDC maintenance and automation:

okta-workspace-mcp configure
okta-workspace-mcp login
okta-workspace-mcp status
okta-workspace-mcp logout

Verification

npm run smoke
node scripts/collector-startup-test.mjs
node scripts/lab-mcp-smoke.mjs

The smoke tests verify MCP-native mode elicitation, browser-only configuration without a client ID, OIDC configuration, PKCE behavior, token-value exclusion, cookie-value rejection, retention, and package contents.

See SECURITY.md and RESEARCH_DEMONSTRATION.md for operational and publication guidance.

License

MIT. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选