Secure Embedding MCP Server
Uses Hugging Face transformer models to generate text embeddings for semantic search and analysis.
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., "@Secure Embedding MCP Serversecure embed 'user email: test@example.com'"
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.
Secure Embedding MCP Server
A Model Context Protocol (MCP) implementation for secure text embeddings with privacy-preserving features using the Mirror SDK.
Overview
The Secure Embedding MCP Server provides a robust interface for processing text data with various security levels while generating embeddings for semantic search and analysis. It leverages the Mirror SDK to provide advanced security features including:
Format-preserving encryption (FPE) for sensitive entities
Vector encryption for secure embeddings
Role-based access control (RBAC) for fine-grained security policies
Entity detection for PII and sensitive information
Related MCP server: chuangsiai-mcp
Features
Unified Text Processing: Single entry point for various text operations with appropriate security measures
Multiple Operation Modes:
embed: Generate text embeddingssecure: Apply security measures to text and embeddingsanalyze: Detect and analyze sensitive informationmask: Anonymize sensitive entitiesauto: Automatically determine the appropriate operationConfigurable Security Levels:
none: No security measureslow: Basic vector encryptionmedium: Entity encryption with FPEhigh: Full encryption with RBACauto: Automatically determine security level based on contentNatural Language Interface: Process requests in natural language
Batch Processing: Handle multiple texts efficiently
Semantic Search: Search across documents using embeddings
Prerequisites
Python 3.10+
Mirror SDK
LangChain with Hugging Face integration
MCP Server framework
Claude Desktop (for integration)
Mirror Platform Setup
1. Registration
Visit the Mirror Platform
Click on "Sign Up" or "Register"
Fill in your details and create an account
Verify your email address
2. Getting Your API Keys
Log in to your Mirror Platform account
Navigate to the "API Keys" section in your dashboard
Click "Generate New Key"
Save both the API Key and Secret securely
These keys will be used in your environment variables or configuration file
3. Additional Capabilities
This implementation demonstrates a subset of Mirror's capabilities. For full enterprise features including:
Advanced encryption algorithms
Custom security policies
Enterprise-grade RBAC
Advanced entity detection
Custom model integration
Dedicated support
Please contact our team at hello@mirrorsecurity.io or https://mirrorsecurity.io/
4. Reference Documentation
Development Environment Setup
Install uv
uv is a fast Python package installer and resolver that we'll use for our environment setup.
Available MCP Servers:
Screenshot1

Screenshot2

MacOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | shWindows
# Using PowerShell
irm https://astral.sh/uv/install.ps1 | iexMake sure to restart your terminal afterwards to ensure that the uv command gets picked up.
Installation
Automatic Installation (Recommended)
We provide two automatic installation scripts for different operating systems:
Windows
Run the following command in PowerShell or Command Prompt:
.\setup_claude_config.batThis script will:
Install uv if not present
Set up the virtual environment
Install required dependencies
Configure Claude Desktop integration
Create necessary configuration files
macOS/Linux
Run the following command in your terminal:
chmod +x setup_claude_config.sh
./setup_claude_config.shThis script will:
Check for required dependencies
Install uv if not present
Set up the virtual environment
Install required dependencies
Configure Claude Desktop integration
Create necessary configuration files
Both scripts will create a log file (setup_log.txt) in the project directory for troubleshooting purposes.
Manual Installation
If you prefer to install manually or if you already have the project cloned:
Clone the repository:
git clone https://github.com/yourusername/mirror-vectax-mcp-server.git
cd mirror-vectax-mcp-serverSet up virtual environment with uv:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activateInstall mcp cli
uv add mcp[cli] httpxInstall dependencies:
uv add -r requirements.txtInstall Mirror SDK
Download Mirror SDK from platform and copy whl files into dist folder.
Replace <version> with download version.
uv add .\dist\mirror_sdk-<version>.whl
uv add .\dist\mirror_enc-<version>.whlSet up environment variables:
export MIRROR_API_KEY="your-mirror-api-key"
export MIRROR_SECRET="your-mirror-secret"
export MIRROR_SERVER_URL="https://your-mirror-server-url/v1"
export EMBEDDING_MODEL="nomic-ai/nomic-embed-text-v1.5" # Optional
export EMBEDDING_DEVICE="cpu" # Or "cuda" for GPU accelerationAlternatively, create a configuration file
secure_search_config.jsonwith the following content:
{
"api_key": "your-mirror-api-key",
"secret": "your-mirror-secret",
"server_url": "https://your-mirror-server-url/v1",
"policy_eval_enabled": false,
"app_policy": {
"roles": ["admin", "researcher", "user", "analyst"],
"groups": ["ai_team", "ml_team", "nlp_team"],
"departments": ["research", "engineering", "IT"]
}
}Claude Desktop Integration
1. Install Claude Desktop
Download Claude Desktop from Anthropic's website
Install and launch Claude Desktop
Sign in with your Anthropic account
2. Configure Claude Desktop
Create a
claude_desktop_config.jsonfile in your Claude Desktop configuration directory:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.jsonAdd the following configuration (adjust paths as needed):
{
"mcpServers": {
"secure-embedding": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/YOUR/PROJECT/mirror-vectax-mcp-server",
"run",
"mirror_vectax_server.py"
]
}
}
}Find the full path to the
uvexecutable:
macOS/Linux:
which uvWindows:
where uvUpdate the
commandfield in the config with the full path if neededSave the file and restart Claude Desktop
Look for the hammer icon in Claude Desktop to confirm the MCP tools are available
3. Testing the Integration
Open Claude Desktop
Look for the hammer icon in the interface
Try a simple test:
Can you create an embedding for this sentence: "Machine learning models can process large amounts of data efficiently."Usage
Starting the Server
You can start the server using one of the following methods:
Method 1: Using the run_mcp_server.sh Script (Recommended)
Make the script executable:
chmod +x run_mcp_server.shRun the server:
./run_mcp_server.shThis script sets up the environment variables and runs the server with proper Python settings:
Adds local bin to PATH
Sets Python to unbuffered mode
Enables Python debug mode
Changes to the correct directory
Runs the server with Python 3
Method 2: Using uv
uv run mirror_vectax_server.pyMethod 3: Using MCP CLI
mcp run mirror_vectax_server.pyTesting the Server
To verify the server is running correctly, you can use the MCP CLI to list available tools:
mcp list-tools --transport stdio --binary "python mirror_vectax_server.py"This should output a list of all the tools provided by the server.
Testing with MCP Inspector
We can use mcp inspector to test the tools:
npx @modelcontextprotocol/inspector \
uv \
--directory /ABSOLUTE/PATH/TO/YOUR/PROJECT/mirror-vectax-mcp-server \
run \
mirror_vectax_server.pyAfter running mcp inspector, we can test tool, for example

Customizing run_mcp_server.sh
If you need to modify the server startup configuration, you can edit the run_mcp_server.sh script. Here's what each line does:
#!/bin/bash
# Add local bin to PATH
export PATH="$PATH:/Users/Yourname/.local/bin"
# Enable Python debug mode
export PYTHONUNBUFFERED=1
export PYTHONDEBUG=1
# Change to project directory
cd /Users/your_downloaded_path/mirror-vectax-mcp-server-main
# Run the server with Python 3
exec python3 -u mirror_vectax_server.pyMake sure to:
Update the paths to match your system
Keep the script executable (
chmod +x run_mcp_server.sh)Run it from the project directory
Watch Video
Architecture
The server consists of two main services:
EmbeddingService: Creates and manages text embeddings using HuggingFace models.
EncryptionService: Provides encryption capabilities using the Mirror SDK.
These services are initialized during server startup and made available to the MCP tools.
Test Prompts for Secure Embedding MCP Server
Basic Functionality Tests
1. Test Basic Embedding
Can you create an embedding for this sentence: "Machine learning models can process large amounts of data efficiently."
Expected outcome: Should use the process tool with "embed" operation and return embedding information.
2. Test Entity Detection
Can you analyze this text for sensitive information? "My social security number is 123-45-6789 and my email is test@example.com"
Expected outcome: Should use the process tool with "analyze" operation, detect SSN and email entities, and return analysis details.
3. Test Secure Processing
Please securely process this text: "My credit card is 4111-1111-1111-1111 and my phone number is (555) 123-4567."
Expected outcome: Should use the process tool with "secure" operation at medium/high security level, encrypt sensitive entities, and potentially encrypt the embedding.
4. Test Natural Language Processing
I need to encrypt and protect this confidential medical information: "Patient John Doe (DOB: 01/15/1980) has been diagnosed with hypertension."
Expected outcome: Should use the natural-language-process tool to determine intent (secure/mask) and apply appropriate security measures.
Advanced Functionality Tests
5. Test Batch Processing
I need embeddings for the following phrases:
"Artificial intelligence is transforming industries."
"Data privacy is an important concern for organizations."
"Secure embeddings protect sensitive information during processing."
Expected outcome: Should use the batch-process tool to create embeddings for all three phrases.
6. Test RBAC Functionality
Generate a user key for a data analyst who belongs to the research department and has user-level access.
Expected outcome: Should use the generate-user-key tool with appropriate roles, groups, and departments.
7. Test Search Functionality
First, create embeddings for these phrases:
"Security is a top priority for financial institutions."
"Privacy regulations impact how companies handle data."
"Machine learning models require careful validation." Then search these documents for information about "data privacy".
Expected outcome: Should first use the batch-process tool to create embeddings, then use the search tool to find relevant documents, with the second phrase likely scoring highest.
Edge Cases and Error Testing
8. Test with Empty/Short Text
Can you analyze this text: ""
Expected outcome: Should handle empty input gracefully, possibly returning an error message or minimal analysis.
9. Test with Very Long Text
Please secure this document: [Insert 1000+ word document about sensitive financial information]
Expected outcome: Should handle large input without issues, possibly detecting multiple entities and recommending high security level.
10. Test with Multilingual Text
Analyze this text for sensitive information: "Mi número de pasaporte es AB123456 y mi dirección es Calle Principal 123, Madrid, España."
Expected outcome: Should detect entities in non-English text if the underlying entity detection supports it.
Complex Integration Tests
11. End-to-End Workflow Test
First, create secure embeddings for a set of medical records that contain patient information.
Generate a user key for a doctor in the cardiology department.
Search the embeddings for information about "heart conditions" using the doctor's access key.
Expected outcome: Should demonstrate a full workflow involving multiple tools - process for secure embeddings, generate-user-key for RBAC, and search with the key.
12. Auto-Detection Test
Process this text and determine the appropriate security measures automatically: "This quarterly financial report contains projections for Q3 2025 and includes account numbers for our top clients."
Expected outcome: Should use the process tool with "auto" operation and security level, detect sensitive content, and apply appropriate security measures based on the content.
Refer to the this doc for all the functionality tests with Mirror_VectaX
Troubleshooting
Common Issues
Claude Desktop Not Recognizing Tools
Ensure the
claude_desktop_config.jsonfile is in the correct locationVerify the paths in the configuration are absolute and correct
Restart Claude Desktop after making changes
Server Connection Issues
Check if the server is running (
uv run mirror_vectax_server.py)Verify environment variables are set correctly
Check the logs for any error messages
Memory Issues with Batch Processing
The server processes texts one at a time to prevent memory issues
If you experience disconnections, try processing fewer texts at once
Monitor system memory usage during processing
Model Loading Issues
Ensure you have sufficient disk space for model caching
Check internet connectivity for initial model download
Verify the model cache directory is writable
Getting Help
If you encounter issues:
Check the logs in Claude Desktop
Review the server logs
Ensure all prerequisites are installed correctly
Contact support if issues persist
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.
Latest Blog Posts
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/mirrorsecai/mirror-vectax-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server