Skip to main content
Glama
MorvanZhou

Customized MCP Server

by MorvanZhou

맞춤형 MCP 프로젝트

이 프로젝트는 CLI 지원이 있는 mcp 라이브러리를 활용하고 OpenAI의 API와 통합합니다.

요구 사항

프로젝트를 실행하기 전에 필요한 종속성을 설치해야 합니다.

지엑스피1

Related MCP server: mcp-server

용법

  1. OpenAI API 키를 환경 변수로 구성하세요.

    export OPENAI_API_KEY="your-api-key"
  2. MCP 서버를 시작합니다.

    python server.py
  3. 클라이언트를 사용하여 서버와 상호 작용합니다.

    python client.py
  4. 또는 오케스트레이터를 사용하여 LLM 및 도구를 쿼리합니다.

    python main.py

예

날씨 도구 쿼리

클라이언트를 실행하고 get_weather 도구를 호출합니다.

python client.py

상호작용 예시:

You: List tools
Assistant: {
  "tools": [
    {
      "name": "get_weather",
      "description": "Get weather for a city",
      "parameters": {
        "city": {
          "type": "string",
          "description": "Name of the city"
        }
      }
    }
  ]
}

You: Call get_weather with {"city": "Beijing"}
Assistant: 北京的天气是晴天

종속성

  • openai==1.70.0

  • mcp[cli]==1.6.0

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol (MCP) server built with the mcp-framework to provide weather-related tools and data to AI clients. It enables integration of weather capabilities and custom tools into the MCP ecosystem for use with platforms like Claude Desktop.
    6 npm
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    A proof-of-concept MCP server that provides weather information using the Open-Meteo API, with tools for greeting, getting weather by coordinates, and by location name.
    -