Skip to main content
MCP server CX Codex

1password — Claude Code MCP server: what it does, how to install

Connects a 1Password Service Account to your AI assistant. Enables safe credential management and local command execution using op:// references without leaking plaintext.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env OP_SERVICE_ACCOUNT_TOKEN=<OP_SERVICE_ACCOUNT_TOKEN> --env OP_KEYCHAIN_SERVICE=<OP_KEYCHAIN_SERVICE> --env OP_KEYCHAIN_ACCOUNT=<OP_KEYCHAIN_ACCOUNT> --transport stdio 1password -- npx -y @takescake/1password-mcp
Open on GitHub

What 1password does

This server connects AI coding assistants to your 1Password vaults using a Service Account token. It provides fifteen tools covering entry searches, secure note creation, password generation, and credential updates.

Inspection tools omit passwords and sensitive tokens by default, returning non-confidential metadata unless explicitly requested. The op_run tool runs shell commands by resolving paths like op://vault/item/field straight into child process environment variables, scrubbing known secrets from the returned console stream.

Operation requires Node.js 20 or newer and an active service account token passed via OP_SERVICE_ACCOUNT_TOKEN. Without vault access granted to that service account, queries will fail.

What it helps with

  • execute local CLI scripts with secrets injected through op_run
  • generate random or memorable passwords and record them in a vault
  • search and retrieve entry metadata without exposing confidential fields in chat
  • audit accessible vaults and detect duplicate items via workflow prompts

Example prompts for the agent

  • Search my automation vault for staging database credentials and show metadata
  • Generate a 32-character random password and update the backend service login
  • Run the deployment command with op_run using op://production/aws/secret_key

How to install 1password

Platform CLI

claude mcp add --env OP_SERVICE_ACCOUNT_TOKEN=<OP_SERVICE_ACCOUNT_TOKEN> --env OP_KEYCHAIN_SERVICE=<OP_KEYCHAIN_SERVICE> --env OP_KEYCHAIN_ACCOUNT=<OP_KEYCHAIN_ACCOUNT> --transport stdio 1password -- npx -y @takescake/1password-mcp

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about 1password

How to install 1password in Claude Code?

Run this terminal command: claude mcp add 1password -e OP_SERVICE_ACCOUNT_TOKEN=<OP_SERVICE_ACCOUNT_TOKEN> -- npx -y @takescake/1password-mcp.

What does 1password MCP server do?

It gives MCP-compatible assistants controlled access to 1Password vaults via a service account token. The agent can browse items, rotate passwords, and pass secret references directly into subcommands.

How does op_run protect credentials?

It injects values from op:// paths strictly into the child subshell environment. The tool redacts resolved secret values from standard output before handing text back to the assistant.

Similar MCP servers

Everything for Security →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor