ZD

zahere-dev/mcp-labs

开发工具
43 stars 0 forks 质量 60 趋势 60

This project demonstrates how to build a simple MCP (Model Context Protocol) client and server using OpenAI's openai Python SDK and the mcp package.

概览

This project demonstrates how to build a simple MCP (Model Context Protocol) client and server using OpenAI's openai Python SDK and the mcp package.

README

🧠 OpenAI MCP BMI Tool – Client & Server Demo

This project demonstrates how to build a simple MCP (Model Context Protocol) client and server using OpenAI’s openai Python SDK and the mcp package. We expose a BMI calculator tool via the server and use an LLM-powered client to discover and invoke the tool based on natural language queries.


📽️ Demo Video

Watch the full tutorial: How to Build an OpenAI MCP Client and Server
(https://www.youtube.com/watch?v=hMHYhRcd_Uo)


🚀 Features

  • ✅ Lightweight MCP Server using FastMCP
  • ✅ BMI calculation exposed as a tool
  • ✅ OpenAI GPT-4o model used to intelligently select tools and arguments
  • ✅ STDIO-based client-server communication
  • ✅ JSON-based tool calling flow using natural language
View this README on GitHub

安装

This server does not publish a one-line install command.

Open the repository installation guide