MinIO Model-Context Protocol (MCP) Server

by ucesys
MIT License
  • Apple

Integrations

  • Provides access to MinIO object storage through standardized tools for listing buckets, listing objects, retrieving objects, and uploading files to MinIO buckets.

MinIO モデルコンテキスト プロトコル (MCP)

このプロジェクトは、MinIOオブジェクトストレージ用のモデルコンテキストプロトコル(MCP)サーバーとクライアントを実装します。MinIOとやり取りするための標準化された方法を提供します。

特徴

サーバ

リソース

Resourcesを通じてMinIOデータを公開します。サーバーは以下のものにアクセスし、提供することができます。

  • テキストファイル(ファイル拡張子に基づいて自動的に検出されます)
  • バイナリ ファイル (application/octet-stream として処理)
  • バケットの内容(バケットあたり最大 1000 個のオブジェクト)
ツール
  • リストバケット
    • リクエストの認証された送信者が所有するすべてのバケットのリストを返します。
    • オプションパラメータ: start_after (ページ区切り)、 max_buckets (結果の制限)
  • リストオブジェクト
    • 各リクエストごとにバケット内のオブジェクトの一部またはすべて(最大 1,000 個)を返します。
    • 必須パラメータ: bucket_name
    • オプションパラメータ: prefix (プレフィックスでフィルタリング)、 max_keys (結果の制限)
  • GetObject
    • MinIOからオブジェクトを取得します
    • 必須パラメータ: bucket_nameobject_name
  • オブジェクトを配置する
    • fputメソッドを使用してMinIOバケットにファイルをアップロードします
    • 必須パラメータ: bucket_nameobject_namefile_path

クライアント

このプロジェクトには複数のクライアント実装が含まれています。

  1. 基本クライアント- MinIO MCP サーバーと直接対話するためのシンプルなクライアント
  2. Anthropic Client - MinIO との AI を活用したインタラクションを実現する Anthropic の Claude モデルとの統合

インストール

  1. リポジトリをクローンします。
git clone https://github.com/yourusername/minio-mcp.git cd minio-mcp
  1. pip を使用して依存関係をインストールします。
pip install -r requirements.txt

またはuvを使用します:

uv pip install -r requirements.txt

環境設定

次の構成でルート ディレクトリに.envファイルを作成します。

# MinIO Configuration MINIO_ENDPOINT=play.min.io MINIO_ACCESS_KEY=your_access_key MINIO_SECRET_KEY=your_secret_key MINIO_SECURE=true MINIO_MAX_BUCKETS=5 # Server Configuration SERVER_HOST=0.0.0.0 SERVER_PORT=8000 # For Anthropic Client (if using) ANTHROPIC_API_KEY=your_anthropic_api_key

使用法

サーバーの実行

サーバーは直接実行できます:

python src/minio_mcp_server/server.py

ベーシッククライアントの使用

from src.client import main import asyncio asyncio.run(main())

Anthropicクライアントの使用

  1. src/client/servers_config.jsonでサーバーを構成します。
{ "mcpServers": { "minio_service": { "command": "python", "args": ["path/to/minio_mcp_server/server.py"] } } }
  1. クライアントを実行します。
python src/client/mcp_anthropic_client.py
  1. アシスタントと対話する:
    • アシスタントは利用可能なツールを自動的に検出します
    • MinIOデータについて質問することができます
    • アシスタントは適切なツールを使用して情報を取得します
  2. セッションを終了します:
    • セッションを終了するには、 quitまたはexitと入力します。

Claude Desktopとの統合

この MCP サーバーを Claude Desktop と統合できます。

構成

MacOSの場合: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows の場合: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "minio-mcp": { "command": "python", "args": [ "path/to/minio-mcp/src/minio_mcp_server/server.py" ] } } }

発達

プロジェクト構造

minio-mcp/ ├── src/ │ ├── client/ # Client implementations │ │ ├── mcp_anthropic_client.py # Anthropic integration │ │ └── servers_config.json # Server configuration │ ├── minio_mcp_server/ # MCP server implementation │ │ ├── resources/ # Resource implementations │ │ │ └── minio_resource.py # MinIO resource │ │ └── server.py # Main server implementation │ ├── __init__.py │ └── client.py # Basic client implementation ├── LICENSE ├── pyproject.toml ├── README.md └── requirements.txt

テストの実行

pytest

コードのフォーマット

black src/ isort src/ flake8 src/

デバッグ

MCPサーバーはstdio経由で実行されるため、デバッグが困難になる場合があります。最適なデバッグ環境を実現するには、MCP Inspectorの使用をお勧めします。

npx @modelcontextprotocol/inspector python path/to/minio-mcp/src/minio_mcp_server/server.py

起動すると、ブラウザでアクセスしてデバッグを開始できる URL がインスペクタに表示されます。

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。

-
security - not tested
A
license - permissive license
-
quality - not tested

MinIO オブジェクト ストレージと対話するための標準化された方法を提供し、バケット/オブジェクトの一覧表示、オブジェクトの取得、ファイルのアップロードなどの操作をサポートしながら、テキスト ファイル、バイナリ ファイル、バケットの内容にアクセスできるようにします。

  1. 特徴
    1. サーバ
    2. クライアント
  2. インストール
    1. 環境設定
      1. 使用法
        1. サーバーの実行
        2. ベーシッククライアントの使用
        3. Anthropicクライアントの使用
      2. Claude Desktopとの統合
        1. 構成
      3. 発達
        1. プロジェクト構造
        2. テストの実行
        3. コードのフォーマット
      4. デバッグ
        1. ライセンス

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            This server facilitates interaction with Keboola's Storage API, enabling users to browse and manage project buckets, tables, and components efficiently through Claude Desktop.
            Last updated -
            7
            13
            Python
            MIT License
            • Apple
          • -
            security
            F
            license
            -
            quality
            This server provides an interface for performing basic file system operations such as navigation, reading, writing, and file analysis, allowing users to manage directories and files efficiently.
            Last updated -
            3
            Python
          • A
            security
            F
            license
            A
            quality
            Enables AI models to perform file system operations (reading, creating, and listing files) on a local file system through a standardized Model Context Protocol interface.
            Last updated -
            3
            JavaScript
          • -
            security
            -
            license
            -
            quality
            A Model Context Protocol server that enables large language models to upload files directly to Alibaba Cloud Object Storage Service (OSS), supporting multiple OSS configurations and specified upload directories.
            Last updated -
            1
            TypeScript

          View all related MCP servers

          ID: q82dn5hswd