Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

@mcp-decorator/plugin-math

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcp-decorator/plugin-math

Math operations plugin for MCP Decorator Framework

latest
Source
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

@mcp-decorator/plugin-math

Math operations plugin for MCP Decorator Framework.

Installation

npm install @mcp-decorator/plugin-math
# or
pnpm add @mcp-decorator/plugin-math
# or
bun add @mcp-decorator/plugin-math

Usage

import { createStdioServer } from "@mcp-decorator/core";
import { MathPlugin } from "@mcp-decorator/plugin-math";

createStdioServer({
  name: "my-server",
  plugins: [new MathPlugin()],
});

Available Commands

math.add

Add two numbers.

Parameters:

  • a (number): First number
  • b (number): Second number

Example:

{
  "type": "math.add",
  "params": { "a": 5, "b": 3 }
}

Response:

5 + 3 = 8

math.subtract

Subtract two numbers.

Parameters:

  • a (number): First number
  • b (number): Second number

Example:

{
  "type": "math.subtract",
  "params": { "a": 10, "b": 4 }
}

Response:

10 - 4 = 6

math.multiply

Multiply two numbers.

Parameters:

  • a (number): First number
  • b (number): Second number

Example:

{
  "type": "math.multiply",
  "params": { "a": 6, "b": 7 }
}

Response:

6 × 7 = 42

math.divide

Divide two numbers.

Parameters:

  • a (number): Numerator
  • b (number): Denominator

Example:

{
  "type": "math.divide",
  "params": { "a": 20, "b": 4 }
}

Response:

20 ÷ 4 = 5

Error Handling:

Division by zero returns an error:

{
  "type": "math.divide",
  "params": { "a": 10, "b": 0 }
}

Response:

Error: Division by zero is not allowed

License

MIT

Keywords

mcp

FAQs

Package last updated on 05 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts