Vault MCP

MCP server for credential isolation — bots use passwords and API keys without seeing them

1MITother

Install

Config snippet generator goes here (5 client tabs)

README

# Vault MCP

MCP server for credential isolation in LLM agents. Your bot uses passwords and API keys — but never sees them in its context window.

## The Problem

```
  User                     LLM                    Website
   │                        │                        │
   │  "password: MyP@ss!"   │                        │
   ├───────────────────────►│                        │
   │                        │──── MyP@ss! ──────────►│
   │                        │                        │
   │                        │◄──── 200 OK ───────────│
   │                        │                        │
   ▼                        ▼                        ▼
                     ┌──────────────┐
                     │ MyP@ss! is   │
                     │ now stored   │
                     │ in LLM       │
                     │ context,     │
                     │ conversation │
                     │ history,     │
                     │ session logs │
                     └──────────────┘
```

## The Solution

```
  User          Browser Form       Vault MCP         LLM          Website
   │            (localhost)          │                 │              │
   │  ●●●●●●●●    │                 │                 │              │
   ├──────────────►│                 │                 │              │
   │               │── encrypt ─────►│                 │              │
   │               │                 │◄── vault_login ─┤              │
   │               │                 │── fill form ───────────────────►│
   │               │                 │◄──── 200 OK ───────────────────┤
   │               │                 │── { status: ok }─►│            │
   │               │                 │                 │              │
   ▼               ▼                 ▼                 ▼              ▼
                              ┌──────────────┐  ┌──────────────┐
                              │ Password:    │  │ LLM context: │
                              │ AES-256-GCM  │  │              │
                              │ encrypted    │  │ "status: ok" │
                              │ on disk      │  │ (no password)│
                              └──────────────┘  └──────────────┘
```

---

## Scenarios

### Scenario 1: First-time Login (vault_add → vault_login)

The agent needs credentials it doesn't have. It calls `vault_add()` — a browser form opens where you enter the password. Then `vault_login()` fills the form via Chrome.

```
  User              Claude Code           Vault MCP            Chrome
   │                    │                     │                   │
   │ "Log me into       │                     │                   │
   │  Jira"             │                     │                   │
   ├───────────────────►│                     │                   │
   │                    │── vault_list() ────►│                   │
   │                    │◄─ { credentials:[] }┤                   │
   │                    │                     │                   │
   │                    │── vault_add ───────►│                   │
   │                    │   { site: "jira" }  │                   │
   │                    │                     │                   │
   │   ┌────────────────────────────┐         │                   │
   │   │ Browser opens             │         │                   │
   │   │ localhost:9900/add         │         │                   │
   │   │                           │         │                   │
   │   │ Site ID:  [jira]          │         │                   │
   │   │ Email:    [me@work.com]   │         │                   │
   │   │ Password: [●●●●●●●●●●]   │         │                   │
   │   │ URL:      [jira.com/login]│         │                   │
   │   │                           │         │                   │
   │   │ [Add to Vault]            │         │                   │
   │   └────────────┬───────────────┘         │                   │
   │                │                         │                   │
   │                └── POST (encrypted) ────►│                   │
   │                                          │                   │
   │                    │◄─ { status: ok } ───┤                   │
   │                    │   site_id: "jira"   │                   │
   │                    │                     │                   │
   │                    │   (no password      │                   │
   │                    │    in this response) │                   │
   │                    │                     │                   │
   │                    │── vault_login ─────►│                   │
   │                    │   { site: "jira" }  │── decrypt ──┐     │
   │                    │                     │◄────────────┘     │
   │                    │                     │── fill email ────►│
   │                    │                     │── fill pass  ────►│
   │                    │                     │── click submit ──►│
   │