auth-vault

auth-vault

MCP server for secure credential management, browser-based login automation, and TOTP/2FA auto-solving. Encrypts credentials with AES-256-GCM and automates login flows via Playwright.

Category
Visit Server

README

@mcp/auth-vault

🧩 Branch template β€” czysta wersja do klonowania i adaptacji.
Brak testΓ³w specyficznych dla Q-ekosystemu, brak danych wraΕΌliwych.
WΕ‚asne serwisy konfigurujesz przez add_service β€” wystarczΔ… selektory CSS.

MCP server for secure credential management, browser-based login automation, and TOTP/2FA auto-solving.

Status:  active    |    License: MIT    |    Version: 0.1.0

Overview

Auth Vault stores encrypted credentials and secrets (AES-256-GCM), automates browser login flows via Playwright, and auto-solves TOTP-based 2FA challenges. It provides both an MCP interface (for AI clients) and a Web UI dashboard (for manual management).

Interface Port URL
Web UI Dashboard 5500 http://<tailscale-ip>:5500/
MCP SSE 5501 http://<tailscale-ip>:5501/sse
MCP Health 5501 http://<tailscale-ip>:5501/health

Features

  • Encrypted vault β€” credentials and secrets stored with AES-256-GCM
  • Browser automation β€” Playwright-based login with form filling
  • TOTP/2FA auto-solve β€” RFC 6238 implementation, generates and submits 2FA codes
  • QR code support β€” generate QR for Google Authenticator setup
  • Secrets management β€” API keys, bearer tokens, access/refresh tokens
  • Tailscale-only access β€” binds to Tailscale IP by default, blocks external traffic
  • Two service modes β€” STDIO (MCP standard) and SSE (HTTP for persistent connections)

Quick Start

Prerequisites

  • Node.js 22+
  • Playwright Chromium (installed via postinstall)
  • Tailscale (recommended for SSE mode)

Setup

# Install dependencies
npm install

# Build TypeScript
npm run build

# Configure environment
cp .env.example .env
# Edit .env: set VAULT_ENCRYPTION_KEY (64 hex chars) or leave empty for auto-generated

Configuration

All configuration via .env file or environment variables:

Variable Default Description
VAULT_ROOT ./vault Storage directory for encrypted vault files
VAULT_ENCRYPTION_KEY auto-generated AES-256 key (64 hex chars, persist for data survival)
AUTH_SSE_PORT β€” Enable SSE mode on given port (empty = STDIO mode)
AUTH_BIND_ADDRESS auto (Tailscale) Explicit bind address for SSE mode
BROWSER_HEADLESS true Run Playwright in headless mode
BROWSER_TIMEOUT 30000 Browser operation timeout (ms)
LOG_LEVEL info Logging level: debug, info, warn, error

Usage

STDIO Mode (default for MCP clients)

node dist/index.js

SSE Mode (HTTP server for persistent connections)

# Set AUTH_SSE_PORT=5501 in .env, then:
node dist/index.js

Web UI Dashboard

node dist/web/server.js
# Dashboard at http://<tailscale-ip>:5500/

CLI Commands

npm run add-creds     # Add credentials interactively
npm run add-secret    # Add a secret interactively
npm run list-creds    # List stored credentials
npm run list-secrets  # List stored secrets
npm run get-creds     # Get credential details

Systemd Services

# MCP SSE server (port 5501)
systemctl status mcp-auth-vault

# Web UI dashboard (port 5500)
systemctl status mcp-auth-vault-web

Both services restart automatically on failure and enable at boot.


Security

  • AES-256-GCM encryption for all stored credentials and secrets
  • Tailscope-restricted β€” SSE mode blocks non-Tailscale connections
  • Encryption key persisted in .env β€” if lost, data cannot be recovered
  • Headless browser β€” no visible UI during automated logins

Project Structure

src/
β”œβ”€β”€ index.ts              # MCP server entry (STDIO + SSE)
β”œβ”€β”€ config.ts             # Zod-validated configuration
β”œβ”€β”€ credentials/
β”‚   β”œβ”€β”€ totp.ts           # TOTP (RFC 6238) implementation
β”‚   β”œβ”€β”€ qr.ts             # QR code generation + TOTP secret generator
β”‚   β”œβ”€β”€ vault.ts          # Encrypted credential store
β”‚   └── types.ts          # Credential type definitions
β”œβ”€β”€ secrets/
β”‚   β”œβ”€β”€ manager.ts        # Encrypted secrets store
β”‚   └── types.ts          # Secret type definitions
β”œβ”€β”€ browser/
β”‚   └── manager.ts        # Playwright session management
β”œβ”€β”€ services/
β”‚   └── definitions.ts    # Login templates (Google, etc.)
β”œβ”€β”€ web/
β”‚   β”œβ”€β”€ server.ts         # Web UI HTTP server + REST API
β”‚   └── dashboard.ts      # HTML dashboard template
β”œβ”€β”€ tools/
β”‚   β”œβ”€β”€ credentials.ts    # MCP tool definitions for credentials
β”‚   β”œβ”€β”€ secrets.ts        # MCP tool definitions for secrets
β”‚   β”œβ”€β”€ services.ts       # MCP tool definitions for services
β”‚   └── login.ts          # MCP tool definitions for login
└── cli/
    β”œβ”€β”€ add-credentials.ts
    └── add-secret.ts

Tech Stack

  • Runtime: Node.js 24, TypeScript ESM
  • MCP: @modelcontextprotocol/sdk v1.16
  • Encryption: Node.js crypto (AES-256-GCM)
  • Browser: Playwright (Chromium)
  • Config: Zod validation
  • UI: Vanilla JS (no framework)
  • QR: qrcode npm package

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured