Metadata-Version: 2.4
Name: independent-okta-mcp
Version: 0.3.0
Summary: Independent, read-only MCP server for the Okta Management API with group-based tool policy. Not affiliated with or endorsed by Okta.
Keywords: mcp,okta,model-context-protocol,identity,read-only
License-Expression: LicenseRef-Commons-Clause-Apache-2.0
License-File: LICENSE
License-File: NOTICE
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: System :: Systems Administration :: Authentication/Directory
Requires-Dist: anyio>=4.6
Requires-Dist: httpx2>=2.16
Requires-Dist: jsonschema>=4.23
Requires-Dist: mcp==2.3.0
Requires-Dist: pydantic>=2.10
Requires-Dist: pyjwt[crypto]>=2.10
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: starlette>=0.48
Requires-Dist: uvicorn>=0.34
Requires-Python: >=3.12
Project-URL: Homepage, https://github.com/zloether/independent-okta-mcp
Project-URL: Source, https://github.com/zloether/independent-okta-mcp
Project-URL: Documentation, https://github.com/zloether/independent-okta-mcp/tree/main/docs
Project-URL: Issues, https://github.com/zloether/independent-okta-mcp/issues
Project-URL: Changelog, https://github.com/zloether/independent-okta-mcp/blob/main/CHANGELOG.md
Description-Content-Type: text/markdown

# independent-okta-mcp

