
rakesh-eltropy/mcp-client
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
rakesh-eltropy/mcp-client는 MCP 서버 후보가 https://github.com/rakesh-eltropy/mcp-client.에서 수입됩니다
개요
rakesh-eltropy/mcp-client는 MCP 서버 후보가 https://github.com/rakesh-eltropy/mcp-client.에서 수입됩니다
개요(AI 번역)
Simple REST API 및 CLI 클라이언트는 Model Context Protocol (MCP) 서버와 상호 작용합니다.
키 기능
##1. MCP 호환 서버
- 모든 MCP 호환 서버 서버를 지원합니다.
- 사전 설정된 기본 서버:
- ** SQLite** (test.db는 샘플 제품 데이터로 제공되었습니다) -브라질 검색
- 추가 MCP 서버는 mcp-server-config.json 파일에 추가될 수 있습니다.
##2. LangChain과 통합
- LLM 프롬프트를 실행하기 위해 LangChain 레버리지.
- 여러 MCP 서버를 컴파일하고 특정 쿼리에 대응할 수 있습니다.
##3. LLM 공급자 지원
- 기능 기능을 가진 API를 지원하는 어떤 LLM 공급자도 호환이 되는.
- 예제:
- **오픈 ** -클래드
- **Gemini **
- **AWS Nova **
- **Groq **
- **올라마 **
- 모든 LLM 공급자는 기능 기반 API를 제공하면서도 지원됩니다. 자세한 내용은 langchain 문서를 참조하세요.
설치
-
저장소를 복제:
-
** 프로젝트 디렉토리에 네비게이트 ** 저장소 복제 후, 프로젝트 디렉토리로 이동:
-
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 가이드부터 시작하세요 →