Skip to main content

a mcp calculator

Project description

计算器 MCP

基于 Model Context Protocol (MCP) 的数值计算器,提供了简单的加减乘除、幂运算、平方根运算和整数阶乘运算。

Tools

{
  "tools": [
    {
      "name": "add",
      "description": "执行浮点数加法运算",
      "inputSchema": {
        "type": "object",
        "properties": {
          "a": {
            "title": "A",
            "type": "number"
          },
          "b": {
            "title": "B",
            "type": "number"
          }
        },
        "required": [
          "a",
          "b"
        ],
        "title": "addArguments"
      }
    },
    {
      "name": "subtract",
      "description": "执行浮点数减法运算",
      "inputSchema": {
        "type": "object",
        "properties": {
          "a": {
            "title": "A",
            "type": "number"
          },
          "b": {
            "title": "B",
            "type": "number"
          }
        },
        "required": [
          "a",
          "b"
        ],
        "title": "subtractArguments"
      }
    },
    {
      "name": "multiply",
      "description": "执行浮点数乘法运算",
      "inputSchema": {
        "type": "object",
        "properties": {
          "a": {
            "title": "A",
            "type": "number"
          },
          "b": {
            "title": "B",
            "type": "number"
          }
        },
        "required": [
          "a",
          "b"
        ],
        "title": "multiplyArguments"
      }
    },
    {
      "name": "divide",
      "description": "执行浮点数除法运算\n    Args:\n        b: 除数(必须非零)\n    ",
      "inputSchema": {
        "type": "object",
        "properties": {
          "a": {
            "title": "A",
            "type": "number"
          },
          "b": {
            "title": "B",
            "type": "number"
          }
        },
        "required": [
          "a",
          "b"
        ],
        "title": "divideArguments"
      }
    },
    {
      "name": "power",
      "description": "计算幂运算",
      "inputSchema": {
        "type": "object",
        "properties": {
          "base": {
            "title": "Base",
            "type": "number"
          },
          "exponent": {
            "title": "Exponent",
            "type": "number"
          }
        },
        "required": [
          "base",
          "exponent"
        ],
        "title": "powerArguments"
      }
    },
    {
      "name": "sqrt",
      "description": "计算平方根",
      "inputSchema": {
        "type": "object",
        "properties": {
          "number": {
            "title": "Number",
            "type": "number"
          }
        },
        "required": [
          "number"
        ],
        "title": "sqrtArguments"
      }
    },
    {
      "name": "factorial",
      "description": "计算整数阶乘",
      "inputSchema": {
        "type": "object",
        "properties": {
          "n": {
            "title": "N",
            "type": "integer"
          }
        },
        "required": [
          "n"
        ],
        "title": "factorialArguments"
      }
    }
  ]
}

MCP 服务器配置

{
    "mcpServers": {
        "calculator": {
        "command": "uv",
        "args": [
            "run", "calculator.py"
            ]
        }
    }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_calculator_kel-1.0.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file mcp_calculator_kel-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_calculator_kel-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 366a29d107c322428f94c671a6b2f6313f7dc0af8a93b79422d3fd433cd9ba0d
MD5 a09489d75dbabed8986fca102b3b234e
BLAKE2b-256 5eb8d2dd20528c3a1907934e2177f8c894a65b714185270bc86b5517966ce43b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page