Skip to main content
Glama

ローカル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: 破壊的なキーワード(rmdelrmdirformatdrop)に対する安全プロンプトのガードレール付きでシェルコマンドを実行します。

    • 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/activate

2. 依存関係のインストール

requirements.txt から固定された依存関係をインストールします:

pip install -r requirements.txt

3. 環境設定

プロジェクトのルートディレクトリに .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.json

  • macOS: ~/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

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables 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.
    104
    MIT

View all related MCP servers

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.

View all MCP Connectors

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/wasimakramsheriff-1274/local-os-assistant'

If you have feedback or need assistance with the MCP directory API, please join our Discord server