A self-hosted, read-only [MCP](https://modelcontextprotocol.io) server for the Okta Management API. Users sign in with Okta OAuth; their groups map to roles in a version-controlled policy that decides what each may call. Runs as one stateless container.

An independent project: not affiliated with, endorsed by or supported by Okta, Inc.

## Status

**Beta.** Suitable for initial production use; read the no-warranty terms below and the [runbook](https://github.com/zloether/independent-okta-mcp/blob/main/docs/runbook.md) first. Before `1.0` a minor version can rename commands or change the policy file format and environment variables; read the [changelog](https://github.com/zloether/independent-okta-mcp/blob/main/CHANGELOG.md) before upgrading.

**No warranty.** The software is provided "as is", with no guarantee or warranty of any kind, express or implied, including fitness for a particular purpose. To the fullest extent the law allows, the author and contributors are not liable for any damage or loss from using it, including to your Okta org or its data. Anyone who uses it assumes all risk. Nothing in this repository's documentation, its tests or its reviews changes that; the binding terms are sections 7 and 8 of the [LICENSE](https://github.com/zloether/independent-okta-mcp/blob/main/LICENSE).

| | |
|---|---|
| Done | The server, policy engine, 24 command domains, container and setup tools, tested against mocked Okta in CI |
| Checked against an Okta dev org | The setup script; most commands through stdio dev mode; OAuth sign-in from Claude Code to this server over loopback HTTP and through a TLS proxy (Caddy), with tool calls and token refresh (option B); sign-in from the Claude connector (claude.ai) and ChatGPT (developer mode) to a deployment with a public URL, with tool calls (option A); role changes, group removal and token revocation taking effect at the next refresh, refresh tokens outliving the Okta session and expiring by the authorization server's policy, and 429 handling (option B); group removal taking effect when the token is next renewed (option A); a deployment from the [runbook](https://github.com/zloether/independent-okta-mcp/blob/main/docs/runbook.md) on a clean machine; the compose example up to a ready container; the service app's rate-limit share capping its requests; `diagnostics login-failures` against real sign-in failures (lockout, unassigned app, policy DENY, MFA, device assurance and posture). The Kubernetes example ran on a local cluster |
| Checked nightly in CI against an Okta org | The service token with DPoP; every registry command but eight the CI org can't serve; each example role's allowed and refused calls; paging; path routing; `diagnostics login-failures` on four sign-in failures the job causes ([plan 8.2.1](https://github.com/zloether/independent-okta-mcp/blob/main/docs/implementation-plan.md)) |
| Not yet done | `diagnostics login-failures` on IdP and threat events; commands whose scopes or features none of the available orgs offer |
| Review | Written and reviewed with AI assistance (Claude Code), directed by the maintainer; security reviews by AI models from more than one vendor. **No independent human security review** ([SECURITY.md](https://github.com/zloether/independent-okta-mcp/blob/main/SECURITY.md#review-status)) |

What is left is tracked in the [plan](https://github.com/zloether/independent-okta-mcp/blob/main/docs/implementation-plan.md).

## Read more

- [Compared with Okta's MCP server](https://github.com/zloether/independent-okta-mcp/blob/main/docs/comparison.md): when to use Okta's own server instead, and how they differ
- [Okta setup](https://github.com/zloether/independent-okta-mcp/blob/main/docs/okta-setup.md): prerequisites (API Access Management), clients, service app
- [Deployment scenarios](https://github.com/zloether/independent-okta-mcp/blob/main/docs/deployment-scenarios.md): where to host it, internal or internet-facing, one host or replicated
- [Runbook](https://github.com/zloether/independent-okta-mcp/blob/main/docs/runbook.md): deploy, operate, rotate, kill switch
- [Clients](https://github.com/zloether/independent-okta-mcp/blob/main/docs/compatibility-matrix.md): how an MCP client connects, and which have been tried
- [Versioning](https://github.com/zloether/independent-okta-mcp/blob/main/docs/versioning.md): what a release may change, and how breaking changes are announced
- [Design](https://github.com/zloether/independent-okta-mcp/blob/main/docs/design/mcp-server.md) · [Plan](https://github.com/zloether/independent-okta-mcp/blob/main/docs/implementation-plan.md) · [Changelog](https://github.com/zloether/independent-okta-mcp/blob/main/CHANGELOG.md)
- [Security policy](https://github.com/zloether/independent-okta-mcp/blob/main/SECURITY.md) · [Contributing](https://github.com/zloether/independent-okta-mcp/blob/main/CONTRIBUTING.md)

## Install

From a [release](https://github.com/zloether/independent-okta-mcp/releases): the container image from GHCR, pinned by the digest in its release notes (the supported way; `linux/amd64` and `linux/arm64` from `0.1.1`), or the package installed from the release's hashed `requirements.lock` and wheel ([runbook §3.6](https://github.com/zloether/independent-okta-mcp/blob/main/docs/runbook.md#36-without-a-container-install-from-a-release)). A plain `pip install independent-okta-mcp` from PyPI resolves unpinned dependency versions and is not supported for production. The license is not OSI-approved (see License below), which some company dependency policies block.

## Usage

An operator deploys the server ([runbook](https://github.com/zloether/independent-okta-mcp/blob/main/docs/runbook.md)) and gives users its URL and the client app's ID. With Claude Code:

```sh
claude mcp add --transport http okta https://mcp.example.com/mcp \
  --client-id 0oa1client0000000000 --callback-port 8765
```

In a session, run `/mcp`, pick `okta` and sign in with Okta in the browser. The server then lists only the tools you can call: `okta_status` always, and `okta_help` plus one `okta_<domain>` tool per domain your role allows (for a helpdesk role, say, `okta_users` and `okta_groups`). Ask for `okta_status` first: it says who you are to the server, your roles, the commands each tool lets you run, and any your role allows that are hidden because the service app lacks the Okta scopes for them. Every call is read-only and checked against your role; try `okta_groups list`. Other clients: [compatibility matrix](https://github.com/zloether/independent-okta-mcp/blob/main/docs/compatibility-matrix.md).

## Local dev mode (stdio)

Try it against a dev org from a local MCP client. No authentication: the caller is the principal in a file, checked by the normal policy. Refused when `MCP_ENV=production`.

```yaml
# principal.yaml: who you are to the policy
uid: 00u1abcdEFGH2ijkl345        # your Okta user ID
sub: you@example.com
groups: [00g1readers000000000]   # group IDs your policy maps to roles
```

```
MCP_DEV_MODE=1 MCP_DEV_PRINCIPAL_FILE=principal.yaml \
MCP_POLICY_FILE=tests/policy/fixtures/pilot.yaml \
MCP_CURSOR_KEY="$(openssl rand -base64 32)" \
OKTA_ORG_URL=https://your-org.okta.com OKTA_SCOPES="okta.groups.read okta.networkZones.read" \
OKTA_API_TOKEN_FILE=okta-token.txt \
uv run okta-mcp --stdio
```

Add `--check` to validate the configuration and policy without serving (exit `0` or `2`).

Use a read-only admin's API token, or the service app (`OKTA_CLIENT_ID`, `OKTA_PRIVATE_KEY_FILE`). In a client config, pass the same variables as the server's environment, with a fixed `MCP_CURSOR_KEY` (cursors break on each restart otherwise).

## License

Apache-2.0 with the Commons Clause: free to use and modify, not to sell. See [LICENSE](https://github.com/zloether/independent-okta-mcp/blob/main/LICENSE). The Commons Clause makes it source-available, not open source: it isn't an OSI-approved license. The vendored Okta OpenAPI specification is Okta's, under Apache-2.0 ([NOTICE](https://github.com/zloether/independent-okta-mcp/blob/main/NOTICE)).
