Secure MCP Server
Optional integration with Brave Search API for enhanced web search.
Provides free web search capabilities using DuckDuckGo.
Click on "Deploy 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 MCP Serverstore memory: my favorite color is blue"
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 MCP Server
Production-ready Multi-Context Protocol server with web search and persistent memory
Works on Windows, Linux, and Mac - Built with Python for maximum security and compatibility.
β¨ Features
Feature | Description |
π Security First | JWT authentication, rate limiting, input sanitization, encryption |
π§ Persistent Memory | Vector database with semantic search using AI embeddings |
π Web Search | Built-in web search (DuckDuckGo + optional Brave API) |
π₯ Multi-User | Isolated memory spaces and authentication per user |
πͺ Windows Ready | Full support for Windows, Linux, and Mac |
π Easy Setup | Automated installation with sensible defaults |
Related MCP server: PMCP - Perfect Model Context Protocol Server
π― Quick Start
Windows (5 minutes)
setup.bat
venv\Scripts\activate
python manage_users.py
python src\server.pySee QUICKSTART_WINDOWS.md for detailed Windows instructions
Linux/Mac (5 minutes)
chmod +x setup.sh
./setup.sh
source venv/bin/activate
python3 manage_users.py
python3 src/server.pySee QUICKSTART.md for detailed Linux/Mac instructions
π Requirements
Python 3.8+ (Download)
β οΈ Windows: Check "Add Python to PATH" during installation
2GB RAM recommended
Internet connection (for web search)
π οΈ What's Included
MCP tools (memory, search, SwarmUI skills)
web_search- Search the internet for informationstore_memory- Save information with tags for latersearch_memory- Find memories using semantic searchget_recent_memories- Retrieve recent contextmemory_stats- View storage statisticsclear_memories- Reset memory storagedelete_memory- Remove one memory by IDlist_swarmui_skills/get_swarmui_skill- Load SwarmUI agent skills from.agents/skills/*/SKILL.mdwhenswarmui.pathorSWARMUI_PATHis setSwarmUI HTTP API (when
swarmui.api_urlorSWARMUI_API_URL):swarmui_get_queue_status,swarmui_list_models,swarmui_list_t2i_params,swarmui_generate_image,swarmui_interruptβ calls SwarmUIβs JSONPOST /API/...(session + optional login). For broad compatibility, callswarmui_list_modelswith an empty arguments object ({}) first, then narrow by path/subtype if needed.swarmui_generate_imagealso auto-resolves nickname/partial model text to a valid model path by querying listmodels internally, and accepts a natural-languageinstructionstring (it parses model/steps/cfg/resolution/images). It downloads outputs and returns embedded MCP image content so clients like LM Studio can render images directly in chat (rather than URL-only Markdown links); if the client sends a progress token with the tool call, queue/backend updates are sent while generation runs. Seeconfig.example.yaml.
Core Components
β MCP Server (
src/server.py) - Main server with stdio transportβ Security Module - JWT auth, encryption, rate limiting
β Memory System - Vector database with ChromaDB
β Web Search - DuckDuckGo (free) + Brave API (optional)
β User Management - CLI tool for user administration
β Test Client - Automated testing and verification
π Security Features
β JWT token-based authentication (30-min expiration)
β Per-user rate limiting (60/min, 1000/hour)
β AES-256 encryption for sensitive data
β Bcrypt password hashing
β Input sanitization (prevents injection attacks)
β URL filtering for web search
β Isolated user memory spaces
β Comprehensive audit logging
π Project Structure
secure-mcp-server/
βββ src/
β βββ server.py # Main MCP server β
β βββ security.py # Authentication & encryption
β βββ memory_system.py # Vector database & memory
β βββ web_search.py # Web search functionality
βββ data/ # Runtime data (auto-created)
β βββ memory_db/ # Memory storage
β βββ server.log # Activity logs
βββ setup.bat # Windows installation β
βββ setup.sh # Linux/Mac installation β
βββ manage_users.py # User management CLI β
βββ test_client.py # Testing utility β
βββ QUICKSTART_WINDOWS.md # Windows guide β
βββ QUICKSTART.md # Linux/Mac guide
βββ requirements.txt # Python dependenciesβ = Most important files
π§ͺ Testing Your Server
Automated Tests (Windows)
venv\Scripts\activate
python test_client.pyAutomated Tests (Linux/Mac)
source venv/bin/activate
python test_client.pyInteractive Mode
python test_client.py --interactiveπ‘ Usage Example
# Store a memory
await session.call_tool(
"store_memory",
arguments={
"content": "User prefers Python and dark mode",
"tags": ["preferences"]
},
meta={"user_id": "john"}
)
# Search memories
await session.call_tool(
"search_memory",
arguments={"query": "What are user preferences?"},
meta={"user_id": "john"}
)
# Web search
await session.call_tool(
"web_search",
arguments={"query": "Python MCP tutorial"},
meta={"user_id": "john"}
)π§ Configuration
Edit .env file for settings:
# Security
JWT_SECRET_KEY=your-secret-key
ENCRYPTION_KEY=your-encryption-key
# Memory
MEMORY_DB_PATH=./data/memory_db
MEMORY_MAX_RESULTS=10
# Web Search
SEARCH_API_KEY=optional-brave-api-key
SEARCH_MAX_RESULTS=10
# Rate Limiting
RATE_LIMIT_PER_MINUTE=60
RATE_LIMIT_PER_HOUR=1000πͺ Windows-Specific Notes
Python Installation
Download from python.org
β οΈ IMPORTANT: Check "Add Python to PATH" during installation
Restart Command Prompt after installation
Running Scripts
Use
python(notpython3)Use
\for paths (e.g.,data\memory_db)Activate venv:
venv\Scripts\activate
Claude Desktop Integration
Config file location: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"secure-mcp": {
"command": "python",
"args": ["C:\\path\\to\\secure-mcp-server\\src\\server.py"]
}
}
}π Troubleshooting
Windows
Issue | Solution |
"Python not recognized" | Add Python to PATH or reinstall with PATH option |
Module errors | Run |
Activation fails | Use |
Linux/Mac
Issue | Solution |
Permission denied | Run |
Module errors | Run |
Python version | Ensure Python 3.8+ with |
All Platforms
Issue | Solution |
Slow first run | Embedding model downloads once (~80MB) |
Web search fails | Check internet; DuckDuckGo works without API key |
Auth failures | Verify user exists with |
π Performance
Memory search: <100ms for 1000 memories
Web search: 1-3 seconds (network dependent)
Authentication: <10ms
Supports: Hundreds of concurrent users
π¨ Security Checklist
Before deploying:
Change default admin password (admin/changeme123)
Generate unique JWT_SECRET_KEY
Generate unique ENCRYPTION_KEY
Review rate limits in
.envEnable logging and monitoring
Backup
data/directory regularlyKeep dependencies updated
π Documentation
Windows Quick Start - Windows installation
Linux/Mac Quick Start - Unix installation
Project Summary - Complete overview
Full Documentation - Detailed guide
Tool Usage Playbook - LLM-facing MCP tool routing and reliability rules
π Learning Resources
MCP Protocol: https://docs.anthropic.com/mcp
ChromaDB: https://docs.trychroma.com/
Brave Search API: https://brave.com/search/api/
π License
Provided as-is for educational and development purposes.
π You're All Set!
Your MCP server is:
β Fully functional
β Production-ready
β Windows compatible
β Security-hardened
β Multi-user capable
β Well-documented
Questions? Check the documentation or review code comments.
Ready to start? Follow your platform's Quick Start guide!
Built with β€οΈ for Windows, Linux, and Mac. Happy building! π
This server cannot be deployed
Maintenance
Related MCP Connectors
Cloud-hosted MCP server for durable AI memory
An MCP memory server. One memory your agents share β across models, devices and apps.
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA sophisticated MCP server providing advanced memory capabilities with RAG, hallucination detection, and enterprise-grade AI infrastructure for intelligent agent ecosystems.-
- -licenseNot gradedqualityNot gradedmaintenanceA comprehensive production-ready MCP server with AI integration, plugin management, and web-based administration. Features multi-database support, RAG capabilities, SSH/SFTP access, and a built-in plugin hub for managing the MCP ecosystem.-
- FlicenseBqualityDmaintenanceProduction-ready MCP server that integrates OpenAI API with extensible tool support, enabling dynamic plugin loading and knowledge search capabilities through multiple interfaces including CLI and browser UI.2-
- AlicenseNot gradedqualityCmaintenanceA production-ready MCP server that enables multiple AI agents to collaborate through a shared, concurrency-safe memory space. It supports advanced search, full CRUD operations, and automatic backups to facilitate asynchronous communication between agents.MIT