
rakesh-eltropy/mcp-client
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
rakesh-eltropy/mcp-client は [https://github.com/rakesh-eltropy/mcp-client.] からインポートされた MCP サーバーの候補です
概要
rakesh-eltropy/mcp-client は [https://github.com/rakesh-eltropy/mcp-client.] からインポートされた MCP サーバーの候補です
概要(AI 翻訳)
シンプルなREST APIとCLIクライアント**は、モデルコンテキストプロトコル(MCP)サーバーとやり取りします。
主な特長
##1. MCP対応サーバー
- MCP 互換サーバーのサーバーをサポート
- 事前設定されたデフォルトサーバー: -SQLite (test.db はサンプル製品データを提供しました)
- 編み物検索
- mcp-server-config.json ファイルに追加の MCP サーバーを追加できます。
##2. LangChainと統合
- LLMプロンプトを実行するためにLangChainを活用します。
- 複数のMCPサーバーが連携し、特定のクエリに同時に応答できるようにします。
##3。 LLMプロバイダーサポート
- 機能機能機能とAPIをサポートするLMプロバイダーと互換性があります。
- 例:
- **OpenAI **
- クラッド
- ジェミニ
- AWSノバ
- Groq
- オラマ
- 機能ベースの API を提供する限り、本質的にすべての LLM プロバイダーがサポートされます。 詳細は langchain のドキュメントを参照してください。
セットアップ
- リポジトリのクローン化:
2.プロジェクトディレクトリへナビゲート リポジトリをクローニングした後、プロジェクトディレクトリに移動します。
3。 OPENAI API KEY環境変数を設定します。
mcp-server-config.json ファイルに OPENAI_API_KEY を設定することもできます.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCP REST API and CLI Client
A simple REST API and CLI client to interact with Model Context Protocol (MCP) servers.
Key Features
1. MCP-Compatible Servers
- Supports any MCP-compatible servers servers.
- Pre-configured default servers:
- SQLite (test.db has been provided with sample products data)
- Brave Search
- Additional MCP servers can be added in the mcp-server-config.json file
2. Integrated with LangChain
- Leverages LangChain to execute LLM prompts.
- Enables multiple MCP servers to collaborate and respond to a specific query simultaneously.
3. LLM Provider Support
- Compatible with any LLM provider that supports APIs with function capabilities.
- Examples:
- OpenAI
- Claude
- Gemini
- AWS Nova
- Groq
- Ollama
- Essentially all LLM providers are supported as long as they provide a function-based API. Please refer langchain documentation for more details.
Setup
-
Clone the repository:
git clone https://github.com/rakesh-eltropy/mcp-client.git -
Navigate to the Project Directory After cloning the repository, move to the project directory:
cd mcp-client -
Set the OPENAI_API_KEY environment variable:
export OPENAI_API_KEY=your-openai-api-keyYou can also set the
OPENAI_API_KEYin the mcp-server-config.json file.You can also set the
providerandmodelin the mcp-server-config.json file. e.g.providercan beollamaandmodelcan bellama3.2:3b.
4.Set the BRAVE_API_KEY environment variable:
export BRAVE_API_KEY=your-brave-api-key
You can also set the BRAVE_API_KEY in the mcp-server-config.json file.
You can get the free BRAVE_API_KEY from Brave Search API.
-
Running from the CLI:
uv run cli.pyTo explore the available commands, use the
helpoption. You can chat with LLM usingchatcommand. Sample prompts:What is the capital city of India?Search the most expensive product from database and find more details about it from amazon? -
Running from the REST API:
uvicorn app:app --reloadYou can use the following curl command to chat with llm:
curl -X POST -H "Content-Type: application/json" -d '{"message": "list all the products from my local database?"}' http://localhost:8000/chatYou can use the following curl command to chat with llm with streaming:
curl -X POST -H "Content-Type: application/json" -d '{"message": "list all the products from my local database?", "streaming": true}' http://localhost:8000/chat
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →