mcpField
M
mcp-rpn

mcp-rpn

Local
github.com/daedalusScience & Education0Updated 27w ago

About mcp-rpn

mcp-rpn is an MCP server that provides an RPN calculator for clients that need to evaluate calculator expressions. Its tools support arithmetic, stack commands, and optional stack display.

Key features

  1. 01Evaluate RPN expressions
  2. 02Perform arithmetic and modulo operations
  3. 03Use stack commands such as dup and swap
  4. 04Clear the calculator stack
  5. 05Optionally display the stack

Use cases

  1. 01Evaluate expressions written in RPN
  2. 02Perform chained arithmetic calculations
  3. 03Inspect or modify calculator stack state

MCP support

Exposes an RPN evaluation tool and a separate stack-clearing tool to MCP clients over stdio.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"daedalus-mcp-rpn": {
"command": "uvx",
"args": [
"mcp-rpn"
]
}
}
}
Run commanduvx mcp-rpn

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypimcp-rpn0.1.1

Tools

2

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
expressionstringYesSpace-separated RPN expression (e.g., "3 4 +").
show_stackbooleanNoWhether to return full stack after evaluation (default: False).

Details

From the project README

mcp-rpn

MCP server that exposes an RPN calculator

PyPI Python Ruff

Install

pip install mcp-rpn

Usage

mcp-rpn

The server uses stdio transport for MCP protocol communication.

MCP Tools

evaluate

Evaluate an RPN (Reverse Polish Notation) expression.

{
  "name": "evaluate",
  "arguments": {
    "expression": "3 4 +",
    "show_stack": true
  }
}

Operators:

  • + - Add
  • - - Subtract
  • - - Multiply
  • / - Divide
  • ** - Power
  • % - Modulo

Commands:

  • clear - Clear the stack
  • dup - Duplicate top of stack
  • swap - Swap top two elements

Examples:

  • 3 4 + returns 7
  • 10 5 2 + * 2 - returns 32
  • 3 2 / returns 1.5
clear

Clear the calculator stack.

{
  "name": "clear",
  "arguments": {}
}

Development

git clone https://github.com/daedalus/mcp-rpn.git
cd mcp-rpn
pip install -e ".[test]"

# run tests
pytest

# format
ruff format src/ tests/

# lint
ruff check src/ tests/

# type check
mypy src/

MCP Registry

mcp-name: io.github.daedalus/mcp-rpn

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.