Skip to main content
Glama

rpn-mcp

MCP server that exposes an RPN calculator

PyPI Python Ruff

Install

pip install rpn-mcp

Usage

rpn-mcp

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/dclavijo/rpn-mcp.git
cd rpn-mcp
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.dclavijo/rpn-mcp

-
security - not tested
A
license - permissive license
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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/daedalus/mcp-rpn'

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