MCP Client logo

MCP Client

by dev-mahfuj80

This project demonstrates a simple client-server implementation using the Model Context Protocol (MCP). It showcases how to connect large language models with tools and data in a standardized way.

View on GitHub

Last updated: N/A

What is MCP Client?

This is an example client-server implementation using the Model Context Protocol (MCP). It demonstrates how to create an MCP server with custom tools and connect to it using an MCP client, enabling interaction between large language models and external resources.

How to use MCP Client?

To use this client, you need Python 3.9+ and uv. Install the dependencies using uv install -e . and then run the client script uv run src/client/mcp_client.py. The client connects to the server, lists available tools, and calls the BMI calculator and weather tool with sample data.

Key features of MCP Client

  • MCP Implementation

  • Custom Tool Integration

  • Client-Server Communication

  • BMI Calculator Tool

  • Weather Data Retrieval Tool

Use cases of MCP Client

  • Connecting LLMs to external APIs

  • Creating custom tools for LLMs

  • Standardized interaction with LLMs

  • Demonstrating MCP usage

  • Testing LLM tool interactions

FAQ from MCP Client

What is MCP?

MCP stands for Model Context Protocol, a standardized way to connect large language models with tools and data.

What are the prerequisites for running this example?

You need Python 3.9+ and uv (Python package manager).

How do I install the dependencies?

Run uv install -e . in the project directory.

How do I start the client?

Run uv run src/client/mcp_client.py to start the client, which will automatically start the server.

What tools are available on the server?

The server exposes two tools: calculate_bmi and fetch_weather.