VaultMind

VaultMind

Offline-first MCP proxy with policy engine and immutable audit trail for secure AI coding agents.

Category
Visit Server

README

πŸ” VaultMind

Offline-First AI Environment for Sensitive Code

VaultMind is the first open-source policy decision point for AI coding agents that runs completely offline. It combines a lightweight secure MCP gateway, an immutable audit trail, and a software supply chain explorer β€” so finance, defense, and regulated-industry teams can finally use AI coding tools without sending secrets to the cloud.

MIT License Tests


❓ Why VaultMind?

Every major AI coding client β€” Claude Desktop, Cursor, VS Code with Copilot β€” streams every interaction to external cloud services. Teams working in finance, defense, and regulated industries are blocked from these tools entirely because their secrets cannot leave their security perimeter.

No existing solution bridges the gap between AI productivity and enterprise security. VaultMind does.

[ Claude / Cursor / VS Code ]
         β”‚ (MCP stdio/SSE)
         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   vaultmind-gateway              β”‚
β”‚  β€’ Proxies all tool calls        β”‚
β”‚  β€’ Evaluates against policy.yaml β”‚
β”‚  β€’ Records every event (audit)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
             β”‚            β”‚
             β–Ό            β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Policy Engine     β”‚  β”‚ SQLite Audit Trailβ”‚
β”‚ allow/deny rules  β”‚  β”‚ + JSONL event log β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start (3 minutes)

# Install from source
git clone https://github.com/your-org/vaultmind.git
cd vaultmind
npm install

# Create a policy file
npx tsx packages/cli/src/index.ts init

# Start recording a session
npx tsx packages/cli/src/index.ts record -- echo "hello, air-gapped world"

# Analyze audit logs
npx tsx packages/cli/src/index.ts analyze

# Generate policy from audit log
npx tsx packages/cli/src/index.ts policy generate

# Start the gateway server
npx tsx packages/cli/src/index.ts gateway start --port 3080

Then open http://127.0.0.1:3080 for the live dashboard.


✨ Key Features

1. Offline-First MCP Proxy

Works without internet. Intercepts every tool call from AI agents (read, write, exec, network) and evaluates them against a local policy.yaml.

# policy.yaml
version: "1.0"
rules:
  - id: "allow-docs"
    allow:
      - "read(docs/*)"
      - "read(*.md)"
  - id: "block-src-writes"
    deny:
      - "write(src/*)"
      - "write(lib/*)"
  - id: "network-off"
    network: "off"
default_action: "deny"

2. Immutable Audit Trail

Every tool call is logged β€” JSONL for fast streaming, SQLite for structured queries. Each event carries:

  • Agent (claude, cursor, vscode)
  • Tool called
  • Parameters passed
  • Verdict β€” allow / deny / error
  • Reason β€” which policy rule applied

3. Policy-as-Code

Your security policy lives in policy.yaml. Store it in Git, review it in PR, and never guess what an AI agent can access.

4. Auto Policy Generation

Run vaultmind policy generate β€” VaultMind analyzes all past audit logs and produces a policy.yaml skeleton that captures observed safe patterns. Only requires final human approval.

5. Sandbox Execution

Commands run through a sandbox that restricts filesystem access and blocks network calls. Resource limits (timeout, allowed paths) are configurable.

6. Dependency Memoization

vaultmind deps memo scans your package-lock.json, go.sum, or Cargo.lock and builds a dependency DAG. vaultmind deps verify checks it against local vulnerability data.


πŸ“¦ Packages

Package Description
@vaultmind/vm-core Shared types, policy engine, audit logger, SQLite DB
@vaultmind/vm-sandbox Process sandbox with path ACLs and network blocking
@vaultmind/mcp-gateway MCP proxy + HTTP/WebSocket API server
@vaultmind/cli CLI entrypoint (`vaultmind init
@vaultmind/sdk Programmatic SDK + fluent createPolicyHelper()

πŸ—„οΈ Database Schema

State is stored in a lightweight SQLite file (.vaultmind/vault.db):

CREATE TABLE sessions (
    id TEXT PRIMARY KEY,
    start_time INTEGER NOT NULL,
    policy_hash TEXT,
    status TEXT CHECK(status IN ('recording','analyzing','done'))
);

CREATE TABLE events (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    session_id TEXT NOT NULL,
    ts INTEGER NOT NULL,
    agent TEXT NOT NULL,
    tool TEXT NOT NULL,
    params TEXT NOT NULL,       -- JSON
    verdict TEXT CHECK(verdict IN ('allow','deny','error')),
    reason TEXT
);

πŸ”Œ API

Method Path Description
POST /v1/sessions Create new audit session β†’ { sessionId, wsUrl }
GET /v1/sessions/:id/events Paginated event history
POST /v1/sessions/:id/stop End session + final report
POST /v1/policies/validate Validate a policy.yaml
GET /v1/stats Server status + connection counts
WS /v1/stream Real-time event stream

πŸ’» SDK Usage

import { createPolicyHelper } from '@vaultmind/sdk';
import { VaultMindClient } from '@vaultmind/sdk';

// Fluent policy builder
const policy = createPolicyHelper()
  .allow('read(docs/*)')
  .deny('write(src/*)')
  .network('off')
  .build();

// Programmatic client
const client = new VaultMindClient();
await client.startSession();
const result = await client.evaluateCall({
  tool: 'read_file',
  args: {},
  action: 'read',
  path: 'docs/guide.md',
});
console.log(result.verdict); // 'allow' | 'deny'
console.log(client.getStats()); // { total, allowed, denied, errors }
await client.endSession();

πŸ“ Project Structure

vaultmind/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ vm-core/           # Shared types, policy engine, DB, logger
β”‚   β”œβ”€β”€ vm-sandbox/        # Execution sandbox
β”‚   β”œβ”€β”€ mcp-gateway/       # MCP proxy + REST/WS server
β”‚   β”œβ”€β”€ cli/               # CLI entrypoint
β”‚   └── sdk/               # TypeScript SDK
β”œβ”€β”€ dashboard/
β”‚   └── src/index.html     # Real-time monitoring dashboard
β”œβ”€β”€ tests/                 # Integration & policy tests
β”œβ”€β”€ docs/                  # MkDocs material
β”œβ”€β”€ examples/              # Docker, Nix, systemd units
└── policy.yaml            # Default security policy

⚠️ Known Limitations

  • No kernel sandbox on Windows: True seccomp/Landlock requires Linux + Rust. The current MVP provides policy-level process isolation. Linux sandbox is planned for Month 2.
  • Network blocking is heuristic: Environment-variable based; kernel-level network namespace isolation requires Rust port.
  • SDK in early preview: API surface may evolve as we add plugin support.

πŸ—ΊοΈ Roadmap

  • Month 1: βœ… Core TypeScript gateway, policy engine, audit trail, CLI
  • Month 2: πŸ”œ Rust sandbox (seccomp/Landlock), kernel network isolation, Wasm plugin system
  • Month 3: πŸ”œ Container runtime integration (Docker/Podman), distributed tracing, OIDC support

🀝 Contributing

First-time contributors welcome! Check out CONTRIBUTING.md for setup instructions.

Good first issues:

  • Add more CLI flags
  • Extend YAML policy syntax
  • Write additional unit tests
  • Improve error messages

πŸ“„ License

MIT Β© VaultMind contributors

Secure your AI. Keep your secrets on-prem.

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

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