Skip to main content
Glama

Selector AI FastMCP

セレクターAI FastMCP

このリポジトリは、Selector AI向けのモデルコンテキストプロトコル(MCP)の完全な実装を提供します。ストリーミング対応サーバーと、stdin/stdoutを介して通信するDockerベースのインタラクティブクライアントが含まれています。

✨ 特徴

✅ サーバー

FastMCP互換でPython上に構築

リアルタイムSSEストリーミングのサポート

セレクターAIとのインタラクティブAIチャット

最小限の定型文

コンテナ オーケストレーション用の組み込みヘルスチェック

リクエスト/レスポンスのログ記録と再試行

✅ クライアント

PythonクライアントがDocker経由でサーバーを起動する

CLIとプログラムによるアクセスの両方をサポート

stdin と stdout 経由で読み取り/書き込み

.env を使用した環境変数の設定

🚀 クイックスタート

前提条件

Python 3.8以上

ドッカー

セレクターAI APIキー

セレクター API URL

⚙️ インストール

リポジトリのクローンを作成する

git クローンhttps://github.com/automateyournetwork/selector-mcp-server

CDセレクター-AI-MCP

Pythonの依存関係をインストールする

pip インストール -r 要件.txt

環境変数を設定する .env ファイルを作成します。

SELECTOR_URL= https://セレクター API の URL

SELECTOR_AI_API_KEY=APIキー

🐳 Dockerファイル

サーバーは、次の Dockerfile を使用して軽量コンテナ内で実行されます。

python:3.11-slimから

ワークディレクトリ /app

requirements.txt をコピーします。

pip install -r requirements.txt を実行します。

コピー 。 。

コマンド ["python", "-u", "mcp_server.py"]

ヘルスチェック --interval=30s --timeout=30s --start-period=5s
CMD python -c "import socket; s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM); s.connect('/tmp/mcp.sock'); s.send(b'{"tool_name": "ready"}\n'); data = s.recv(1024); s.close(); import json; result = json.loads(data); exit(0 if result.get('status') == 'ready' else 1)" || exit 1

Dockerイメージをビルドする

docker build -t セレクター-mcp 。

🧠 クライアントの使用

クライアントを起動する

これにより、Docker コンテナが生成され、対話型シェルが開きます。

Python mcp_client.py

CLIセッションの例

あなた> AIOps とは何ですか?

セレクター> AIOps は、IT 運用への AI の適用を指します...

プログラムによるアクセス

selector_client から call_tool、spawn_server をインポートします

proc = spawn_server()

call_tool(proc, "準備完了")

response = call_tool(proc, "ask_selector", {"content": "AIOps とは何ですか?"})

印刷(応答)

🖥️ Claude Desktop での使用

Claude Desktop と統合する場合は、このサーバーを実行して、ソケットまたは HTTP エンドポイントをローカルで公開できます。

Docker またはネイティブを使用してサーバーを実行します。

Python mcp_server.py

Claude Desktop の外部ツール構成からソケットまたは HTTP エンドポイントに接続します。

メッセージが次の形式と一致していることを確認してください。

{ "method": "tools/call", "tool_name": "ask_selector", "content": "What can you tell me about device S6?" }

Claude Desktop は、stdout 経由で AI の構造化された応答を受け取ります。

🛠️ 独自のコンテナを構築する

この設定をカスタマイズするには:

このリポジトリをフォークまたはクローンする

selector_fastmcp_server.py を変更して、好みのモデルまたはルーティングロジックを統合します。

Docker イメージを再構築します。

次のコマンドを実行して、docker build -t my-custom-mcp を実行します。

代わりに my-custom-mcp を生成するようにクライアントを更新します。

「docker」、「run」、「-i」、「--rm」、「my-custom-mcp」

📁 プロジェクト構造

セレクター-ai-mcp/

├── selector_fastmcp_server.py # Server: MCP + Selector AI integration ├── selector_client.py # Client: Docker + stdin/stdout CLI ├── Dockerfile # Container config ├── requirements.txt # Python deps ├── .env # Environment secrets └── README.md # You are here

✅ 要件

requirements.txt 内の依存関係:

リクエスト

Python-dotenv

📜 ライセンス

Apacheライセンス2.0

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

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

ストリーミング対応サーバーと、stdin/stdout を介して通信する Docker ベースのクライアントを通じて、Selector AI とのリアルタイムのインタラクティブな AI チャットを可能にするモデル コンテキスト プロトコル (MCP) サーバー。

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    A powerful Model Context Protocol (MCP) server for Docker operations, enabling seamless container and compose stack management through Claude AI.
    Last updated -
    4
    356
    Python
    MIT License
    • Apple
  • -
    security
    F
    license
    -
    quality
    A specialized Model Context Protocol (MCP) server that enables AI-powered interview roleplay scenarios for practice with realistic conversational feedback.
    Last updated -
    9
    4
    TypeScript
  • -
    security
    A
    license
    -
    quality
    A high-performance Model Context Protocol (MCP) server designed for large language models, enabling real-time communication between AI models and applications with support for session management and intelligent tool registration.
    Last updated -
    2
    Python
    MIT License
  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol (MCP) server that provides AI capabilities to Teambition applications, enabling programmatic access to user management, organization data, and project collaboration features through natural language.
    Last updated -
    TypeScript
    MIT License

View all related MCP servers

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/automateyournetwork/selector-mcp-server'

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