chuk-mcp-math-server
Verified Safeby chrishayuk
Overview
Provides a highly configurable, high-performance server for a wide range of mathematical computations via the Mathematical Computation Protocol (MCP).
Installation
uvx chuk-mcp-math-serverEnvironment Variables
- MCP_SERVER_TRANSPORT
- MCP_SERVER_PORT
- MCP_SERVER_HOST
- MCP_SERVER_LOG_LEVEL
- MCP_SERVER_CACHE_STRATEGY
- MCP_SERVER_CACHE_SIZE
- MCP_SERVER_NAME
- MCP_MATH_TRANSPORT
- MCP_MATH_PORT
- MCP_MATH_HOST
- MCP_MATH_CACHE_STRATEGY
- MCP_MATH_CACHE_SIZE
- MCP_MATH_LOG_LEVEL
- MCP_MATH_TIMEOUT
- MCP_MATH_MAX_CONCURRENT
- MCP_MATH_ENABLE_TOOLS
- MCP_MATH_ENABLE_PROMPTS
- MCP_MATH_ENABLE_RESOURCES
- MCP_MATH_FUNCTION_ALLOWLIST
- MCP_MATH_FUNCTION_DENYLIST
- MCP_MATH_DOMAIN_ALLOWLIST
- MCP_MATH_DOMAIN_DENYLIST
- MCP_MATH_CATEGORY_ALLOWLIST
- MCP_MATH_CATEGORY_DENYLIST
- PYTHONDONTWRITEBYTECODE
- PYTHONUNBUFFERED
Security Notes
The server's core functionality involves exposing a controlled set of mathematical functions from the `chuk-mcp-math` library, which limits the risk of arbitrary code execution. Configuration is managed via Pydantic models, offering type-safe validation. The default host binding of '0.0.0.0' is noted with `nosec B104` (Bandit warning) but is a common and often necessary default for containerized services; it's explicitly documented. Default `enable_cors: true` is permissive but typical for an API. `rate_limit_enabled` defaults to `false`, which could be a concern in production without external rate limiting. There is no usage of `eval()` or similar dangerous functions on arbitrary user input. The dynamic tool registration is based on trusted function references, not arbitrary strings. Overall, the design prioritizes safety by filtering and exposing well-defined operations.
Similar Servers
mcp-server-test
This server provides a set of predefined functions (like mathematical calculations and greetings) exposed via the Model Context Protocol (MCP) over standard I/O for integration with AI agents like Claude Desktop.
MCP_Calculate_Server
Provides a Model Context Protocol (MCP) server with calculator tools, documentation access, and prompt templating for integration with AI clients like Claude Desktop.
claude-mcp-servers
Provides Model Context Protocol (MCP) servers for Claude Desktop, enabling secure file system access and advanced mathematical calculations.
mcp-server-project
An AI agent-based Micro-Agent Protocol (MCP) server designed for generating various types of reports, including technical solutions, experimental reports, review reports, analysis reports, and patents, utilizing a 'DeepResearch' mode.