Integrations
Provides a secure file management interface for AI, enabling controlled read/write operations and file listing within a sandboxed environment on the local filesystem.
Integrates with Google's Gemini AI to enable file access operations, allowing Gemini to read, write, and list files within a designated sandbox directory on the user's local machine.
ジェミニ MCP ファイルエージェント (MVP)
このプロジェクトでは、Google の Gemini AI とチャットし、特定の管理されたフォルダー (「サンドボックス」) 内でコンピューター上のファイルを安全に読み取り、書き込み、一覧表示できるようになります。
機能:
mcp_server.py
: Gemini がファイルにアクセスするために使用するローカルサーバー。コンピュータ上のどのフォルダを「サンドボックス」にするかを指定します。- チャットスクリプト (
chat_with_gemini_mcp.py
、simple_chat.py
) : Gemini と会話するためのコマンドラインチャット。Gemini はmcp_server.py
を使用してサンドボックス内のファイルを管理できます。
**注意して使用してください:**これは基本的な例です。mcp_server.py mcp_server.py
アクセスするフォルダには注意してください。
クイックスタート
- **ファイルを取得:**すべての
.py
ファイルが 1 つのフォルダーにあることを確認します。 - APIキー:
- Google AI Studio から Google AI API キーを取得します。
- 環境変数として設定します。(Windowsの場合は、Copy
set GOOGLE_API_KEY="YOUR_KEY_HERE"
てください)
- インストールするもの:(またはCopy
./install_packages.sh
を実行します) - 実行:
- ターミナル1: MCPサーバーを起動する(これにより、デフォルトでCopy
./mcp_data_sandbox/
フォルダーが作成および使用されます。別のフォルダーを使用するには、python mcp_server.py --sandbox-dir ./my_files
実行します) - ターミナル2: チャットを開始Copy
- ターミナル1: MCPサーバーを起動する
- Geminiとチャット:
- 「作業フォルダにはどんなファイルがありますか?」
- 「
notes.txt
を作成し、そこに「Hello world」と書き込みます。」 - 「
notes.txt
を読みます。」
仕組み(簡単)
- ジェミニとチャットします。
- ファイルについて質問すると、Gemini はチャット スクリプトに「ファイル ツール」を使用するように指示します。
- チャット スクリプトは、
mcp_server.py
にサンドボックス フォルダー内でファイル アクション (読み取り、書き込みなど) を実行するように指示します。 - サーバーはそれを実行し、その結果をチャット スクリプトに伝えます。
- チャット スクリプトは Gemini に結果を伝えます。
- ジェミニはあなたに何が起こったのかを伝えます。
重要
- サンドボックスのみ:
mcp_server.py
は、サンドボックスとして選択したフォルダ内のファイルのみにアクセスできます。これは安全のためです。 - **ローカル使用:**自分のコンピューターで実行できるように設計されています。
これは、AIにファイルへのアクセス権限を与える方法を検討するための基本的なツールです。賢く活用しましょう!
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Google の Gemini AI が自然言語チャットのやり取りを通じて、コンピューター上の制御されたサンドボックス フォルダー内のファイルを安全に読み取り、書き込み、一覧表示できるようにするローカル サーバーです。
Related MCP Servers
- -securityFlicense-qualityA server implementing the Model Context Protocol that enables AI assistants like Claude to interact with Google's Gemini API for text generation, text analysis, and chat conversations.Last updated -Python
- -security-license-qualityAn MCP server implementation that allows using Google's Gemini AI models (specifically Gemini 1.5 Pro) through Claude or other MCP clients via the Model Context Protocol.Last updated -1JavaScript
- -securityFlicense-qualityA Model Context Protocol server that enables Claude Desktop to interact with Google's Gemini 2.5 Pro Experimental AI model, with features like Google Search integration and token usage reporting.Last updated -JavaScript
- -securityFlicense-qualityA server that provides access to Google Gemini AI capabilities including text generation, image analysis, YouTube video analysis, and web search functionality through the MCP protocol.Last updated -2TypeScript