Skip to main content
Glama

FastMCP Tools Calculator

1. Virtual env setup & install pre-requisites

echo "Create a virtual environment python -m venv .venv echo "Active teh virtual environemnt .venv/Scripts/activate.bat echo "Install all pre-requisites/packages" pip install -r requirements.txt echo "Optional - upgrade pip" python.exe -m pip install --upgrade pip

1.1 Explore & Test -FastMCP - Stdio ONLY

echo "Required package is fastmcp" echo "pip install fastmcp" echo "Run mcp server" python fastmcp_calculator.py echo "In a new terminal; inspect mcp npx @modelcontextprotocol/inspector python fastmcp_calculator.py echo "Explore mcp inspector; connect & test resources - tools."

1.2 Explore & Test -FastAPI-MCP

echo "Required packages are fastapi, fastapi-mcp & unicorm (server)" echo "pip install fastapi fastapi-mcp uvicorn[standard]" echo "Run mcp server" python fastapi_mcp_calculator.py echo "In a new terminal; inspect mcp npx @modelcontextprotocol/inspector python fastapi_mcp_calculator.py echo "Explore mcp inspector; connect & test resources - tools."

Generfate mcp-json config.

fastmcp install mcp-json --server-spec calculator_http.py --copy
-
security - not tested
F
license - not found
-
quality - not tested

A demonstration MCP server that provides calculator functionality through both stdio and FastAPI implementations. Enables users to perform mathematical calculations via MCP tools using the FastMCP framework.

  1. 1.1 Explore & Test -FastMCP - Stdio ONLY
    1. 1.2 Explore & Test -FastAPI-MCP
      1. Generfate mcp-json config.

        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/sriharsha-inthub/fastmcp-tools'

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