
avento/simple_mcp_client
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
Simple MCP Client for OpenAI/Deepseek R1/V3
Обзор
A simple chatbot implementation using the Model Context Protocol (MCP) to interact with various tools and LLM providers. - Connect to MCP servers and list available tools - Execute MCP tools with retry mechanism - Interact with LLM providers through OpenAI-compatible API - Manage server connections and resources - Process user input and LLM responses - Python 3.10+ - uv - MCP server configuration 2. Create and activate virtual environment using uv: 1. Edit .env file with your LLM provider credentials: 2. Configure MCP servers in servers_config.json: Available commands: - Type your message to chat - Type 'quit' or 'exit' to end the session 1. Fork the repository 2. Create your feature branch (git checkout -b feature/AmazingFeature) 3. Commit your changes (git commit -m 'Add some AmazingFeature') 4. Push to the branch (git push origin feature/AmazingFeature) 5. Open a Pull Request
README
MCP Simple Chatbot
A simple chatbot implementation using the Model Context Protocol (MCP) to interact with various tools and LLM providers.
Features
- Connect to MCP servers and list available tools
- Execute MCP tools with retry mechanism
- Interact with LLM providers through OpenAI-compatible API
- Manage server connections and resources
- Process user input and LLM responses
Requirements
- Python 3.10+
- uv
- MCP server configuration
Installation
- Clone the repository:
git clone https://github.com/your-repo/mcp-simple-chatbot.git
cd mcp-simple-chatbot
- Create and activate virtual environment using uv:
uv venv .venv
# On Windows:
.\.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
- Install dependencies:
uv pip install -r requirements.txt
- Copy example configuration files:
cp .env.example .env
cp servers_config.json.example servers_config.json
Configuration
- Edit
.envfile with your LLM provider credentials:
For OpenAI:
LLM_API_KEY=your-openai-api-key
LLM_BASE_URL=https://api.openai.com/v1
LLM_MODEL_ID=gpt-4
For Deepseek:
LLM_API_KEY=your-deepseek-api-key
LLM_BASE_URL=https://api.deepseek.com/v1
LLM_MODEL_ID=deepseek-chat
- Configure MCP servers in
servers_config.json:
{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ""
}
}
}
Usage
- Activate virtual environment:
# On Windows:
.\.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
- Run the chatbot:
python main.py
Available commands:
- Type your message to chat
- Type ‘quit’ or ‘exit’ to end the session
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ""
}
}
}