{
  "markdown": "# Calculator MCP Server\n\nA simple Model Context Protocol (MCP) server that provides basic calculator functionality through MCP tools.\n\n## Features\n\nThis MCP server provides the following calculator tools:\n\n- **add**: Add two numbers together\n- **subtract**: Subtract second number from first number  \n- **multiply**: Multiply two numbers together\n- **divide**: Divide first number by second number (with zero-division protection)\n- **power**: Raise first number to the power of second number\n- **sqrt**: Calculate square root of a number (with negative number protection)\n\n## Installation\n\n1. Install dependencies:\n```bash\nnpm install\n```\n\n2. Build the TypeScript code:\n```bash\nnpm run build\n```\n\n## Usage\n\n### Running the Server\n\nStart the MCP server:\n```bash\nnpm start\n```\n\nOr run in development mode:\n```bash\nnpm run dev\n```\n\n### MCP Client Configuration\n\nTo use this calculator MCP server with an MCP client (like Claude Desktop), add it to your MCP configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"calculator\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/calculator-mcp/dist/index.js\"],\n      \"env\": {}\n    }\n  }\n}\n```\n\n### Available Tools\n\n#### add\nAdds two numbers together.\n- Parameters: `a` (number), `b` (number)\n- Example: `add(5, 3)` returns `5 + 3 = 8`\n\n#### subtract\nSubtracts the second number from the first.\n- Parameters: `a` (number), `b` (number)\n- Example: `subtract(10, 4)` returns `10 - 4 = 6`\n\n#### multiply\nMultiplies two numbers together.\n- Parameters: `a` (number), `b` (number)\n- Example: `multiply(6, 7)` returns `6 × 7 = 42`\n\n#### divide\nDivides the first number by the second.\n- Parameters: `a` (number), `b` (number)\n- Example: `divide(15, 3)` returns `15 ÷ 3 = 5`\n- Error handling: Returns error for division by zero\n\n#### power\nRaises the base to the power of the exponent.\n- Parameters: `base` (number), `exponent` (number)\n- Example: `power(2, 8)` returns `2^8 = 256`\n\n#### sqrt\nCalculates the square root of a number.\n- Parameters: `number` (number)\n- Example: `sqrt(16)` returns `√16 = 4`\n- Error handling: Returns error for negative numbers\n\n## Development\n\n### Project Structure\n\n```\ncalculator-mcp/\n├── src/\n│   └── index.ts          # Main MCP server implementation\n├── dist/                 # Compiled JavaScript output\n├── package.json          # Dependencies and scripts\n├── tsconfig.json         # TypeScript configuration\n└── README.md            # This file\n```\n\n### Building\n\n```bash\nnpm run build\n```\n\n### Development Mode\n\n```bash\nnpm run dev\n```\n\n## Error Handling\n\nThe calculator includes proper error handling for:\n- Division by zero\n- Square root of negative numbers\n- Invalid tool names\n- General execution errors\n\nAll errors are returned with appropriate error messages and the `isError` flag set to true.\n\n## License\n\nMIT\n",
  "bytes": 2787,
  "sha": "2d582fa71662c49a6d8d1772c848e12843adefee2c4f817b0f62d107b4a0ae1b",
  "repo_slug": "tech-sushant/calculator-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_tech_sushant_calculator_mcp_f6075bb5/readme"
}