Index Agentica

Connect an agent to identity and secrets systems without handing it the keys

A least-privilege checklist for identity and secrets MCP servers, worked through on Okta, Bitwarden and Clerk plus 1Password's agent hooks: scope tools to read-only first, keep secrets out of model context, gate writes with a human, and keep audit logs.

Type
Guide
Author
Agentica Author
Published
Last verified
Difficulty
intermediate
Time
30 min

Prerequisites

Identity providers and password managers are the systems where a wrong tool call costs the most: a deleted policy locks people out, an invited admin is a new attacker, and a read of a vault item puts a password into a model's context. Four tools from the directory sit in this area, and they make very different promises. This guide reads what each vendor actually documents, then gives one checklist that works for all of them.

Nothing here was installed or run. Every claim below comes from the vendor README or spec named in the sources, read on 29 November 2026. No Okta org, Bitwarden vault, Clerk account or 1Password account was used. Do your first run against a throwaway tenant or vault, never your production one.

What each tool documents

Okta MCP ServerBitwarden MCP ServerClerk skills and MCP1Password Agent Hooks
What it isOfficial open-source server for Okta admin APIs (users, groups, apps, policies, logs)Local server for a Bitwarden vault (CLI) and organisation admin (Public API)Skills pack plus a hosted MCP server at mcp.clerk.com/mcpHook scripts that run before shell or tool use and check 1Password setup
Where it runsYou run it yourself with Docker or uv; README documents no hosted endpointLocal use only (stdio); README says never host or expose itHosted by Clerk; sign in with a Dashboard accountLocal scripts in your agent's hooks config
Least privilegeOAuth scopes in OKTA_SCOPES; tools without a granted scope are not registeredNot documented: no scope list, read-only mode or tool filter in the README. File tools need BW_ALLOWED_DIRECTORIESActs as you, limited by your workspace roleNot applicable: it validates, it does not grant
Secrets and the modelNo secret-returning tools documentedRetrieval tools return vault items; README warns responses may reveal credentialsREADME says the server never returns secret keysHook checks that mounted .env files exist and are enabled; it does not itself keep secrets out of context
Human approvalDeletes and deactivations use MCP elicitation; fallback asks the model to relayNot documentedChange-making tools are flagged so agents can ask firstA hook can deny a command; it is not an approval step
Logsget_logs tool (scope okta.logs.read) reads Okta logsget_org_events reads organisation events; README says to monitor logsPer-call analytics go to Clerk; no user-facing audit log is described in the READMEOpt-in local telemetry only

The empty cells matter. Where a README is silent, treat the control as absent and add it on the client side (step 2).

1. Decide the tier before you connect

Pick the lowest tier that does the job.

  1. Read-only inspection. Listing users, reading logs, checking a policy. Safe enough for a first run in a throwaway tenant.
  2. Reversible writes. Creating a group or adding a member. Needs a human click per call.
  3. Destructive or privilege-changing writes. Deleting, deactivating, inviting admins, changing policies, approving devices. Keep these out of the agent's reach unless a person is present and approves each call.
  4. Reading secret values. Retrieving a password or TOTP code into the conversation. Avoid; see step 3.

2. Make the client enforce the tier

The vendor controls above are a first layer. Add your own in the MCP client, because a server that documents no gate cannot be trusted to have one.

Claude Code's permission rules match MCP tools as mcp__<server>__<tool> or mcp__<server>__*, and rules are evaluated deny first, then ask, then allow (per its permissions docs). A starting point for the Bitwarden server, assuming you named it bitwarden, with tool names taken from its README (not run here):

{
  "permissions": {
    "deny": [
      "mcp__bitwarden__get",
      "mcp__bitwarden__list",
      "mcp__bitwarden__device_approval_approve",
      "mcp__bitwarden__device_approval_approve_all",
      "mcp__bitwarden__device_approval_deny_all",
      "mcp__bitwarden__invite_org_member",
      "mcp__bitwarden__reinvite_org_member",
      "mcp__bitwarden__update_org_member",
      "mcp__bitwarden__remove_org_member",
      "mcp__bitwarden__update_org_policy",
      "mcp__bitwarden__update_org_subscription",
      "mcp__bitwarden__import_org_users_and_groups",
      "mcp__bitwarden__delete",
      "mcp__bitwarden__restore",
      "mcp__bitwarden__delete_org_collection",
      "mcp__bitwarden__delete_org_group",
      "mcp__bitwarden__delete_send"
    ],
    "ask": [
      "mcp__bitwarden__create_item",
      "mcp__bitwarden__edit_item",
      "mcp__bitwarden__update_org_collection",
      "mcp__bitwarden__update_org_group",
      "mcp__bitwarden__update_org_member_groups",
      "mcp__bitwarden__update_org_group_members",
      "mcp__bitwarden__list_org_members",
      "mcp__bitwarden__get_org_events"
    ]
  }
}

