Skip to content

feat(mcp_modules): add safe calculator module (no eval) - #24

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
Larslllllll:feature/calculator-module
Aug 21, 2026
Merged

feat(mcp_modules): add safe calculator module (no eval)#24
ralyodio merged 1 commit into
profullstack:masterfrom
Larslllllll:feature/calculator-module

Conversation

@Larslllllll

Copy link
Copy Markdown
Contributor

Adds a new community MCP module calculator for issue #2 ('add more community packages').

  • Secure recursive-descent expression evaluator (no eval/Function), safe against injection.
  • Full operator set: + - * / % ^ with correct precedence and right-associative ^ (2^3^2 = 512). Unary +/- handled via 0-prefix (so -2^2 == -4).
  • Registered in server.js under /calculator/*; controller/service; docs (README + api.md); examples; built-in self-tests.

Fixes #2

@ralyodio
ralyodio merged commit fde2497 into profullstack:master Aug 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add more community packages

2 participants