
1password
- 18 repo stars
- Updated July 4, 2026
- CakeRepository/1Password-MCP
1Password MCP is an MCP server that exposes vault tools and resources to agents using a 1Password service account token.
About
The 1Password MCP server lets developers wire service-account access into Claude Code, Cursor, or other stdio MCP hosts so agents fetch vault entries on demand instead of echoing secrets in prompts. It maps cleanly to Ship › Security: you configure a 1Password service account token, scope vaults for CI and dev machines, and register the npm package in your MCP manifest. Tools and resources abstract common credential reads so deployment scripts and codegen can reference item names rather than.env dumps. You still own rotation policy and audit in 1Password; this server is a protocol adapter, not a secrets manager replacement. Intermediate setup assumes you already use 1Password Business or compatible service accounts.
- MCP tools and resources for 1Password service accounts (v2.0.3)
- Stdio transport via npm @takescake/1password-mcp
- Requires OP_SERVICE_ACCOUNT_TOKEN (secret env var)
- Vault and credential access designed for agent workflows, not browser-only unlock
1password by the numbers
- Data as of Jul 7, 2026 (Skillselion catalog sync)
claude mcp add --env OP_SERVICE_ACCOUNT_TOKEN=YOUR_OP_SERVICE_ACCOUNT_TOKEN 1password -- npx -y @takescake/1password-mcpAdd your badge
Show developers this MCP server is listed on Skillselion. Paste this into your README.
| repo stars | ★ 18 |
|---|---|
| Package | @takescake/1password-mcp |
| Transport | STDIO |
| Auth | Required |
| Last updated | July 4, 2026 |
| Repository | CakeRepository/1Password-MCP ↗ |
What it does
Expose 1Password vault items to coding agents via a service account without copying secrets into repos.
Who is it for?
Best when you're already on 1Password service accounts and want MCP-native secret fetch for coding agents.
Skip if: Personal 1Password without service accounts, teams forbidding automated vault access, or hosts that cannot run stdio npm MCP.
What you get
After install, your agent can resolve named credentials from scoped vaults through MCP instead of static env copies.
- Configured MCP server with scoped vault access
- Agent-callable tools/resources for credential lookup by item
By the numbers
- Version 2.0.3; registry npm @takescake/1password-mcp
- One required secret env: OP_SERVICE_ACCOUNT_TOKEN
- Transport: stdio
README.md
1Password MCP Server
A community-built Model Context Protocol (MCP) server that connects MCP-compatible AI clients (Claude Desktop, VS Code Copilot, OpenAI Codex, Gemini, etc.) to 1Password vaults via a Service Account.
Not an official 1Password product. This is a community project.
Features
Tools (8)
| Tool | Description |
|---|---|
vault_list |
List all accessible vaults |
item_lookup |
Search items by title in a vault |
item_delete |
Delete an item from a vault |
password_create |
Create a new password/login item |
password_read |
Retrieve a password via secret reference (op://vault/item/field) or vault/item ID |
password_update |
Rotate/update an existing password |
password_generate |
Generate a cryptographically secure random password |
password_generate_memorable |
Generate a memorable passphrase from ~500 dictionary words |
Prompts (4)
| Prompt | Description |
|---|---|
generate-secure-password |
Guided workflow to generate and store a secure password |
credential-rotation |
Step-by-step credential rotation: read, generate, update, verify |
vault-audit |
Audit vault contents: list items, categorize, flag concerns |
secret-reference-helper |
Construct op://vault/item/field references interactively |
Resources (3)
| Resource URI | Description |
|---|---|
1password://config |
Current server configuration (non-secret) |
1password://vaults |
Browsable list of all accessible vaults |
1password://vaults/{vaultId}/items |
Browsable list of items in a vault |
Quick Start
Prerequisites
- Node.js >= 18
- A 1Password Service Account token
Claude Desktop / VS Code / IDEs (JSON)
{
"mcpServers": {
"1password": {
"command": "npx",
"args": ["-y", "@takescake/1password-mcp"],
"env": {
"OP_SERVICE_ACCOUNT_TOKEN": "YOUR_SERVICE_ACCOUNT_TOKEN"
}
}
}
}
macOS Keychain (JSON)
If you do not want to store the service account token directly in your MCP config, macOS users can store it in Keychain and configure the server to read it at startup instead:
{
"mcpServers": {
"1password": {
"command": "npx",
"args": ["-y", "@takescake/1password-mcp"],
"env": {
"OP_KEYCHAIN_SERVICE": "op-service-account-claude-automation",
"OP_KEYCHAIN_ACCOUNT": "your-macos-username"
}
}
}
}
Precedence is: CLI arguments (--service-account-token / --token) > OP_SERVICE_ACCOUNT_TOKEN > macOS Keychain lookup. OP_KEYCHAIN_ACCOUNT is optional if your Keychain service name is already unique enough.
OpenAI Codex (TOML)
Option A (stores the token in config):
[mcp_servers."1password"]
command = "npx"
args = ["-y", "@takescake/1password-mcp"]
[mcp_servers."1password".env]
OP_SERVICE_ACCOUNT_TOKEN = "YOUR_SERVICE_ACCOUNT_TOKEN"
Option B (recommended: does NOT store the token in Codex config):
[mcp_servers."1password"]
command = "npx"
args = ["-y", "@takescake/1password-mcp"]
env_vars = ["OP_SERVICE_ACCOUNT_TOKEN"]
Then set OP_SERVICE_ACCOUNT_TOKEN in your shell/session/CI environment.
Note:
codex mcp add ... --env OP_SERVICE_ACCOUNT_TOKEN=...writes the token into Codex config. Useenv_varsif you want the config to reference only the variable name.
On macOS, you can also omit OP_SERVICE_ACCOUNT_TOKEN and set OP_KEYCHAIN_SERVICE (plus optional OP_KEYCHAIN_ACCOUNT) to read the token from Keychain at startup.
CLI Options
--service-account-token <token> 1Password service account token
--log-level <level> Log level: error, warn, info, debug (default: info)
--integration-name <name> Custom integration name for 1Password SDK
--integration-version <version> Custom integration version
Security & Privacy
Read this before using.
- LLM privacy risk -- Secrets retrieved/created may be sent to your LLM provider and could be retained depending on your provider/account settings.
- No E2E encryption in MCP -- Secrets are plaintext inside the MCP workflow and in transit to the model. They are encrypted only once stored in 1Password.
- Intended use -- Best for automated/disposable credentials (dev DB creds, bot/service accounts, CI tokens).
- Avoid high-stakes secrets -- Do not use for banking, primary personal accounts, or other sensitive credentials. Use dedicated automation vaults.
- Token security -- Treat the Service Account Token like a master key. Rotate immediately if exposed.
- Config files -- Keep MCP config files out of version control (add to
.gitignore). - Secret references -- Prefer
op://...references over copying raw passwords into prompts or files. - Least privilege -- Use dedicated vaults and limited-scope service accounts for automation workflows.
Development
# Clone and install
git clone https://github.com/CakeRepository/1Password-MCP.git
cd 1Password-MCP
npm install
# Build
npm run build
# Run tests
npm test
# Type-check
npm run lint
# Watch mode (dev)
npm run dev
Project Structure
src/
index.ts # Server entrypoint
types.ts # Shared type definitions
logger.ts # Structured logging (stderr)
config.ts # CLI args, env vars, constants
client.ts # 1Password SDK client singleton
utils.ts # Result helpers, password generation
tools/ # MCP tool handlers
index.ts
vault-list.ts
item-lookup.ts
item-delete.ts
password-create.ts
password-read.ts
password-update.ts
password-generate.ts
password-generate-memorable.ts
prompts/ # MCP prompt definitions
index.ts
resources/ # MCP resource definitions
index.ts
See CONTRIBUTING.md for contribution guidelines.
License
Recommended MCP Servers
How it compares
1Password service-account MCP adapter, not a generic password generator skill.
FAQ
Who is 1password MCP for?
Developers using 1Password service accounts who want Claude, Cursor, or Codex to read vault items through MCP safely.
When should I use 1password MCP?
Use it while shipping—configuring deploy keys, third-party API tokens, and agent runtimes—before secrets spread across repos.
How do I add 1password MCP to my agent?
Set OP_SERVICE_ACCOUNT_TOKEN in your MCP server env, add @takescake/1password-mcp (stdio) to your client config, then restart the host.