MCP ExplorerExplorer

Mcp Example

@OmgiKikovon 10 months ago
3 MIT
FreeCommunity
AI Systems
MCP_Example demonstrates a calculator using MCP with addition, subtraction, and multiplication.

Overview

What is Mcp Example

MCP_Example is a demonstration project that showcases a calculator using the Model Context Protocol (MCP) for performing basic mathematical operations such as addition, subtraction, and multiplication.

Use cases

Use cases for MCP_Example include classroom demonstrations of arithmetic operations, integration into larger software systems that require calculation capabilities, and personal projects for learning about API interactions.

How to use

To use MCP_Example, clone the repository, install the required dependencies, set up your OpenAI API key in a .env file, and run the client script to interact with the server by entering mathematical expressions in the chat.

Key features

Key features of MCP_Example include a simple interface for mathematical operations, support for addition, subtraction, and multiplication, and interaction with the MCP server via the OpenAI API.

Where to use

MCP_Example can be used in educational settings for teaching basic arithmetic, in software development for testing mathematical functionalities, or in any application requiring simple calculations.

Content

MCP Calculator Example

Демонстрационный проект, показывающий работу с Model Context Protocol (MCP).

Описание

Проект состоит из двух основных компонентов:

  1. MCP сервер (mcp_server.py) - предоставляет математические операции:

    • Сложение (add)
    • Вычитание (subtract)
    • Умножение (multiply)
  2. MCP клиент (mcp_client.py) - взаимодействует с сервером через OpenAI API

Установка

  1. Клонируйте репозиторий:
git clone https://github.com/OmgiKikov/MCP_Example.git
cd MCP_Example
  1. Установите зависимости:
pip install -r requirements.txt
  1. Создайте файл .env и добавьте ваш OpenAI API ключ:
OPENAI_API_KEY=your_api_key_here

Использование

  1. Запустите клиент:
python mcp_client.py
  1. Введите математические выражения в чате, например:
  • “сложи 5 и 3”
  • “вычти из 10 число 4”
  • “умножь 6 на 7”

Требования

  • Python 3.8+
  • OpenAI API ключ
  • Установленные зависимости из requirements.txt

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers