local-os-brain
ローカルOSアシスタント&セカンドブレイン(MCP & OpenAI)
Model Context Protocol (MCP) と OpenAI(gpt-4o) を搭載した、自律型・クロスプラットフォーム対応のローカルデスクトップアシスタントです。ローカルシステムコマンドを安全に実行し、ファイルの読み書きを行い、ハードウェア診断を監視し、ローカルのSQLiteデータベース(brain.db)を使用してセッションをまたいだプロジェクトコンテキストを記憶します。
機能
MCP FastMCPサーバー(
server.py):read_local_file: ローカルファイルのテキスト内容を安全に読み取ります。write_local_file: ローカルファイルにコンテンツを書き込み、不足しているディレクトリを自動的に作成します。list_directory: サイズとファイルタイプの詳細を含む、フォーマット済みのディレクトリ情報を表示します。execute_terminal_command: 破壊的なキーワード(rm、del、rmdir、format、drop)に対する安全プロンプトのガードレール付きでシェルコマンドを実行します。open_application_or_url: デスクトップアプリケーションを起動するか、デフォルトのWebブラウザでURLを開きます(Windows、macOS、Linuxに対応)。get_system_metrics:psutilを使用して、CPU、RAM、ディスク、バッテリーのリアルタイム診断情報を取得します。save_memory: ユーザーノート、プロジェクトスタックコンテキスト、設定をSQLiteのbrain.dbに永続化します。search_memory: 保存されたメモリ全体を全文検索・パターン検索します。
対話型ターミナルアシスタント(
client.py):MCP stdioトランスポートによる動的なツール検出。
brain.dbからの起動時メモリハイドレーション。永続的なCLI REPLプロンプト(
You >/Brain >)。
Claude Desktop対応(
claude_desktop_config.json):Claude Desktopとの統合にすぐ使える設定ファイル。
Related MCP server: notion-local-ops-mcp
インストールとセットアップ
前提条件
Python 3.10以上。
OpenAI APIキー(
OPENAI_API_KEY)。
1. 仮想環境のセットアップ
プロジェクトのルートディレクトリに移動し、仮想環境を作成します:
# Windows
python -m venv venv
venv\Scripts\activate
# macOS / Linux
python3 -m venv venv
source venv/bin/activate2. 依存関係のインストール
requirements.txt から固定された依存関係をインストールします:
pip install -r requirements.txt3. 環境設定
プロジェクトのルートディレクトリに .env ファイルを作成するか、環境変数を設定します:
OPENAI_API_KEY=your_openai_api_key_hereアシスタントの実行
オプションA: 対話型CLIクライアント
対話型アシスタントターミナルを起動します:
python client.pyセッション例:
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.オプションB: Claude Desktopとの統合
このローカルMCPサーバーを Claude Desktop で使用するには、claude_desktop_config.json の設定をClaude Desktopの設定ファイルに追加します:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
サーバー定義を追加します:
{
"mcpServers": {
"local-os-brain": {
"command": "python",
"args": [
"C:/Users/acer/.gemini/antigravity-ide/scratch/mcp_local_brain/server.py"
]
}
}
}注: venvを使用する場合は、"python" を仮想環境のPython実行ファイルの絶対パスに置き換えてください。
プロジェクト構造
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 Guideライセンス
MIT
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
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to safely perform actions on your computer including file system management, command execution, clipboard access, application launching, and local search with license-based monetization built in.
- AlicenseNot gradedqualityBmaintenanceEnables Notion AI to interact with local files, execute shell commands, and delegate complex tasks to local AI agents. Provides file operations, command execution, and task delegation capabilities for local workspace management.104MIT
- AlicenseAqualityCmaintenanceProvides filesystem, web search, SQLite, and system tools for AI assistants like Claude, enabling secure access to local resources and the web.6MIT
- AlicenseAqualityCmaintenanceExposes local file I/O, a restricted shell whitelist, and SQLite helpers for safe integration with AI clients like Cursor and Claude Desktop.7MIT
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.
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/wasimakramsheriff-1274/local-os-assistant'
If you have feedback or need assistance with the MCP directory API, please join our Discord server