Integrations
このプロジェクトは、 MCPプロトコルを介してローカルLLM(例:Qwen)を電卓やナレッジベースなどのツールに接続します。アシスタントはこれらのツールを自動的に検出して呼び出し、ユーザーのクエリに回答します。
📦 機能
- 🔧 MCP サーバーを介したツール実行
- 🧠 HTTP または OpenAI SDK 経由のローカル LLM 統合
- 📚 ナレッジベースのサポート (
data.json
) - ⚡
stdio
およびsse
トランスポートをサポート
🗂 プロジェクトファイル
ファイル | 説明 |
---|---|
server.py | ツールを登録し、MCP サーバーを起動します |
client-http.py | aiohttp を使用してローカル LLM と通信します |
clientopenai.py | LLM + ツール呼び出しロジックに OpenAI 互換の SDK を使用 |
client-stdio.py | stdio を使用する MCP クライアント |
client-see.py | SSEを使用したMCPクライアント |
data.json | Q&Aナレッジベース |
📥 インストール
要件
Python 3.8以上
依存関係をインストールします:
Copy
requirements.txt
Copy
🚀 はじめに
1. MCPサーバーを実行する
Copy
これにより、 add
、 multiply
、 get_knowledge_base
などの関数を含むツール サーバーが起動します。
2. クライアントを開始する
オプション A: HTTP クライアント (生の API 経由のローカル LLM)
Copy
オプションB: OpenAI SDKクライアント
Copy
オプションC: stdioトランスポート
Copy
オプションD: SSEトランスポート
server.py
が以下を設定していることを確認します。
Copy
次に以下を実行します:
Copy
💬 プロンプトの例
数学ツールの呼び出し
Copy
応答:
Copy
ナレッジベースの質問
Copy
応答には、 data.json
からの関連する回答が含まれます。
📁 例: data.json
Copy
🔧 構成
client-http.py
またはclientopenai.py
内で、以下を更新します。
Copy
LLM が OpenAI 互換の API エンドポイントを提供していることを確認します。
🧹 クリーンアップ
クライアントはツールの呼び出しと応答を自動的に処理します。Ctrl Ctrl+C
でサーバーまたはクライアントを停止できます。
🪪 ライセンス
MITライセンス。LICENSEファイルを参照してください。
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
MCP プロトコルを介してローカル LLM を外部ツール (計算機、ナレッジ ベース) に接続し、自動ツール検出と実行を可能にしてクエリ応答を強化します。
Related MCP Servers
- -securityAlicense-qualityMCP server for toolhouse.ai. This does not rely on an external llm unlike the official server.Last updated -1PythonMIT License
- -securityAlicense-qualityA comprehensive toolkit that enhances LLM capabilities through the Model Context Protocol, allowing LLMs to interact with external services including command-line operations, file management, Figma integration, and audio processing.Last updated -14PythonApache 2.0
- -securityAlicense-qualityAn MCP server that provides tools to load and fetch documentation from any llms.txt source, giving users full control over context retrieval for LLMs in IDE agents and applications.Last updated -177PythonMIT License
- -security-license-qualityA tool server that processes mathematical expressions via Multi-Chain Protocol (MCP), allowing LLMs to solve math problems through tool integration.Last updated -PythonMIT License