Python SDK MCP服务器

使用Python SDK搭建的MCP服务器,支持多种连接方式,适用于客户端与服务器的通信场景。

  • by ThangQT2606
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 thangqt2606/mcp-server

使用说明

MCP Server Using Python SDK

1. Thêm API key cần thiết cho chương trình

Tạo .env trong 2 folder client & server

    Hãy xem .env.example

2. Để chạy MCP server

    - cd server
    - python your_file.py

3. Chạy máy khách kết nối với MCP Server

    - cd client
    - Hãy lựa chọn kiểu kết nối phù hợp với MCP server [stdio, sse]
    - python your_file.py