psamvault-mcp

psamvault-mcp

MCP server for psamvault — lets AI agents use your stored credentials without ever seeing their plaintext values.

Category
访问服务器

README

psamvault-mcp

MCP server for psamvault — lets AI agents use your stored credentials without ever seeing their plaintext values.

How it works

psamvault exposes two complementary flows depending on what the agent needs.

API request flow (use_credential)

When an AI agent needs to call an API on your behalf, psamvault decrypts the credential locally and forwards the authenticated request through its backend proxy.

The agent never sees the password. It only sees the HTTP response.

Agent: "Call the GitHub API using my stored credential"
         ↓
psamvault shows a consent dialog: "Allow agent to use github.com credential?"
         ↓ (you approve)
psamvault decrypts credential locally using your Vault Encryption Key
         ↓
psamvault makes: GET https://api.github.com/user
                 Authorization: Bearer <your token>
         ↓
Agent receives: {"login": "yourusername", "id": 12345, ...}

Browser login flow (browser_login)

When an AI agent needs to log you into a website, psamvault opens a real Chromium browser, navigates to the site, and fills in the credentials directly inside that browser process.

The agent never sees the credentials. It only sees whether the login succeeded.

Agent: "Log me into kaggle.com"
         ↓
psamvault opens Chromium → navigates to kaggle.com → finds the login page
         ↓
psamvault takes a screenshot of the confirmed login page
         ↓
psamvault shows a consent dialog with the confirmed login URL
         ↓ (you approve)
psamvault decrypts credential locally
         ↓
psamvault fills username + password fields directly in the browser
         ↓
If a CAPTCHA appears, psamvault takes a screenshot, pauses automation,
and tells you to solve the CAPTCHA and click Sign in manually
         ↓
Agent receives:
         {
           "success": true,
           "message": "Logged in to github.com successfully. The browser is open.",
           "steps_count": 8,
           "url": "https://github.com/dashboard",
           "captcha_detected": false,
           "captcha_screenshot": null,
           "failed_at": null,
           "hint": null
         }
         ↓
Browser stays open — you take over from there.
The browser session is saved and reused on subsequent calls to the same site.

Prerequisites

  • Python ≥ 3.11
  • psamvault installed and logged in
pipx install psamvault
psamvault configure
psamvault login

Installation

pipx install psamvault-mcp
playwright install chromium

Goose setup (recommended)

Goose is an open-source AI agent with native MCP support. There are three ways to add psamvault-mcp as a Goose extension:


Option A — One-click deeplink

Click or paste this URL into your browser while Goose Desktop is running:

goose://extension?cmd=psamvault-mcp&timeout=300&id=psamvault&name=psamVault&description=Use%20stored%20credentials%20without%20exposing%20them%20to%20the%20agent

Goose will prompt you to confirm, then the extension is added instantly.


Option B — Goose Desktop UI

  1. Open Goose Desktop.

  2. Click the sidebar button (top-left) → Extensions.

  3. Click Add custom extension.

  4. Fill in the form:

    Field Value
    Type Standard IO
    ID psamvault
    Name psamVault
    Description Use stored credentials without exposing them to the agent
    Command psamvault-mcp
    Timeout 300
  5. Click Add.

The extension appears in your Extensions list — toggle it on to activate it.


Option C — Config file (advanced)

Edit ~/.config/goose/config.yaml and add the following under extensions::

extensions:
  psamvault:
    name: psamVault
    cmd: psamvault-mcp
    args: []
    enabled: true
    type: stdio
    timeout: 300

Save the file and restart Goose (or reload the session).


Verifying the extension works

Once added, start a Goose session and try:

What credentials do I have stored in my vault?

Goose will call list_vault_sites via psamvault-mcp. If you see your stored sites, everything is working.


Other MCP clients

Claude Desktop — config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "psamvault": {
      "command": "psamvault-mcp"
    }
  }
}

Restart your MCP client after saving.

Configuration

psamvault-mcp reads its backend URL from ~/.psamvault/config.env, written automatically by psamvault configure.

Variable Default Description
PSAMVAULT_API_URL https://psam-vault-backend.onrender.com psamvault backend endpoint
PSAMVAULT_LOG_LEVEL INFO Log verbosity. Accepts any standard Python level: DEBUG, INFO, WARNING, ERROR. Logs go to stderr.

To point at a self-hosted backend, set the variable in ~/.psamvault/config.env:

PSAMVAULT_API_URL=https://your-backend.example.com

Available tools

Tool Description
get_version Return the installed psamvault-mcp version. No session or login required
search_vault_tools Discover which tool to use — call this first; accepts a keyword or empty string for all tools
list_vault_sites List stored site names (no passwords)
check_credential_exists Check if a credential exists for a site
use_credential Make an authenticated HTTP request
get_username_for_site Get username only (not password)
browser_login Open a real browser and log into a website — credentials filled silently, never shown to the agent

Injection modes

Mode Header format Use case
bearer_token Authorization: Bearer <password> GitHub, OpenAI, most APIs
api_key_header <custom-header>: <password> APIs with X-API-Key headers
basic_auth Authorization: Basic base64(user:pass) HTTP basic auth

Example agent prompts

Once connected, you can ask your agent things like:

  • "What credentials do I have stored in my vault?"
  • "Check my GitHub notifications using my stored github.com credential"
  • "List my AWS S3 buckets using my stored aws credential"
  • "Log me into kaggle.com"
  • "Open github.com and log me in"

Testing

# From the repo root
pytest

Tests live in tests/ and cover crypto primitives, session management, consent logic, the API client (with httpx mocking), and MCP tool behaviour. The test suite requires no real network access or OS keychain — all external dependencies are mocked.

Security

  • Credentials are decrypted locally on your machine — never sent to the agent
  • Every credential use requires explicit approval via a consent dialog
  • The agent only receives HTTP responses, never credential values
  • All communication with the psamvault backend uses HTTPS

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选