zero-trust-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@zero-trust-mcpencrypt the output of the get-user tool"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Zero-Trust Model Context Protocol (MCP) Integration Server
A lightweight, local-first Model Context Protocol (MCP) server built in Python that enforces zero-trust data privacy for AI agents.
By intercepting tool calls prior to cloud transmission, this server encrypts payloads locally using AES-256-GCM and persists them to a local SQLite database. Sensitive contextual data stays encrypted at rest, gated behind an access token, and every access attempt is actively logged.
š Key Features
Model Context Protocol (MCP) Native: Exposes secure tools over standard I/O (
stdio) via FastMCP.Zero-Trust Encryption: AES-256-GCM with random 96-bit nonces for authenticated local encryption.
Password-Derived Keys: The encryption key is derived from a master password via
scrypt, using a salt persisted in the database ā ensuring the vault survives server restarts.Access Control: Every tool call (
secure_store,secure_retrieve,audit_recent) requires a valid HMAC access token, verified in constant time to resist timing attacks.Audit Logging: Every store/retrieve attempt ā successful or not ā is written to an append-only
audit_logtable to ensure complete observability.Live Security Dashboard: Includes a lightweight FastAPI web interface to visually monitor the SQLite audit trail in real-time.
AI Client Simulator: An async Python client (
ai_client.py) demonstrating programmatic tool-calling over the MCP standard, including rejected-token handling.
Related MCP server: production-grade-mcp-agentic-system
š Repository Structure
āāā crypto_engine.py # AES-256-GCM + scrypt key derivation
āāā access_control.py # Constant-time access token verification
āāā audit_log.py # Append-only audit trail logic
āāā mcp_server.py # FastMCP protocol server & SQLite DB logic
āāā ai_client.py # Async AI Agent simulator acting as an MCP client
āāā dashboard.py # FastAPI web UI for visualizing security logs
āāā test_mcp.py # Unit tests for crypto, access control, and audit logs
āāā .env.example # Template for required environment variables
āāā .gitignore # Git ignore rules
āāā requirements.txt # Core dependenciesš§ Threat Model
What this protects against:
Data at Rest Theft: Secrets sitting in vault.db are unreadable if the file alone is stolen (they're AES-256-GCM ciphertext, keyed off a password never written to disk).
Tampered Ciphertext: GCM is authenticated ā tampering causes decryption to fail loudly rather than silently returning garbage.
Unauthorized Tool Calls: No access token, no data.
What this does not protect against:
A compromised local environment that already holds the master password and access token in memory.
Multi-tenant isolation ā right now there is one shared secret vault, not per-agent scoped secrets.
Network-level threats ā this is a local stdio server, not exposed over a network by default.
š ļø Setup & Usage
Install Dependencies
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtConfigure Environment Create a .env file in the root directory and add your passwords (the scripts will auto-load this using python-dotenv):
ZTMCP_MASTER_PASSWORD=your_secure_password
ZTMCP_ACCESS_TOKEN=your_secure_tokenRun the AI Client Simulator Watch the automated client connect to the MCP server, authenticate, and securely process data.
python ai_client.pyView the Audit Dashboard Launch the FastAPI server to view real-time access logs.
uvicorn dashboard:app --reload --port 8000
# Open http://127.0.0.1:8000 in your browserRun the Test Suite
python -m unittest test_mcp.py -vš Roadmap
Per-Agent Identity: Transition from one shared token to agent-specific tokens to log which agent accessed what.
Secret Expiry / TTL: Allow secure_store to take an optional expires_at timestamp.
Rate Limiting: Throttle brute-force loops against secure_retrieve.
Key Rotation: Build a rotate_key tool that re-encrypts all secrets under a new password/salt.
OS Keyring Integration: Swap SQLite salt storage for OS keyring integration (e.g. via the keyring package).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceMCP server that lets AI agents call APIs without ever seeing the credentials, using a local encrypted vault and per-secret allowlist policies for HTTP requests and subprocess environment variables.Last updated1AGPL 3.0
- Alicense-qualityDmaintenanceA production-grade MCP server designed for multi-tenant, authenticated, and observable AI agent systems, enabling secure tool execution across heterogeneous data sources.Last updated52MIT
- Alicense-qualityDmaintenanceA local-first MCP memory server providing persistent, searchable memory for AI agents, powered by SQLite.Last updated381Apache 2.0
- AlicenseAqualityBmaintenanceA local-first MCP server for durable agent memory using SQLite and FTS5, enabling knowledge graph storage, search, and recall for AI agents.Last updated201MIT
Related MCP Connectors
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Harmaien17/zero-trust-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server