Skip to main content
Glama
mburatti

Stateless Math MCP Server

by mburatti

MCP Sample Application (Stateless Architecture)

A Model Context Protocol (MCP) sample project implemented in Python using FastMCP and mcp.client. This project demonstrates a stateless MCP server exposing mathematical tools over stdio transport along with an asynchronous client.


Features

  • Stateless MCP Server (server.py): Uses standard stdio transport without maintaining session states.

  • Asynchronous Client (client.py): Connects to the MCP server, discovers available tools dynamically, and executes tool calls.


Related MCP server: mcp-poc

Setup & Installation

Prerequisites

  • Python 3.10+ (Python 3.14 supported)

  • Virtual Environment (.venv)

1. Create and Activate Virtual Environment

python3 -m venv .venv
source .venv/bin/activate

2. Install Dependencies

pip install -r requirements.txt

Running the Application

Option A: Using the Runner Script

Execute the provided bash script to automatically use the environment's Python interpreter:

chmod +x run_sample.sh
./run_sample.sh

Option B: Running Manually

Activate your virtual environment and run the client:

python3 client.py

Example Output

When running client.py or ./run_sample.sh, the client will:

  1. Start the MCP server via stdio.

  2. Discover and print all available registered tools.

  3. Invoke the soma tool with arguments a=15 and b=27.

Starting MCP Server (Stateless Mode 2026-07-28 Spec)...
Connected to MCP Server (Stateless Mode).

--- Discovered Tools (Stateless) ---
{
  "name": "soma",
  "description": "Soma dois números fornecidos pelo usuário statelessly.",
  ...
}
------------------------------------

Calling tool: soma(15, 27)...
Result: O resultado de 15.0 + 27.0 é 42.0

Client finished. Stateless server connection closed.
F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    D
    maintenance
    A minimal reference implementation of an MCP server with two basic math tools (add and multiply), designed as a starting point for learning MCP protocol and deploying remote servers to cloud platforms.
    Last updated
    1
  • A
    license
    -
    quality
    C
    maintenance
    A minimal MCP server with four tools (add, greet, text_stats, divide) demonstrating typed parameters, structured outputs, and error handling over stdio transport.
    Last updated
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    A minimal, zero-dependency MCP server that enables defining and running tools over stdio transport, without extra features like HTTP or resources.
    Last updated
    32
    1
    MIT
  • F
    license
    -
    quality
    C
    maintenance
    A minimal MCP server that exposes tools for addition, echoing text, time lookup, and URL fetching, with support for HTTP and stdio transports.
    Last updated

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mburatti/MCP_RFC_20260728'

If you have feedback or need assistance with the MCP directory API, please join our Discord server