Skip to main content
Glama
op-mcp
by jluckyiv

op-mcp

MCP-Server, der die 1Password CLI (op) kapselt und den Zugriff auf Geheimnisse sowie die Elementverwaltung für MCP-Clients (Cowork, Claude Code, Claude Desktop) bereitstellt.

Architektur

MCP client (Cowork, Claude Code, Claude Desktop)
  ↓ stdio (MCP protocol)
op-mcp (this Python server)
  ↓ subprocess per tool call
op CLI (1Password CLI)
  ↓ biometric prompt (Touch ID) + 1Password desktop app
1Password vaults

Der Python-Server ist bewusst schlank gehalten. Jeder Tool-Handler ruft die op-CLI auf und parst entweder JSON oder gibt die Rohausgabe zurück. Die CLI übernimmt die biometrische Authentifizierung, das Session-Caching und den gesamten Tresorzugriff. Die Python-Seite kümmert sich um das MCP-Protokoll und die Erstellung der Argumente.

Dieses Design ist konstruktionsbedingt zustandslos: Jeder Tool-Aufruf startet einen neuen CLI-Prozess. op speichert seine eigene Session innerhalb der 1Password-Desktop-App – wir verwalten keine Sessions, Tokens oder Anmeldedaten. Siehe docs/design-notes.md für die vollständige Begründung.

Related MCP server: @1claw/mcp

Voraussetzungen

  • Python 3.11 oder neuer

  • Die op-CLI muss installiert und im PATH vorhanden sein. Installation via Homebrew: brew install --cask 1password-cli (getestet mit v2.33.1).

  • Die 1Password-Desktop-App muss installiert sein und die CLI-Integration muss aktiviert sein: 1Password → Einstellungen → Entwickler → ✓ "Mit 1Password CLI integrieren".

  • Touch ID für die CLI-Autorisierung aktiviert (im selben Einstellungsbereich).

Installation

uv tool install .

Dies erstellt ein isoliertes venv und fügt op-mcp zum PATH hinzu. Zum Aktualisieren nach Code-Änderungen:

uv tool install --force .

--force überschreibt den bestehenden Einstiegspunkt und baut neu aus dem Quellcode. (--reinstall lädt PyPI-Abhängigkeiten neu herunter – für eine lokale Pfadinstallation nicht erforderlich.)

Ausführung

Der Server kommuniziert über stdio, daher wird er normalerweise von einem MCP-Client gestartet und nicht manuell aufgerufen. Für lokale Tests:

op-mcp

Der Server protokolliert in stderr und wartet auf MCP-Protokollnachrichten auf stdin. Drücken Sie Strg-C zum Beenden.

Konfiguration eines MCP-Clients

Claude Desktop: Einstellungen → Connectors → Hinzufügen → op-mcp als Befehl eingeben. Oder bearbeiten Sie claude_desktop_config.json direkt:

{
  "mcpServers": {
    "op": {
      "command": "op-mcp"
    }
  }
}

Claude Code: Fügen Sie es zu .mcp.json (Projekt) oder ~/.claude/mcp.json (global) mit derselben Struktur hinzu.

Cowork: Über die MCP-Server-Konfiguration von Cowork hinzufügen.

Empfohlene Berechtigungen

Lesezugriffe sind sicher; Schreibzugriffe sollten eine Bestätigung erfordern.

{
  "permissions": {
    "allow": [
      "mcp__op__op_ping",
      "mcp__op__op_version",
      "mcp__op__op_whoami",
      "mcp__op__op_list_vaults",
      "mcp__op__op_get_item",
      "mcp__op__op_read_secret",
      "mcp__op__op_list_items"
    ],
    "ask": [
      "mcp__op__op_create_item",
      "mcp__op__op_edit_item",
      "mcp__op__op_delete_item"
    ]
  }
}

Entwicklung

uv sync --extra dev
make test                                  # uv run pytest (fake `op` binary)
RUN_LIVE_OP_TESTS=1 uv run pytest -m live  # live tests against real op CLI
make lint                                  # ruff + pyright
make install-mcp                           # reinstall after code changes

Tests verwenden eine gefälschte op-Binärdatei (temporäre Shell-Skripte), sodass sie weder die echte CLI noch 1Password-Zugriff erfordern. Live-Tests (markiert mit @pytest.mark.live) laufen gegen die echte CLI, lösen Touch ID aus und werden standardmäßig übersprungen.

Tools

Insgesamt 10 Tools: 3 Infrastruktur, 4 Lesen, 3 Schreiben.

Infrastruktur

Tool

Beschreibung

op_ping

MCP-Server-Lebendigkeitsprüfung

op_version

op CLI-Binärversion

op_whoami

Aktuell authentifiziertes 1Password-Konto

Lese-Tools

Tool

Beschreibung

op_list_vaults

Alle zugänglichen Tresore auflisten (Namen und IDs)

op_get_item

Alle Felder eines Elements nach Name oder ID abrufen

op_read_secret

Ein Geheimnis über die Referenz op://vault/item/field lesen

op_list_items

Elemente in einem Tresor (oder über alle Tresore hinweg) auflisten

Schreib-Tools

Tool

Beschreibung

op_create_item

Ein neues Element erstellen

op_edit_item

Ein bestehendes Element bearbeiten

op_delete_item

Ein Element archivieren oder dauerhaft löschen

Außerhalb des Geltungsbereichs (vorerst)

  • op signin / op signout — Session-Management ist Aufgabe von op.

  • op document / op vault — Hinzufügen, wenn Anwendungsfälle entstehen.

  • op inject / op run — Template-Injection und Umgebungs-Lade-Workflows sind Befehlszeilen-Annehmlichkeiten ohne sauberes MCP-Äquivalent.

  • Service-Account-Tokens — dieser Server setzt biometrische Desktop-Authentifizierung voraus.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    • Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.

      https://remote.exza.de/mcp
    • Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.

      https://mssql.insightfulmcp.com/
    • The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.

      https://mcp.remote-mcp.com
    • Kliv is an AI web-app builder. It hosts each app with its own database, edge functions, commerce and email. Connect Claude Code or Cursor to Kliv's MCP server, sign in with your Kliv account, and your AI tool can work on your apps with the same tools the Kliv builder uses. It can edit an app's files, change the database, write and run edge functions, set up products and subscriptions, and run your tests. Then it can build and publish the app. Other MCP clients connect the same way. Your AI tool runs on your own AI subscription, so this work doesn't use your Kliv usage. Kliv still hosts the app and everything behind it. Each person signs in as themselves and reaches only the apps they can edit. The account owner sees every connected tool and can remove one at any time. The address is https://mcp.kliv.dev/mcp for everyone. Sign-in is OAuth in your browser, with your Kliv account. There are no API keys. Setup guide: https://docs.kliv.dev/integrations/mcp

      https://mcp.kliv.dev/mcp

    Related MCP Servers

    • A
      license
      C
      quality
      C
      maintenance
      An MCP server that integrates 1Password with AI agents, providing secure access to vaults and items with secrets redacted by default.
      16
      19 npm
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server for secure, just-in-time secret retrieval from 1claw vault and malicious content inspection, enabling AI agents to access secrets and security analysis.
      1
      763 npm
      4
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      MCP server that enables AI models to securely interact with a Bitwarden password manager vault via the rbw CLI.
      11
      1
      MIT
    • A
      license
      A
      quality
      A
      maintenance
      MCP server for secure AI agent access to Bitwarden/Vaultwarden vaults with BYOK, exposing tools to list items, reveal secrets via encrypted Sends, get TOTP codes, and save credentials.
      7
      274 npm
      MIT