맞춤형 MCP 프로젝트
이 프로젝트는 CLI 지원이 있는 mcp 라이브러리를 활용하고 OpenAI의 API와 통합합니다.
요구 사항
프로젝트를 실행하기 전에 필요한 종속성을 설치해야 합니다.
지엑스피1
Related MCP server: OpenAI API MCP Server
용법
OpenAI API 키를 환경 변수로 구성하세요.
export OPENAI_API_KEY="your-api-key"MCP 서버를 시작합니다.
python server.py클라이언트를 사용하여 서버와 상호 작용합니다.
python client.py또는 오케스트레이터를 사용하여 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.0mcp[cli]==1.6.0
특허
이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다.
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.