mcp4xiaozhi
Provides MCP tools for Vietnamese 'On this day' history events, latest VNExpress news, and random fables.
README
MCP-4-XIAOZHI - Hướng dẫn triển khai
Giới thiệu
MCP-History là bộ MCP tools gồm 3 công cụ:
- ngay_nay_nam_xua - Sự kiện lịch sử "Ngày này năm xưa"
- tin_tuc_vnexpress - Tin tức mới nhất từ VNExpress
- truyen_ngu_ngon - Câu chuyện ngắn ngẫu nhiên (23 câu chuyện)
Yêu cầu
- macOS
- Python 3.10+
- Git
Các bước triển khai
1. Clone dự án
git clone https://github.com/vdlaptrinh/mcp4xiaozhi.git
cd mcp-history
2. Tạo môi trường ảo và cài đặt
python3 -m venv mcp_history_env
source mcp_history_env/bin/activate
pip install -r requirements.txt
3. Cấu hình MCP Endpoint
Đăng nhập https://xiaozhi.me/dashboard để lấy MCP_ENDPOINT
Cách 1: Tạo file .env
echo 'MCP_ENDPOINT="wss://api.xiaozhi.me/mcp/?token=YOUR_TOKEN"' > .env
Cách 2: Export trực tiếp
export MCP_ENDPOINT="wss://api.xiaozhi.me/mcp/?token=YOUR_TOKEN"
4. Chạy ứng dụng
Cách A: Chạy GUI (Khuyến nghị)
python3 gui.py
Cách B: Chạy CLI
python3 mcp_pipe.py
5. Tạo shortcut trên Desktop
cat > ~/Desktop/MCP-History.command << 'EOF'
#!/bin/bash
cd /Users/dailuu/mcp-history
source mcp_history_env/bin/activate
python3 gui.py
EOF
chmod +x ~/Desktop/MCP-History.command
Double-click file MCP-History.command để mở ứng dụng.
Cấu trúc file
mcp-history/
├── server.py # MCP server chính (3 tools)
├── mcp_pipe.py # Trình kết nối WebSocket
├── gui.py # Giao diện đồ họa
├── mcp_config.json # Cấu hình MCP servers
├── requirements.txt # Thư viện Python
└── .env # Token MCP_ENDPOINT
MCP Tools
ngay_nay_nam_xua
ngay_nay_nam_xua(opt="TODAY") # TODAY | YESTERDAY | TOMORROW
tin_tuc_vnexpress
tin_tuc_vnexpress(limit=10) # Số tin muốn lấy (1-50)
truyen_ngu_ngon
truyen_ngu_ngon() # Trả về 1 câu chuyện ngẫu nhiên
Khắc phục lỗi
Lỗi SSL Certificate
Nếu gặp lỗi SSL, đã có sẵn fix trong mcp_pipe.py.
Lỗi 401 Unauthorized
- Token hết hạn hoặc không hợp lệ
- Lấy token mới từ https://xiaozhi.me/dashboard
Lỗi "python not found"
Sửa mcp_config.json, thay python bằng python3:
{
"mcpServers": {
"mcp-history": {
"command": "python3",
"args": ["server.py"]
}
}
}
Tác giả
VD Lập Trình - https://vdlaptrinh.github.io
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.