sofianhw/mcp-client-server-python
If you are the rightful owner of mcp-client-server-python and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This project demonstrates a simple client-server Model Context Protocol (MCP) implementation using Python.
The Model Context Protocol (MCP) is an open protocol introduced by Anthropic to enable large language models (LLMs) to interact with external tools, APIs, and resources in a standardized, extensible way. It facilitates secure, multi-channel communication between AI models and external systems, supporting advanced agentic workflows and tool use. This project showcases a simple client-server setup where the MCP server exposes tools and resources via Server-Sent Events (SSE), and the MCP client connects to the server to list available tools and interact using OpenAI's chat completions. The integration with OpenAI's GPT models allows the client to process user queries and call server tools as needed.
Features
- MCP Server: Exposes tools (e.g., addition) and resources (e.g., greetings) via SSE.
- MCP Client: Connects to the server, lists available tools, and interacts using OpenAI's chat completions.
- OpenAI Integration: Uses OpenAI's GPT models to process user queries and call server tools as needed.