A Rust port of calc (Landon Curt Noll's arbitrary-precision calculator)
@carlomagnoglobal
关于 A Rust port of calc (Landon Curt Noll's arbitrary-precision calculator)
A Rust port of calc (Landon Curt Noll's arbitrary-precision calculator) that works as:
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"toRustCalcMCP": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/carlomagnoglobal/torustcalcmcp:latest"
]
}
}
}工具
3evaluate an expression
get/set session precision & display
list builtins
概览
What is toRustCalcMCP?
A Rust port of Landon Curt Noll’s arbitrary‑precision calculator (calc) that provides three interfaces: a command‑line calculator (rcalc), a web REPL, and an MCP server for LLM/agent integration. It uses exact rational arithmetic (num‑rational over num‑bigint) so computations like 1/3 * 3 yield exactly 1.
How to use toRustCalcMCP?
Build with cargo build --release. Use the CLI via rcalc 'expression', the web REPL with rcalc-web (served on localhost:8888), or the MCP server with toRustCalcMCP --mcp. For MCP, perform the initialize handshake then call tools like calc_eval, calc_config, or calc_functions. A detailed MCP tool schema is provided in the repository.
Key features of toRustCalcMCP
- 351 builtins (100%+ coverage of calc’s ~350 functions)
- Exact rational arithmetic – no floating‑point approximations
- Three interfaces: CLI, web REPL, and MCP server
- Arbitrary‑precision transcendentals via Taylor series and Newton’s method
- User‑defined functions, control flow (
if/else,while,for), and lists - Session‑configurable precision and display mode
Use cases of toRustCalcMCP
- Perform arbitrary‑precision arithmetic from the command line
- Explore and test calc functions interactively in a browser
- Integrate exact‑rational computation into LLM agents via MCP tools
- Replace the original C
calcwith a portable Rust‑based version
FAQ from toRustCalcMCP
What precision does toRustCalcMCP use?
Numbers are exact rationals. Irrational results are approximated to within a session epsilon (default 1e-20). Transcendentals like sin, cos, and exp are computed via Taylor series until the term is smaller than epsilon.
How many builtin functions are implemented?
351 builtins are implemented, covering 100% of calc’s ~350 functions. Core categories (arithmetic, number theory, trigonometry, transcendental, bitwise, lists, strings, etc.) are fully or partially implemented; about 100 exotic/specialized functions (e.g., rare trig variants, file I/O, cryptography) are not yet added.
What transport does the MCP server use?
The MCP server uses JSON‑RPC 2.0 over stdio. Clients must perform initialize, then tools/list, and then tools/call with the appropriate arguments.
Is toRustCalcMCP compatible with the original calc language?
Yes. It supports the same expression syntax, operators, variables, user‑
其他 分类下的更多 MCP 服务器
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
ghidraMCP
LaurieWiredMCP Server for Ghidra

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
🪟 Windows-MCP
CursorTouchMCP Server for Computer Use in Windows
Servers
modelcontextprotocolModel Context Protocol Servers
评论