local-os-brain
Lokaler OS-Assistent & Zweites Gehirn (MCP & OpenAI)
Ein autonomer, plattformübergreifender lokaler Desktop-Assistent, der auf dem Model Context Protocol (MCP) und OpenAI (gpt-4o) basiert. Er führt lokale Systembefehle sicher aus, liest und schreibt Dateien, überwacht Hardware-Diagnosen und merkt sich projektübergreifenden Kontext über eine lokale SQLite-Datenbank (brain.db).
Funktionen
MCP FastMCP Server (
server.py):read_local_file: Liest Textinhalte lokaler Dateien sicher.write_local_file: Schreibt Inhalte in lokale Dateien und erstellt fehlende Verzeichnisse automatisch.list_directory: Formatierte Verzeichnisansicht mit Größen- und Dateitypdetails.execute_terminal_command: Führt Shell-Befehle mit Sicherheitsabfragen für destruktive Schlüsselwörter (rm,del,rmdir,format,drop) aus.open_application_or_url: Startet Desktop-Anwendungen oder öffnet URLs im Standard-Webbrowser plattformübergreifend (Windows, macOS, Linux).get_system_metrics: Ruft Echtzeit-Diagnosen zu CPU, RAM, Festplatte und Akku mithilfe vonpsutilab.save_memory: Speichert Benutzernotizen, Projekt-Stack-Kontext und Präferenzen in der SQLite-Datenbankbrain.db.search_memory: Volltext-/Mustersuche über gespeicherte Erinnerungen.
Interaktiver Terminal-Assistent (
client.py):Dynamische Tool-Erkennung über MCP-stdio-Transport.
Start-Speicher-Hydration aus
brain.db.Beständige CLI-REPL-Eingabeaufforderung (
You >/Brain >).
Claude Desktop bereit (
claude_desktop_config.json):Gebrauchsfertige Konfigurationsdatei für die Integration mit Claude Desktop.
Related MCP server: Desktop Commander MCP
Installation & Einrichtung
Voraussetzungen
Python 3.10 oder höher.
Ein OpenAI-API-Schlüssel (
OPENAI_API_KEY).
1. Virtuelle Umgebung einrichten
Navigieren Sie zum Projektstammverzeichnis und erstellen Sie eine virtuelle Umgebung:
# Windows
python -m venv venv
venv\Scripts\activate
# macOS / Linux
python3 -m venv venv
source venv/bin/activate2. Abhängigkeiten installieren
Installieren Sie die festgelegten Abhängigkeiten aus requirements.txt:
pip install -r requirements.txt3. Umgebungskonfiguration
Erstellen Sie eine .env-Datei im Projektstammverzeichnis oder setzen Sie die Umgebungsvariable:
OPENAI_API_KEY=your_openai_api_key_hereDen Assistenten ausführen
Option A: Interaktiver CLI-Client
Starten Sie das interaktive Assistenten-Terminal:
python client.pyBeispielsitzung:
You > Save a memory under key 'favorite_editor' value 'VS Code with Vim binding' tags ['preference', 'tools']
Brain > I've stored your preference for VS Code with Vim binding in the brain database.
You > What are my current system metrics?
Brain > Your system is running at 15.4% CPU usage with 12.2 GB / 32 GB RAM used and 78% battery remaining.Option B: Integration mit Claude Desktop
Um diesen lokalen MCP-Server mit Claude Desktop zu verwenden, fügen Sie die Konfiguration aus claude_desktop_config.json zu Ihrer Claude-Desktop-Konfigurationsdatei hinzu:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Fügen Sie die Serverdefinition hinzu:
{
"mcpServers": {
"local-os-brain": {
"command": "python",
"args": [
"C:/Users/acer/.gemini/antigravity-ide/scratch/mcp_local_brain/server.py"
]
}
}
}Hinweis: Ersetzen Sie "python" durch den absoluten Pfad zur Python-Ausführungsdatei Ihrer virtuellen Umgebung, falls Sie eine venv verwenden.
Projektstruktur
mcp_local_brain/
├── brain.db # SQLite database auto-generated on first run
├── server.py # FastMCP Server with OS & Brain Tools
├── client.py # Interactive Terminal AI Assistant
├── claude_desktop_config.json # Claude Desktop configuration snippet
├── requirements.txt # Pinned python dependencies
└── README.md # Documentation & Setup GuideLizenz
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Related MCP Servers
- AlicenseAqualityDmaintenanceExposes local file I/O, a restricted shell whitelist, and SQLite helpers for safe integration with AI clients like Cursor and Claude Desktop.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to search, update, and manage files, run and control terminal commands and processes, execute code in memory, and work with Excel, PDF, and DOCX documents on local desktops.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to access the local machine over MCP for terminal commands, file operations, code search, process management, and reading or editing PDF, Excel, and Word documents, with no telemetry.394 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to perform sandboxed file-system operations, read-only SQLite querying and schema inspection, environment diagnostics, and cryptographic hashing over Stdio or HTTP using JSON-RPC.2MIT