Skip to main content
Glama

Calculator MCP Server

by QuantGeekDev
import { MCPTool } from "mcp-framework"; import { z } from "zod"; interface AddInput { a: string; b: string } class AddTool extends MCPTool<AddInput> { name = "add_tool"; description = "An addition tool that sums numbers A and B"; schema = { a: { type: z.string(), description: "First number to sum", }, b: { type: z.string(), description: "Second number to sum" } }; async execute(input: AddInput) { const a = Number.parseInt(input.a) const b = Number.parseInt(input.b) const sum = a + b return `The sum is: ${sum}`; } } export default AddTool;

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/QuantGeekDev/mcp-add-sse'

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