Cal Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cal Servercalculate the area of a circle with radius 5"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cal Server
项目简介
Cal Server 是一个基于 FastMCP 框架构建的简单数学表达式计算服务,使用 Bun 运行时环境。它利用 expr-eval 库解析和计算用户输入的数学表达式,并通过标准输入输出(stdio)与外界交互。该项目旨在提供一个轻量、高效的计算工具,支持基本数学运算和内置常量。
Related MCP server: Math MCP Server
功能
表达式计算:支持用户输入数学表达式并返回计算结果。
内置常量:
E:Bun 环境中的Math.E。PI:Bun 环境中的Math.PI。true:逻辑真值。false:逻辑假值。
工具名称:
cal。参数:接受一个字符串类型的数学表达式(
exp)。
依赖
fastmcp:用于构建 MCP 服务。expr-eval:用于解析和计算数学表达式。zod:用于参数验证。
前置条件
确保已安装 Bun 运行时(推荐最新版本)。
安装
Installing via Smithery
To install cal-mcp for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @pwh-pwh/cal-mcp --client claudemcp客户端配置
"cal-mcp": {
"name": "计算",
"description": "",
"isActive": true,
"command": "bunx",
"args": [
"cal-mcp"
]
}Manual Installation
克隆项目仓库:
git clone <仓库地址>进入项目目录并安装依赖:
bun install
使用方法
启动服务:
bun run index.ts服务将通过标准输入输出(stdio)运行。
输入数学表达式:
示例输入:
2 + 3 * PI输出:计算结果(字符串形式)。
支持的表达式示例:
基本运算:
2 + 2→4使用常量:
PI * 2→6.283185307179586复杂表达式:
E ^ 2 + 1→8.38905609893065
注意事项
输入的表达式必须是有效的数学表达式,否则可能抛出错误。
服务当前仅支持通过
stdio交互。项目使用 Bun 运行时,确保命令与 Bun 兼容。
Hosted deployment
A hosted deployment is available on Fronteir AI.
Available Tools
4 toolsbatchGetDateByTimestampC
Batch convert the provided list of timestamps to date format, used for processing multiple timestamps
| Name | Required | Description | Default |
|---|---|---|---|
| tsList | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool performs a conversion, implying a read-only operation, but doesn't specify any behavioral traits such as error handling, rate limits, output format, or whether it's idempotent. The description lacks details on what happens with invalid timestamps or the structure of the returned dates, leaving significant gaps in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded with the core action ('batch convert') and avoids redundancy. Every part of the sentence earns its place by conveying essential information, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (batch processing with 1 parameter), no annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't explain the output format, error conditions, or how the conversion works (e.g., timezone handling). For a tool that processes multiple timestamps, more context is needed to ensure proper usage, making it inadequate for the given context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 1 parameter with 0% description coverage, so the schema provides no semantic information. The description adds some value by explaining that 'tsList' is a 'list of timestamps' for 'batch convert,' but it doesn't specify the timestamp format (e.g., Unix time in seconds/milliseconds), units, or any constraints. This provides basic semantics but doesn't fully compensate for the low schema coverage, meeting the baseline for minimal parameter insight.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('batch convert') and resource ('list of timestamps to date format'), making the purpose understandable. It distinguishes from sibling 'getDateByTimestamp' by specifying batch processing, though it doesn't explicitly mention all siblings. The description is specific enough to understand what the tool does without being tautological.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides minimal guidance by stating it's 'used for processing multiple timestamps,' which implies when to use it versus single-timestamp alternatives. However, it doesn't explicitly name when to use this tool versus siblings like 'getDateByTimestamp' or 'cal,' nor does it mention any prerequisites or exclusions. The guidance is limited to an implied context without clear alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
calC
Use the expr-eval library to evaluate the input mathematical expression and return the result.
Constant Description E The value of Math.E from your JavaScript runtime PI The value of Math.PI from your JavaScript runtime true Logical true value false Logical false value
| Name | Required | Description | Default |
|---|---|---|---|
| exp | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the expr-eval library and lists available constants (E, PI, true, false), but doesn't describe important behavioral traits like error handling, supported operators, performance characteristics, or whether it's a read-only operation. For a tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is reasonably concise with two sentences, but the constant table feels appended rather than integrated. The first sentence clearly states the purpose, but the table of constants could be more efficiently integrated. The structure is adequate but could be improved with better flow between the main description and the constant details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a mathematical evaluation tool with no annotations, no output schema, and only 0% schema description coverage, the description is incomplete. It doesn't explain what types of expressions are supported, error conditions, return format, or limitations. For a tool that could have significant behavioral complexity, this description leaves too many questions unanswered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds some meaning beyond the input schema, which has 0% description coverage. It clarifies that the 'exp' parameter should be a 'mathematical expression' and mentions available constants. However, it doesn't fully compensate for the schema coverage gap by explaining expression syntax, operator support, or validation rules. The baseline is 3 since the description provides some parameter context but not comprehensive documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'evaluate the input mathematical expression and return the result' using the expr-eval library. It specifies the verb (evaluate), resource (mathematical expression), and mechanism (expr-eval library). However, it doesn't explicitly differentiate from sibling tools like batchGetDateByTimestamp, which handle date calculations rather than general math expressions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools or suggest scenarios where this mathematical evaluator would be preferred over date-related tools. The only implicit usage context is for mathematical expressions, but no explicit when/when-not or alternative recommendations are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getDateByTimestampC
Convert the provided timestamp to date format
| Name | Required | Description | Default |
|---|---|---|---|
| ts | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool converts a timestamp to date format, implying a read-only transformation, but doesn't specify details like timezone handling, output format (e.g., ISO 8601, human-readable), error behavior for invalid inputs, or performance characteristics. This leaves significant gaps in understanding how the tool behaves beyond its basic function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise—a single sentence that directly states the tool's function without unnecessary words. It's front-loaded with the core purpose, making it efficient and easy to parse. Every part of the sentence earns its place by conveying essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (1 parameter, no annotations, no output schema), the description is incomplete. It doesn't explain the output (e.g., what date format is returned), error handling, or how it differs from siblings. For a conversion tool, details like timezone or format are critical for effective use, making this description inadequate despite the low complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 1 parameter with 0% description coverage, meaning the parameter 'ts' is undocumented in the schema. The description adds minimal semantics by implying 'ts' is a timestamp to convert, but doesn't specify units (e.g., seconds, milliseconds), range, or format expectations. This insufficiently compensates for the low schema coverage, leaving the parameter poorly defined.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: converting a timestamp to date format. It specifies the verb 'convert' and the resource 'timestamp', making it easy to understand what the tool does. However, it doesn't differentiate from sibling tools like 'batchGetDateByTimestamp' or 'cal', which might offer similar or related functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'batchGetDateByTimestamp' for batch processing, 'cal' for calendar-related operations, or 'getNow' for current time. There's no context on prerequisites, limitations, or appropriate scenarios for use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getNowB
Get the current timestamp
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. 'Get the current timestamp' implies a read-only operation that returns time data, but it doesn't specify format (e.g., ISO 8601, Unix timestamp), timezone behavior, or whether it's real-time vs. cached. For a tool with zero annotation coverage, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description 'Get the current timestamp' is a single, efficient sentence that front-loads the core functionality with zero wasted words. Every word earns its place by clearly conveying what the tool does without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no annotations, no output schema), the description is minimally adequate but incomplete. It doesn't explain what format the timestamp is returned in, which is critical context for a time-related tool. Without annotations or output schema, the description should provide more behavioral detail to be truly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the lack of inputs. The description doesn't need to add parameter information, and it correctly implies no parameters are required by not mentioning any. This meets the baseline expectation for parameterless tools.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get the current timestamp' clearly states the verb 'Get' and the resource 'current timestamp', making the purpose immediately understandable. It distinguishes from siblings like 'getDateByTimestamp' which requires input parameters. However, it doesn't explicitly differentiate from 'cal' or 'batchGetDateByTimestamp', keeping it from a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'getDateByTimestamp' or 'batchGetDateByTimestamp'. It doesn't mention that this tool is for getting the current time without input, while siblings require timestamps as input. No explicit when/when-not or alternative recommendations are included.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
- First observed
batchGetDateByTimestamp - First observed
cal - First observed
getDateByTimestamp - First observed
getNow
TDQS
Scored across 4 tools
The tools have some overlap but descriptions help clarify distinctions. 'batchGetDateByTimestamp' and 'getDateByTimestamp' both convert timestamps to dates, but the batch version handles multiple inputs, while 'getNow' provides a timestamp and 'cal' evaluates mathematical expressions, which are distinct from date operations. However, the two date conversion tools could potentially be confused for single inputs.
The naming is inconsistent with mixed conventions. 'batchGetDateByTimestamp' and 'getDateByTimestamp' use camelCase, while 'getNow' uses a different verb style and 'cal' is an abbreviation that doesn't follow the same pattern. This lack of a uniform naming scheme makes the set less predictable and harder to parse.
With 4 tools, the count is well-scoped and appropriate for a calendar/utility server. Each tool serves a distinct purpose (date conversion, timestamp retrieval, and calculation), and there are no unnecessary redundancies, making the set manageable and focused.
The tool surface covers basic date and calculation operations but has notable gaps. It provides timestamp-to-date conversion and current timestamp retrieval, but lacks operations for date manipulation (e.g., adding days), formatting, or timezone handling. The 'cal' tool adds mathematical evaluation, but overall, the set is incomplete for broader calendar or time-related tasks.
Maintenance
Related MCP Connectors
Evaluate, simplify, and differentiate mathematical expressions.
Safe scientific calculator MCP for numeric expressions
Evaluates Reverse Polish Notation (postfix) expressions: arithmetic, trig, logs, bitwise ops.
Math.js MCP — wraps the mathjs.org API (free, no auth)
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides basic arithmetic operations and advanced mathematical functions through the Model Context Protocol (MCP), with features like calculation history tracking and expression evaluation.1-
- FlicenseAqualityDmaintenanceEnables mathematical calculations through basic arithmetic operations including addition, subtraction, multiplication, division, exponentiation, and logarithms. Provides a simple interface for AI agents to perform mathematical computations.63-
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to perform accurate mathematical calculations by evaluating expressions using mathjs. Supports basic arithmetic, functions, constants, and complex mathematical operations through natural language requests.-
- AlicenseNot gradedqualityCmaintenanceA unified mathematical calculator that automatically detects expression types and performs basic arithmetic, statistical calculations, equation solving, and batch computations with 20+ built-in mathematical functions.MIT