MCP Math Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_MATH_HOST | No | Host to bind to for HTTP transport | 0.0.0.0 |
| MCP_MATH_PORT | No | Port to use for HTTP transport | 8000 |
| MCP_MATH_LOG_LEVEL | No | Logging level (DEBUG, INFO, WARNING, ERROR) | INFO |
| MCP_MATH_TRANSPORT | No | Transport type (http or stdio) | stdio |
| MCP_MATH_CACHE_SIZE | No | Size of the function result cache | 1000 |
| MCP_MATH_ENABLE_CORS | No | Enable CORS for HTTP transport | true |
| MCP_MATH_CACHE_STRATEGY | No | Caching strategy for function results | smart |
| MCP_MATH_DOMAIN_WHITELIST | No | Comma-separated list of allowed function domains | |
| MCP_MATH_FUNCTION_BLACKLIST | No | Comma-separated list of disabled functions | |
| MCP_MATH_COMPUTATION_TIMEOUT | No | Timeout for function computations in seconds | 30.0 |
| MCP_MATH_MAX_CONCURRENT_CALLS | No | Maximum number of concurrent function calls | 10 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| addB | Add two numbers together. Pure arithmetic addition operation. (Domain: arithmetic, Category: core) |
| subtractA | Subtract the second number from the first number. (Domain: arithmetic, Category: core) |
| multiplyC | Multiply two numbers together. (Domain: arithmetic, Category: core) |
| divideC | Divide the first number by the second number. (Domain: arithmetic, Category: core) |
| powerC | Raise a number to a power. Handles integer and fractional exponents. (Domain: arithmetic, Category: core) |
| sqrtC | Calculate the square root of a number. (Domain: arithmetic, Category: core) |
| abs_valueA | Calculate the absolute value of a number. (Domain: arithmetic, Category: core) |
| signA | Determine the sign of a number. Returns 1, -1, or 0. (Domain: arithmetic, Category: core) |
| negateB | Negate a number (return its additive inverse). (Domain: arithmetic, Category: core) |
| round_numberC | Round a number to a specified number of decimal places. (Domain: arithmetic, Category: core) |
| floorA | Return the floor of a number (largest integer less than or equal to x). (Domain: arithmetic, Category: core) |
| ceilA | Return the ceiling of a number (smallest integer greater than or equal to x). (Domain: arithmetic, Category: core) |
| truncateA | Truncate a number towards zero (remove decimal part). (Domain: arithmetic, Category: core) |
| ceiling_multipleA | Round a number up to the nearest multiple of significance. Always rounds away from zero. (Domain: arithmetic, Category: general) |
| floor_multipleA | Round a number down to the nearest multiple of significance. Always rounds toward zero. (Domain: arithmetic, Category: general) |
| mroundC | Round a number to the nearest multiple of significance. Uses standard rounding rules. (Domain: arithmetic, Category: general) |
| moduloA | Calculate the modulo (remainder) of division. Returns a % b. (Domain: arithmetic, Category: core) |
| divmod_operationB | Perform division and return both quotient and remainder. Returns (quotient, remainder). (Domain: arithmetic, Category: core) |
| mod_powerA | Calculate modular exponentiation: (base^exponent) mod modulus. Efficient for large numbers. (Domain: arithmetic, Category: core) |
| quotientA | Return the integer quotient of division without remainder. Equivalent to a // b. (Domain: arithmetic, Category: general) |
| remainderC | Calculate floating-point remainder of division (IEEE remainder operation). (Domain: arithmetic, Category: core) |
| fmodB | Calculate floating-point modulo operation. Similar to % but for floats. (Domain: arithmetic, Category: core) |
| equalA | Check if two numbers are exactly equal. For floating-point numbers, consider using approximately_equal instead. (Domain: arithmetic, Category: comparison) |
| not_equalB | Check if two numbers are not equal. (Domain: arithmetic, Category: comparison) |
| less_thanB | Check if the first number is less than the second number. (Domain: arithmetic, Category: comparison) |
| less_than_or_equalB | Check if the first number is less than or equal to the second number. (Domain: arithmetic, Category: comparison) |
| greater_thanB | Check if the first number is greater than the second number. (Domain: arithmetic, Category: comparison) |
| greater_than_or_equalA | Check if the first number is greater than or equal to the second number. (Domain: arithmetic, Category: comparison) |
| in_rangeB | Check if a number is within a specified range (inclusive by default). (Domain: arithmetic, Category: comparison) |
| betweenA | Check if a value is between two bounds (exclusive by default, like mathematical interval notation). (Domain: arithmetic, Category: comparison) |
| minimumB | Find the smaller of two numbers. (Domain: arithmetic, Category: comparison) |
| maximumB | Find the larger of two numbers. (Domain: arithmetic, Category: comparison) |
| clampB | Clamp a value between a minimum and maximum bound. Ensures the value stays within specified limits. (Domain: arithmetic, Category: comparison) |
| sort_numbersC | Sort a list of numbers in ascending or descending order. (Domain: arithmetic, Category: comparison) |
| rank_numbersB | Get the rank (1-based position) of each number in a list when sorted. Handles ties appropriately. (Domain: arithmetic, Category: comparison) |
| min_listB | Find the minimum value in a list of numbers. (Domain: arithmetic, Category: comparison) |
| max_listC | Find the maximum value in a list of numbers. (Domain: arithmetic, Category: comparison) |
| approximately_equalC | Check if two floating-point numbers are approximately equal within a tolerance. Handles floating-point precision issues. (Domain: arithmetic, Category: comparison) |
| close_to_zeroB | Check if a number is close to zero within a tolerance. Useful for floating-point comparisons. (Domain: arithmetic, Category: comparison) |
| is_finiteA | Check if a number is finite (not infinite and not NaN). (Domain: arithmetic, Category: comparison) |
| is_nanB | Check if a number is NaN (Not a Number). (Domain: arithmetic, Category: comparison) |
| is_infiniteA | Check if a number is infinite (positive or negative infinity). (Domain: arithmetic, Category: comparison) |
| is_normalA | Check if a number is normal (finite, non-zero, and not subnormal). (Domain: arithmetic, Category: comparison) |
| is_closeC | Relative tolerance comparison using both absolute and relative tolerances. (Domain: arithmetic, Category: comparison) |
| is_primeA | Check if a number is prime. A prime number is only divisible by 1 and itself. (Domain: arithmetic, Category: number_theory) |
| next_primeA | Find the next prime number greater than the given number. (Domain: arithmetic, Category: number_theory) |
| nth_primeB | Find the nth prime number (1-indexed). Uses efficient prime generation. (Domain: arithmetic, Category: number_theory) |
| prime_factorsB | Find all prime factors of a number. Returns the prime factorization as a list. (Domain: arithmetic, Category: number_theory) |
| prime_countA | Count the number of prime numbers less than or equal to n (prime counting function π(n)). (Domain: arithmetic, Category: number_theory) |
| is_coprimeB | Check if two numbers are coprime (their greatest common divisor is 1). (Domain: arithmetic, Category: number_theory) |
| first_n_primesA | Generate the first n prime numbers using the Sieve of Eratosthenes algorithm. (Domain: arithmetic, Category: number_theory) |
| gcdC | Calculate the Greatest Common Divisor (GCD) of two integers using Euclidean algorithm. (Domain: arithmetic, Category: number_theory) |
| lcmB | Calculate the Least Common Multiple (LCM) of two integers. (Domain: arithmetic, Category: number_theory) |
| divisorsA | Find all positive divisors of a number in sorted order. (Domain: arithmetic, Category: number_theory) |
| is_divisibleB | Check if the first number is divisible by the second number (remainder is zero). (Domain: arithmetic, Category: number_theory) |
| is_evenA | Check if a number is even (divisible by 2). (Domain: arithmetic, Category: number_theory) |
| is_oddB | Check if a number is odd (not divisible by 2). (Domain: arithmetic, Category: number_theory) |
| extended_gcdA | Extended Euclidean algorithm. Returns gcd(a,b) and coefficients x,y such that ax + by = gcd(a,b). (Domain: arithmetic, Category: number_theory) |
| divisor_countB | Count the number of positive divisors of a number (divisor function τ(n)). (Domain: arithmetic, Category: number_theory) |
| divisor_sumB | Calculate the sum of all positive divisors of a number (divisor function σ(n)). (Domain: arithmetic, Category: number_theory) |
| is_perfect_squareB | Check if a number is a perfect square. (Domain: arithmetic, Category: basic_sequences) |
| perfect_squaresB | Generate the first n perfect squares. (Domain: arithmetic, Category: basic_sequences) |
| nth_perfect_squareC | Get the nth perfect square (0-indexed). (Domain: arithmetic, Category: basic_sequences) |
| is_power_of_twoC | Check if a number is a power of two. (Domain: arithmetic, Category: basic_sequences) |
| powers_of_twoC | Generate the first n powers of two. (Domain: arithmetic, Category: basic_sequences) |
| nth_power_of_twoB | Get the nth power of two (0-indexed). (Domain: arithmetic, Category: basic_sequences) |
| fibonacciC | Calculate the nth Fibonacci number using efficient matrix exponentiation. (Domain: arithmetic, Category: basic_sequences) |
| fibonacci_sequenceC | Generate the first n Fibonacci numbers. (Domain: arithmetic, Category: basic_sequences) |
| is_fibonacci_numberC | Check if a number is a Fibonacci number. (Domain: arithmetic, Category: basic_sequences) |
| factorialC | Calculate factorial n! = n × (n-1) × ... × 2 × 1. (Domain: arithmetic, Category: basic_sequences) |
| double_factorialC | Calculate the double factorial of a number. n!! = n × (n-2) × (n-4) × ... × 2 or 1. (Domain: arithmetic, Category: general) |
| subfactorialA | Calculate subfactorial !n (derangements of n items). (Domain: arithmetic, Category: basic_sequences) |
| triangular_numberB | Calculate the nth triangular number T_n = n(n+1)/2. (Domain: arithmetic, Category: basic_sequences) |
| is_triangular_numberC | Check if a number is a triangular number. (Domain: arithmetic, Category: basic_sequences) |
| triangular_sequenceC | Generate the first n triangular numbers. (Domain: arithmetic, Category: basic_sequences) |
| pentagonal_numberA | Calculate the nth pentagonal number P_n = n(3n-1)/2. (Domain: arithmetic, Category: basic_sequences) |
| is_pentagonal_numberC | Check if a number is a pentagonal number. (Domain: arithmetic, Category: basic_sequences) |
| pentagonal_sequenceC | Generate the first n pentagonal numbers. (Domain: arithmetic, Category: basic_sequences) |
| square_pyramidal_numberC | Calculate the nth square pyramidal number. (Domain: arithmetic, Category: figurate_numbers) |
| tetrahedral_numberC | Calculate the nth tetrahedral number (sum of first n triangular numbers). (Domain: arithmetic, Category: basic_sequences) |
| catalan_numberC | Calculate the nth Catalan number C_n = (2n)!/(n+1)!n!. (Domain: arithmetic, Category: combinatorial_numbers) |
| is_mersenne_primeB | Check if a number is a Mersenne prime (prime of form 2^p - 1 where p is prime). (Domain: arithmetic, Category: special_primes) |
| mersenne_prime_exponentsB | Get known Mersenne prime exponents up to a limit. (Domain: arithmetic, Category: special_primes) |
| lucas_lehmer_testC | Perform Lucas-Lehmer primality test for Mersenne numbers. (Domain: arithmetic, Category: special_primes) |
| mersenne_numbersC | Generate Mersenne numbers 2^p - 1 for prime exponents up to limit. (Domain: arithmetic, Category: special_primes) |
| is_fermat_primeB | Check if a number is a Fermat prime (prime of form 2^(2^n) + 1). (Domain: arithmetic, Category: special_primes) |
| fermat_numbersC | Generate Fermat numbers F_n = 2^(2^n) + 1 up to index limit. (Domain: arithmetic, Category: special_primes) |
| known_fermat_primesB | Get the five known Fermat primes. (Domain: arithmetic, Category: special_primes) |
| is_sophie_germain_primeA | Check if a prime p is a Sophie Germain prime (2p + 1 is also prime). (Domain: arithmetic, Category: special_primes) |
| is_safe_primeA | Check if a prime q is a safe prime (q = 2p + 1 where p is prime). (Domain: arithmetic, Category: special_primes) |
| safe_prime_pairsC | Find Sophie Germain and safe prime pairs up to limit. (Domain: arithmetic, Category: special_primes) |
| is_twin_primeA | Check if a number is part of a twin prime pair (p, p+2). (Domain: arithmetic, Category: special_primes) |
| twin_prime_pairsC | Find twin prime pairs up to limit. (Domain: arithmetic, Category: special_primes) |
| cousin_primesA | Find all cousin prime pairs (primes differing by 4) up to limit. (Domain: arithmetic, Category: prime_patterns) |
| sexy_primesB | Find all sexy prime pairs (primes differing by 6) up to limit. (Domain: arithmetic, Category: prime_patterns) |
| wilson_theorem_checkC | Check Wilson's theorem: p is prime iff (p-1)! ≡ -1 (mod p). (Domain: arithmetic, Category: primality_tests) |
| wilson_factorial_modC | Calculate k! mod m efficiently for Wilson's theorem. (Domain: arithmetic, Category: primality_tests) |
| is_fermat_pseudoprimeC | Check if n is a Fermat pseudoprime to base a. (Domain: arithmetic, Category: pseudoprimes) |
| fermat_primality_checkC | Perform Fermat primality check for base a. (Domain: arithmetic, Category: primality_tests) |
| is_carmichael_numberC | Check if n is a Carmichael number (absolute Fermat pseudoprime). (Domain: arithmetic, Category: pseudoprimes) |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Available Functions | List of currently available mathematical functions after filtering |
| Function Statistics | Statistics about function filtering and availability |
| Server Configuration | Current server configuration |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/IBM/chuk-mcp-math-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server