mcp-simple-demo

mcp-simple-demo

4

This project is a simple demonstration of the Model Context Protocol (MCP) using a Python server and client, highlighting MCP's capability to allow AI models to use external tools. It features an MCP-compliant server and client examples showcasing the protocol's usage.

Overview

This project demonstrates a basic implementation of the Model Context Protocol (MCP), allowing AI models to access external tools and data sources. Features include:

  • An MCP-compliant server with simple tools
  • A client for interacting with the server
  • Examples of tool calls and responses

Installation

  • Python 3.8+
  • pip

Setup

  1. Clone the repository.
  2. Install required packages using requirements.txt.

Server Usage

Start an MCP server on default port 8000 with tools like hello_world and add.

Client Usage

Interact with the MCP server in interactive or command-line modes.

Available Tools

hello_world

Returns a greeting message.

add

Adds two integers.

Protocol Details

MCP uses Server-Sent Events (SSE) for connection, involving a session ID for tool calls.

Contributions

Contributions are welcome via issues or pull requests on GitHub.