Back to MCP directory
publicPublicdnsLocal runtime

onepassword-mcp-server

一个用于安全获取1Password凭证并通过MCP协议提供给AI代理的教育性概念验证服务器。

article

README

🚀 1Password凭证获取服务器项目

本项目是一个概念验证服务器,仅用于教育用途。它借助1Password Python SDK从您的1Password账户安全获取凭证,再通过MCP Python SDK将凭证提供给Agentic AI运行使用。

🚀 快速开始

📦 通过Smithery安装

要通过Smithery自动为Claude Desktop安装1Password凭证获取服务器,可执行以下命令:

npx -y @smithery/cli install @dkvdm/onepassword-mcp-server --client claude

⚙️ 先决条件

  • Python环境:Python 3.11或更高版本。
  • uv工具:快速的Python包安装工具,使用pip install uv进行安装。
  • 安装包同步:执行uv sync
  • 1Password保险库:在1Password中创建一个名为AI的保险库,并添加您要使用的项目。
  • 服务账户配置创建服务账户,并授予其在相关保险库中的适当权限,以便使用SDK。
  • 客户端配置:获取您的服务账户令牌,并配置客户端(如Claude Desktop)以连接到此服务器。将以下结构添加到客户端的配置文件中(例如claude_desktop_config.json),根据需要调整路径和环境变量:
// 适用于Claude Desktop的示例配置
{
  "mcpServers": {
    "1Password": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with",
        "onepassword-sdk",
        "mcp",
        "run",
        "/your/dir/here/onepassword-mcp-server/server.py" // 根据需要调整此路径
      ],
      "env": {
        "OP_SERVICE_ACCOUNT_TOKEN": "INSERT_KEY_HERE" // 请在此处插入1Password服务账户令牌
      }
    }
  }
}

🚀 启动使用

启动Claude并尝试提示词,例如“获取ticktick.com的1Password凭证”(基于项目名称)。

🌐 使用1Password和Browser - Use自动浏览器

安装mcp-browser-use并配置两个MCP服务器如下:

// 适用于Claude Desktop的示例配置
{
  "mcpServers": {
    "1Password": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with",
        "onepassword-sdk",
        "mcp",
        "run",
        "/your/dir/here/onepassword-mcp-server/server.py" // 根据需要调整此路径
      ],
      "env": {
        "OP_SERVICE_ACCOUNT_TOKEN": "INSERT_KEY_HERE"
      }
    },
    "browser-use": {
      "command": "uv",
      "args": [
        "--directory",
        "/your/dir/here/mcp-browser-use",
        "run",
        "mcp-server-browser-use"
      ],
      "env": {
        "MCP_USE_OWN_BROWSER": "true",
        "CHROME_CDP": "http://127.0.0.1:9222",
        "ANTHROPIC_API_KEY": "INSERT_KEY_HERE"
      }
    }
  }
}

⚠️ 重要提示

这是一个概念验证服务器,仅用于教育用途。

💡 使用建议

在配置客户端时,请确保路径和环境变量的准确性,避免因配置错误导致服务器无法正常连接。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client