Skip to main content
Glama
Learn_MCP Math Server

Learn_MCP Math Server

Project Setup Guide

This guide will help you set up and run the Learn_MCP project, which demonstrates using a Model Context Protocol (MCP) math server with LangChain.

Prerequisites

  • Python 3.8 or higher (recommended: use a virtual environment)

  • uv (a fast Python package manager)

  • A valid GROQ API key (for ChatGroq)

Related MCP server: MCP Calculator Server

1. Clone the Repository

git clone <your-repo-url>
cd mathServer-FastMCP
python -m venv .venv
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate

3. Install Dependencies with uv

uv pip install -r requirements.txt

Or, to use the lockfile (if present):

uv pip sync uv.lock

4. Set Up Environment Variables

Create a .env file in the project root with your GROQ API key:

GROQ_API_KEY=your_groq_api_key_here

5. Run the Math Server

The math server will be started automatically by the client script as a subprocess (mathserver.py). You do not need to start it manually.

6. Run the Client

uv pip run python client.py

Or simply:

python client.py

7. Troubleshooting

  • If you see ImportError: langchain_mcp_adapters.fastapi could not be resolved, ensure the package is installed or available in your environment.

  • If you get errors about missing modules, check your requirements.txt and install any missing dependencies.

  • Make sure your .env file is present and contains a valid GROQ_API_KEY.

8. Project Structure

  • client.py — Main client that connects to the math MCP server

  • mathserver.py — Math MCP server (started by the client)

  • requirements.txt — Python dependencies

  • .env — Environment variables (not committed to version control)


Feel free to update this README with additional details as your project evolves.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      A Model Context Protocol server that provides basic calculator functionality for LLMs, enabling them to perform mathematical operations like addition, subtraction, multiplication, division, modulo, and square root.
      6
      235 npm
      15
      MIT
    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      A calculator server that exposes mathematical functions as tools (add, subtract, multiply, divide, square, power, square root), enabling language models to perform calculations through Model Context Protocol (MCP).
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A minimal, production-ready MCP server with a simple addition calculator tool that demonstrates integration with the Model Context Protocol.
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides basic mathematical operations (addition, subtraction, multiplication, division) through a Model Context Protocol server. Enables MCP-compatible clients like chatbots to perform calculations by sending structured math requests.
      -