mcp_server_and_client

iamSShan/mcp_server_and_client

3.1

If you are the rightful owner of mcp_server_and_client 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 provides a minimal working example of the Model Context Protocol (MCP), demonstrating how to set up a FastMCP server with basic tools and interact with it using an MCP client.

The MCP Server and Client project is designed to offer a straightforward example of how the Model Context Protocol can be implemented to facilitate communication between agents and tools. By setting up a FastMCP server, users can define various agent tools such as text summarization and code execution. The client, using the official MCP SDK, connects to the server to utilize these tools. This project serves as a reference for developers looking to understand and implement MCP-based communication in their applications. The setup involves initializing the project, installing necessary dependencies, and running both server and client scripts to demonstrate the interaction.

Features

  • Minimal working example of MCP setup
  • FastMCP server implementation
  • Client interaction using MCP SDK
  • Agent tools like text summarization and code execution
  • Reference for MCP-based communication

Usages

usage with local stdio

python server.py

usage with local uv

uv run mcp dev server.py

usage with client

python client.py