Skip to main content
Glama

MCP Calculator Streamable HTTP

by eliezerraj

activate

source .venv/bin/activate

run

uv run mcp dev server.py

run

python3 server.py

test (agent auto)

use the mcp calculator_streamable_http add 1 to 1 and show the result

curl

1 Initialize Session curl -X POST http://localhost:8000/mcp
-H "Content-Type: application/json"
-H "MCP-Protocol-Version: 2025-06-18"
-H "Accept: application/json, text/event-stream"
-d '{ "jsonrpc":"2.0", "id":1, "method":"initialize", "params":{"protocolVersion":"2025-06-18", "capabilities":{"tools":{}}, "clientInfo":{"name":"test-client", "version":"1.0.0"}}}'

1 Initialize Session and get session-id curl -X POST http://localhost:8000/mcp
-H "Content-Type: application/json"
-H "MCP-Protocol-Version: 2025-06-18"
-H "Accept: application/json, text/event-stream"
-d '{ "jsonrpc":"2.0", "id":1, "method":"initialize", "params":{"protocolVersion":"2025-06-18", "capabilities":{"tools":{}}, "clientInfo":{"name":"test-client", "version":"1.0.0"}}}'
-v 2>&1 | grep -i "mcp-session-id" | cut -d' ' -f3

  1. Send Initialized Notification curl -X POST http://localhost:8000/mcp
    -H "Content-Type: application/json"
    -H "MCP-Protocol-Version: 2025-06-18"
    -H "Accept: application/json, text/event-stream"
    -H "Mcp-Session-Id: b7ab76da70b24c04afaf1123bfba5523"
    -d '{"jsonrpc":"2.0","method":"notifications/initialized"}'
  2. List Tools curl -X POST http://localhost:8000/mcp
    -H "Content-Type: application/json"
    -H "MCP-Protocol-Version: 2025-06-18"
    -H "Accept: application/json, text/event-stream"
    -H "Mcp-Session-Id: b7ab76da70b24c04afaf1123bfba5523"
    -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
  3. Call Add Tool curl -X POST http://localhost:8000/mcp
    -H "Content-Type: application/json"
    -H "MCP-Protocol-Version: 2025-06-18"
    -H "Accept: application/json, text/event-stream"
    -H "Mcp-Session-Id: b7ab76da70b24c04afaf1123bfba5523"
    -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"add","arguments":{"a":1,"b":1}}}'
-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Provides basic arithmetic calculation tools through an HTTP-accessible MCP server. Supports mathematical operations like addition with streamable responses for integration with MCP clients.

  1. run
    1. run
      1. test (agent auto)
        1. curl

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A mathematical computation service that enables users to perform symbolic calculations including basic arithmetic, algebra, calculus, equation solving, and matrix operations through the MCP protocol.
            Last updated -
            1
            4
            MIT License
          • -
            security
            F
            license
            -
            quality
            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).
            Last updated -
          • -
            security
            F
            license
            -
            quality
            A server that provides basic mathematical operations (addition, subtraction, multiplication, division, power, square root) through MCP tools for use with AI assistants like Claude.
            Last updated -
          • -
            security
            F
            license
            -
            quality
            A simple calculator MCP server that provides basic arithmetic functions (add and subtract) through HTTP transport, designed to be cloud-ready and easily deployable.
            Last updated -
            • Linux
            • Apple

          View all related MCP servers

          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/eliezerraj/mcp-calculator-streamable-http'

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