math-assistant-mcp-demo

math-assistant-mcp-demo is a cursor rule for Cursor from SwonVIP/mcp-server-talk. It costs 0 tokens per session (728 once invoked), scanned A, original, MIT.

A demo MCP server that offers nine mathematical calculations through FastMCP, a Python framework for building MCP servers. It also includes server information and two calculation-assistance prompt templates.

In plain words
What is it for?
Use it to demonstrate addition, subtraction, multiplication, division, powers, roots, factorials, percentages, and averages through an MCP client.
Why use it?
It provides a small, concrete example of how an MCP server can expose tools, resources, and prompts. It includes protections for invalid operations such as division by zero and negative square roots.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/sven.scheffel/Documents/repositories/mcp-server-talk/demo/1/simple_mcp_server.py.

Good fit Use it to demonstrate addition, subtraction, multiplication, division, powers, roots, factorials, percentages, and averages through an MCP client.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for math-assistant-mcp-demo

README.md
[![agentmods](https://agentmods.dev/badge/rules/swonvip/mcp-server-talk/math-assistant-mcp-demo/github.svg)](https://agentmods.dev/rules/swonvip/mcp-server-talk/math-assistant-mcp-demo)
Your own site
<a href="https://agentmods.dev/rules/swonvip/mcp-server-talk/math-assistant-mcp-demo"><img src="https://agentmods.dev/badge/rules/swonvip/mcp-server-talk/math-assistant-mcp-demo/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for math-assistant-mcp-demo

Your own site · 80×15
<a href="https://agentmods.dev/rules/swonvip/mcp-server-talk/math-assistant-mcp-demo"><img src="https://agentmods.dev/badge/rules/swonvip/mcp-server-talk/math-assistant-mcp-demo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 728 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00728
Opus 5 $0.00000 $0.00364
Sonnet 5 $0.00000 $0.00146
Haiku 4.5 $0.00000 $0.00073

Measured 8d ago against content hash 8c596af1f718, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

math-assistant-mcp-demo scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/math-assistant-mcp-demo.mdc · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Math Assistant MCP Server Demo Implementation

Overview

Successfully created and cleaned up a Math Assistant MCP Server demo using FastMCP in the demo/1/ directory.

Implementation Details

Server Capabilities

  • Name: Math Assistant MCP Server
  • Framework: FastMCP
  • Purpose: Demonstrate mathematical calculation capabilities via MCP

Available Tools (9 total)

  1. add_numbers(a, b) - Add two numbers
  2. subtract_numbers(a, b) - Subtract two numbers
  3. multiply_numbers(a, b) - Multiply two numbers
  4. divide_numbers(a, b) - Divide two numbers (with zero-division protection)
  5. power(base, exponent) - Raise to a power
  6. square_root(number) - Calculate square root (with negative number protection)
  7. factorial(n) - Calculate factorial (with negative number protection)
  8. calculate_percentage(part, whole) - Calculate percentage
  9. calculate_average(numbers) - Calculate average of a list

Available Resources (1 total)

  • file://server-info - Server information and capabilities

Available Prompts (2 total)

  • math-helper - General mathematical assistance template
  • calculator - Step-by-step calculation assistance template

Files Created/Updated

Core Files

  • simple_mcp_server.py - Main server implementation
  • requirements.txt - Dependencies (fastmcp>=0.4.0)
  • README.md - Comprehensive documentation
  • cursor-mcp-config.json - Sample Cursor configuration
  • setup.sh - Automated setup script

Key Changes Made

  1. Renamed from "Simple Demo Server" to "Math Assistant MCP Server"
  2. Removed non-math tools (todo management, text processing, time utilities)
  3. Added comprehensive math tools with error handling
  4. Updated all documentation and references
  5. Fixed resource URI format (added file:// prefix)
  6. Improved setup script with proper testing

Cursor Integration

Configuration

{
  "mcpServers": {
    "math-assistant": {
      "command": "python",
      "args": ["/Users/sven.scheffel/Documents/repositories/mcp-server-talk/demo/1/simple_mcp_server.py"],
      "cwd": "/Users/sven.scheffel/Documents/repositories/mcp-server-talk/demo/1"
    }
  }
}

Read the full file on GitHub · 92 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 92 lines · 0 tokens per session scan A 8c596af1f718

Subscribe to this mod's changes

math-assistant-mcp-demo is a cursor rule published in the GitHub repository SwonVIP/mcp-server-talk (0 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 728 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.