MCP Server
Provides tools to interact with GitHub, such as retrieving user information and repository lists.
Offers capabilities to list and search collections in a Milvus vector database.
Allows executing Cypher queries against a Neo4j graph database.
Enables running SQL queries on a PostgreSQL database.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Serverlist my GitHub repositories"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server
Đây là một server được xây dựng bằng FastMCP, cung cấp một tập hợp các công cụ để tương tác với nhiều dịch vụ và cơ sở dữ liệu khác nhau, bao gồm GitHub, Neo4j, PostgreSQL, và Milvus.
Hướng dẫn Cài đặt và Chạy
Dự án này hỗ trợ hai kịch bản hoạt động chính:
Local Development (stdio): Chạy server trực tiếp trên máy tính của bạn để phát triển và gỡ lỗi. Kết nối thông qua Standard I/O.
Remote Deployment (HTTP): Triển khai server lên một máy chủ từ xa và truy cập qua mạng. Đây là kịch bản dành cho production.
Kịch bản 1: Local Development (Chạy trên máy cá nhân)
Sử dụng kịch bản này khi bạn đang phát triển hoặc thử nghiệm các tính năng mới.
1. Cài đặt:
Clone repository về máy.
Tạo file
.envvà điền các thông tin cần thiết (xem mục Cấu hình file .env bên dưới).Cài đặt các thư viện:
uv pip install -r pyproject.toml
2. Cấu hình mã nguồn:
Đảm bảo dòng cuối cùng trong file mcp_server.py được đặt ở chế độ stdio:
if __name__ == "__main__":
mcp.run(transport='stdio')3. Cấu hình trong Claude Desktop (hoặc công cụ tương tự):
Thêm một server mới với cấu hình chạy lệnh local:
Command:
D:\path\to\your\project\mcp_server\.venv\Scripts\uv.exe(thay bằng đường dẫn thực tế)Arguments:
run mcp_server.pyWorking Directory:
D:\path\to\your\project\mcp_server(thay bằng đường dẫn thực tế)
Kịch bản 2: Remote Deployment (Triển khai lên Server từ xa)
Sử dụng kịch bản này để đưa ứng dụng vào hoạt động và truy cập từ bất kỳ đâu.
Bước 1: Chỉnh sửa mã nguồn để chạy ở chế độ HTTP
Trong file mcp_server.py, thay đổi dòng cuối cùng để server chạy ở chế độ HTTP:
if __name__ == "__main__":
# Chạy server ở chế độ HTTP, lắng nghe trên tất cả các địa chỉ IP ở port 8000
mcp.run(transport='http', host='0.0.0.0', port=8000)Bước 2: Đẩy code lên Git
Đảm bảo file .env đã có trong .gitignore để không đưa thông tin nhạy cảm lên repository.
git add mcp_server.py
git commit -m "feat: Switch to HTTP transport for remote deployment"
git push origin mainBước 3: Chuẩn bị và Triển khai lên Server Remote (Ví dụ: Ubuntu)
SSH vào server và cài đặt các công cụ cần thiết:
sudo apt update sudo apt install -y git python3 python3-pip curl -LsSf https://astral.sh/uv/install.sh | shClone project về server:
git clone <your_repository_url> cd mcp_serverCài đặt thư viện:
uv pip install -r pyproject.tomlTạo file
.envtrên server và điền các giá trị cấu hình cho môi trường production.nano .envMở port trên firewall (ví dụ port 8000):
sudo ufw allow 8000/tcp sudo ufw reloadLưu ý: Nếu dùng AWS, GCP, Azure, bạn cần mở port trong Security Group/Network Rules.
Bước 4: Chạy ứng dụng như một Dịch vụ (Systemd)
Tạo file service:
sudo nano /etc/systemd/system/mcp_server.serviceDán nội dung sau vào file (thay
your_usernamevà đường dẫn cho đúng):[Unit] Description=MCP Server Application After=network.target [Service] User=your_username Group=your_username WorkingDirectory=/home/your_username/mcp_server ExecStart=/home/your_username/.cargo/bin/uv run /home/your_username/mcp_server/mcp_server.py Restart=always RestartSec=3 [Install] WantedBy=multi-user.targetKích hoạt và khởi động service:
sudo systemctl daemon-reload sudo systemctl enable mcp_server.service sudo systemctl start mcp_server.serviceKiểm tra trạng thái:
sudo systemctl status mcp_server.service
Bước 5: Kết nối từ Claude Desktop
Trong ứng dụng của bạn, thêm một server mới với cấu hình URL:
Server URL:
http://<your_remote_server_ip>:8000(thay bằng IP public của server bạn).
Cấu hình file .env
Tạo file .env trong thư mục gốc của dự án và điền các thông tin sau:
# GitHub Personal Access Token
GITHUB_TOKEN="ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Neo4j Connection Details
NEO4J_URI="bolt://localhost:7687"
NEO4J_USER="neo4j"
NEO4J_PASSWORD="your_neo4j_password"
# PostgreSQL Connection Details
POSTGRES_HOST="localhost"
POSTGRES_PORT="5432"
POSTGRES_USER="postgres"
POSTGRES_PASSWORD="your_postgres_password"
POSTGRES_DB="your_database_name"
# Milvus Connection Details
MILVUS_HOST="localhost"
MILVUS_PORT="19530"
MILVUS_USER="your_milvus_user"
MILVUS_PASSWORD="your_milvus_password"Các Công Cụ Có Sẵn
get_github_user_info()get_github_repos()run_neo4j_query(query: str)run_postgres_query(query: str)list_milvus_collections()search_milvus_collection(...)
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/namto908/MCP_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server