Content
# Smart Customer Service Example
This is an example project of a smart customer service system based on the MCP framework, demonstrating how to build and deploy smart customer service applications.
Document: https://mp.weixin.qq.com/s/gz3ZL_3XD8sfxustNQvK2g
## Features
- Intelligent Q&A service
- Human customer service transfer
- Order information query
- Product knowledge base management
## System Requirements
- Python >= 3.10
- MCP framework >= 1.6.0
## Installation
1. Create and activate a virtual environment (recommended):
```bash
uv venv
source .venv/bin/activate # Linux/macOS
```
2. Install dependencies:
```bash
uv pip install .
```
## Usage
1. Run
- Run in stdio mode, need to start with --stdio
```bash
uv --directory /opt/apps/python_project/SmartCustomerSupportMCP run mcp-smart-customer-support --stdio
```
or
```bash
python start.py --stdio
```
- Run in sse mode, just start it directly, default port 9000
```bash
uv --directory /opt/apps/python_project/SmartCustomerSupportMCP run mcp-smart-customer-support
```
or
```bash
python start.py
```
2. Use inspector in stdio mode:
```bash
npx @modelcontextprotocol/inspector uv --directory /opt/apps/python_project/SmartCustomerSupportMCP run mcp-smart-customer-support --stdio
```
3. Use desktop applications such as Vscode or Claude
```json
{
"mcpServers": {
"SmartCustomerSupportMCP": {
"command": "uv",
"args": [
"--directory",
"/opt/apps/python_project/SmartCustomerSupportMCP",
"run",
"mcp-smart-customer-support",
"--stdio"
]
}
}
}
```
**Add environment variable information**
```json
{
"mcpServers": {
"SmartCustomerSupportMCP": {
"command": "uv",
"args": [
"--directory",
"/opt/apps/python_project/SmartCustomerSupportMCP",
"run",
"mcp-smart-customer-support",
"--stdio"
],
"env": {
"MYSQL_HOST": "192.168.xxx.xxx",
"MYSQL_PORT": "3306",
"MYSQL_USER": "root",
"MYSQL_PASSWORD": "root",
"MYSQL_DATABASE": "a_llm",
"MYSQL_ROLE": "admin"
}
}
}
}
```
## Project Structure
```
src/mcp_smart_customer_support/
├── __init__.py # Package initialization file
├── mcp_server.py # MCP server implementation
├── human_customer_service.py # Human customer service processing module
├── order_operations.py # Order operation related functions
└── product_knowledge.py # Product knowledge base management
```
## Author
ggguo (admin@precariat.tech)
## License
This project is licensed under the MIT License.
Connection Info
You Might Also Like
awesome-mcp-servers
A collection of MCP servers.
git
A Model Context Protocol server for Git automation and interaction.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
Appwrite
Build like a team of hundreds