Add macOS Keychain fallback for 1Password service account token#6
Merged
CakeRepository merged 3 commits intomasterfrom Apr 26, 2026
Merged
Conversation
Agent-Logs-Url: https://github.com/CakeRepository/1Password-MCP/sessions/4c5b132a-69be-40e9-ad6d-742b25bca276 Co-authored-by: CakeRepository <27045642+CakeRepository@users.noreply.github.com>
Agent-Logs-Url: https://github.com/CakeRepository/1Password-MCP/sessions/4c5b132a-69be-40e9-ad6d-742b25bca276 Co-authored-by: CakeRepository <27045642+CakeRepository@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for macOS Keychain to store service account token
Add macOS Keychain fallback for 1Password service account token
Apr 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today the server expects
OP_SERVICE_ACCOUNT_TOKENto be present directly in MCP client config or process env, which leaves a plaintext credential in a predictable local config file for common setups. This change adds a native macOS Keychain lookup path so the server can start without embedding the token in config.Config resolution
OP_SERVICE_ACCOUNT_TOKENis absent.OP_KEYCHAIN_SERVICE— required to identify the Keychain itemOP_KEYCHAIN_ACCOUNT— optional account filter for disambiguation--service-account-token/--tokenOP_SERVICE_ACCOUNT_TOKENServer behavior
security find-generic-passwordCLI ondarwinonly.tokenSourcereporting to includekeychain.Docs and metadata
README.md.server.jsonsoOP_SERVICE_ACCOUNT_TOKENis no longer described as the only required path.Example
{ "mcpServers": { "1password": { "command": "npx", "args": ["-y", "@takescake/1password-mcp"], "env": { "OP_KEYCHAIN_SERVICE": "op-service-account-claude-automation", "OP_KEYCHAIN_ACCOUNT": "your-macos-username" } } } }With this configuration, the server reads the token from macOS Keychain at startup instead of requiring a plaintext
OP_SERVICE_ACCOUNT_TOKENin the MCP config.