Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 1Password secret references #37

Merged
merged 4 commits into from
Jan 27, 2025
Merged

Add support for 1Password secret references #37

merged 4 commits into from
Jan 27, 2025

Conversation

mattt
Copy link
Member

@mattt mattt commented Jan 27, 2025

This PR adds support for using 1Password secret references (op://vault/item/field) with emcee's authentication flags (--bearer-auth, --basic-auth, --raw-auth). This allows users to securely store and retrieve API credentials from their 1Password vaults at runtime.

{
  "mcpServers": {
    "twitter": {
      "command": "emcee",
      "args": [
        "--bearer-auth=op://shared/x/credential",
        "https://api.twitter.com/2/openapi.json"
      ]
    }
  }
}
Screenshot 2025-01-27 at 03 52 07

It also updates documentation in both the CLI help text and README accordingly.

@mattt mattt requested a review from carlpeaslee January 27, 2025 11:46
@mattt
Copy link
Member Author

mattt commented Jan 27, 2025

I originally considered using the official Go SDK, but that felt like overkill for what we're doing here. Shelling out to op read works well and doesn't introduce unnecessary package dependencies.

@mattt mattt merged commit f3e7ba2 into main Jan 27, 2025
1 check passed
@mattt mattt deleted the mattt/1password branch January 27, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant