secure-local-mcp
Enables Ollama to interact with local notes through MCP tools for listing, reading, searching, and writing notes.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Secure Local MCP Agent (Engineering Edition)
A Software Engineer AI Agent system that is 100% offline, secure, and directly interacts with your personal computer via the MCP (Model Context Protocol).
🎯 The Problem Solved
Current Cloud AIs pose a risk of source code data leaks and cannot directly interact with your local operating system.
This project builds a personal AI running 100% offline (Native) on Windows, capable of reading/analyzing your project's source code, as well as executing real system commands (like ping, ipconfig, dir) without being restricted by virtualization layers (Docker).
Related MCP server: mcp-obsidian
🏗️ System Architecture (Native Mode)
my_notes/ (Notes) & project_context/ (Source Code)
│
▼
src/indexer.py ──── SQLite FTS5 ──── Scan & Index Code/Text
│
▼
src/server.py ───── FastMCP ──────── 5 Tools (list, read, search, write, execute_command)
│
▼ (stdio / JSON-RPC)
src/ui.py ───────── Streamlit ────── Visual Web Interface (Transparent Tool execution flow)
│
▼
Ollama (Gemma4/Qwen) / Any Local LLM✨ Highlight Features
Feature | Details |
Codebase Indexing | SQLite FTS5 reads and indexes a variety of programming languages ( |
Native OS Commands | Allows the AI to execute Terminal (Powershell/CMD) commands on the actual Windows machine to query the network or system. |
Transparent Web UI | Every tool execution (reading files, running network commands) is displayed in detail as an Expander block, hiding nothing. |
100% Offline & Un-sandboxed | No Docker is used to avoid network isolation. Data never leaves your machine. |
Directory Traversal Protection | Blocks payloads like |
🚀 Installation & Usage (1-Click)
The system is designed to run directly on Windows (Native) to fully utilize the operating system's capabilities and permissions.
Requirements:
Python 3.10+ installed (with PATH configured).
Ollama installed and running on the default port (
http://localhost:11434).
How to run:
Simply double-click the start.bat file.
The script will automatically:
Create a virtual environment (venv).
Install the necessary dependencies (
pip install).Open the Web UI app (Streamlit) in your browser at
http://localhost:8501.
🛡️ Security Mechanisms
The system applies a robust protection layer against Directory Traversal Attacks (CWE-22):
It utilizes resolve() and is_relative_to() to ensure that the read/write paths absolutely cannot escape the 2 permitted root directories (my_notes and project_context).
📁 Project Structure
secure-local-mcp/
├── my_notes/ # Personal notes repo (.md, .txt)
├── project_context/ # Project source code for AI analysis (.py, .js, .json,...)
├── src/
│ ├── server.py # FastMCP Server (Tool declarations)
│ ├── indexer.py # SQLite FTS5 Indexing Engine (Handles Text & Code)
│ └── ui.py # Streamlit Web Chat Interface
├── start.bat # Windows (Native) automated startup script
├── requirements.txt
└── README.mdThis server cannot be deployed
Maintenance
Related MCP Connectors
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Google Keep-style notes app with an MCP server for AI agents to read/write notes.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceLocal-first MCP server that extracts structured knowledge from markdown notes into SQLite with full-text search, enabling AI coding tools to retrieve relevant context offline at zero cost.3MIT
- AlicenseAqualityCmaintenanceA filesystem-based MCP server for Obsidian vaults that enables LLMs to browse, search, read, write, and edit Markdown notes directly on disk without requiring Obsidian to be running.6979 npm1CeCILL-B Free Software Agreement
- AlicenseAqualityAmaintenanceMCP server for managing a local, domain-agnostic knowledge base using Markdown notes with frontmatter. Enables AI agents to capture, read, search, link, and maintain notes with atomic writes and privacy controls.13MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI agents read and write access to a folder of Markdown notes, supporting full-text search, reading, listing, and writing notes. It is deliberately small, with no dependencies beyond the MCP SDK, and includes proper path traversal protection.MIT