Customized MCP Server

Integrations

  • Integrates with OpenAI's API to provide LLM capabilities that can be queried through the MCP server, allowing for tools like weather information retrieval to be called via the client interface.

맞춤형 MCP 프로젝트

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

요구 사항

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

지엑스피1

용법

  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 라이선스에 따라 라이선스가 부여되었습니다.

-
security - not tested
A
license - permissive license
-
quality - not tested

MCP 라이브러리와 OpenAI의 API를 통합한 서버로, 사용자는 자연어 쿼리를 통해 날씨 도구 등 다양한 도구와 상호 작용할 수 있습니다.

  1. Requirements
    1. Usage
      1. Example
        1. Querying the Weather Tool
      2. Dependencies
        1. License
          ID: b4nj5l9ncf