This list is a template, not a complete one: the README names many more write tools (collection, group, folder, attachment, Send and move/confirm tools), so rebuild it from the tools your installed version really lists (the MCP Inspector, npm run inspect in Bitwarden's repo, shows them; see MCP Inspector). get and list are on the deny list on purpose: per the README they return vault items, which puts secrets in the conversation. If retrieval is the point of your setup, remove them knowingly, keep the rest of the deny list, and read step 3 first. restore and delete_org_* are denied because they change what the vault or organisation holds without a person reviewing it.

For Okta, do the equivalent in the server's own config first: the README says tools are registered only for scopes in OKTA_SCOPES and advises starting with the minimum set, for example okta.users.read okta.brands.read. It also says okta.<resource>.manage enables write operations and implicitly includes read, so a manage scope is never "read plus a little". Start read-only, and add a manage scope for one resource only when a person is watching.

For Okta's two auth methods, the README offers a Device Authorization Grant for interactive use and Private Key JWT for browserless use. The private-key path needs an API Services app with a key pair and an assigned admin role, so the app's admin role is a second limit on top of scopes. Prefer the interactive grant for a first run and give the app the narrowest admin role that works (an editorial judgment; the README only says to follow least privilege).

3. Keep secrets out of the model's context

Two different questions get mixed up here.

Credentials for the server itself. Bitwarden's config holds BW_SESSION, and for organisation features BW_CLIENT_ID and BW_CLIENT_SECRET, in the MCP client config. Its README says those files are sensitive, never to commit or share them, and notes that session tokens expire after inactivity. Its unlock tool takes no parameters and opens a native OS password dialog, so by the README's account the master password never crosses the MCP channel or reaches the model. Okta's README describes credentials managed through its auth flows and environment variables. The Clerk server uses a Dashboard sign-in rather than a pasted key.

Secret values the agent reads or uses. This is where the tools differ most.

If you build your own server in this space, the MCP elicitation spec is explicit: servers must not use form-mode elicitation to request passwords, API keys, access tokens or payment credentials, and must use URL mode for such interactions. Do not collect a secret by asking the model to relay it.

4. Put a human on every write that matters

5. Keep an audit trail you control

6. Treat the server itself as untrusted code

Pre-flight checklist

  1. Throwaway tenant or vault, no production data.
  2. Narrowest scopes or role the task needs; write scopes absent on the first run.
  3. Deny rules for privilege-changing and secret-reading tools; ask rules for every other write.
  4. Pinned, reviewed server version; no unreviewed npx -y of an unpinned package.
  5. No secret value in prompts, tool arguments or config files that are committed or shared.
  6. Server and agent run on your own machine or in a sandbox; a server whose README says local-only (Bitwarden's) is never exposed on a network.
  7. A client-side log of tool calls and approvals, plus the vendor's own logs, checked after the run.
  8. A rollback path: how to revoke the app registration, API key or session token if something goes wrong.
  9. Rate limits and costs understood. Okta's README notes that use of the server consumes Management API rate limits; vendor plans are separate from these free servers.

Rollout order

  1. Run the server against a throwaway tenant with read-only scopes and the deny list above.
  2. List its tools with the MCP Inspector and confirm they match what you expect.
  3. Ask for read-only reports and review the log.
  4. Add one write scope at a time, with an ask rule, and approve each call by hand.
  5. Only then consider unattended use, with Private Key JWT or an equivalent, a dedicated app and alerts on its activity.

What this guide does not cover

It does not test any server, and it does not rank them: Okta and Bitwarden are different products, and the table above compares documentation, not safety. For the OAuth side of connecting to remote servers, see Agent auth and delegated access and Agent identity and MCP authorization platforms. For what MCP authorization requires of a server you build, see the Model Context Protocol entry.

Directory entries in this guide

Related

Sources

Machine-readable