Borrowing it
Nothing to install: this file belongs to SHSharkar/MCP-Mathematics. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/SHSharkar/MCP-Mathematics/main/CLAUDE.mdgit clone --depth 1 https://github.com/SHSharkar/MCP-MathematicsWrote 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.
[](https://agentmods.dev/instructions/shsharkar/mcp-mathematics/claude-md)<a href="https://agentmods.dev/instructions/shsharkar/mcp-mathematics/claude-md"><img src="https://agentmods.dev/badge/instructions/shsharkar/mcp-mathematics/claude-md/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.
<a href="https://agentmods.dev/instructions/shsharkar/mcp-mathematics/claude-md"><img src="https://agentmods.dev/badge/instructions/shsharkar/mcp-mathematics/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.03117 | $0.03117 |
| Opus 5.5 | $0.01247 | $0.01247 |
| Sonnet 5.5 | $0.00623 | $0.00623 |
| Haiku 4.5 | $0.00312 | $0.00312 |
Grade C, and why
MCP-Mathematics CLAUDE.md scanned grade C with 1 finding 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 2mo 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf dist/ build/ How it starts
The opening of the file, as written. The whole thing — 331 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
MCP Mathematics is a production-ready Model Context Protocol (MCP) server providing comprehensive mathematical computation capabilities. Built with FastMCP v2.0+, it exposes 52 advanced mathematical functions, 158 unit conversions across 15 categories, financial calculations, and statistical operations through 21 specialized MCP tools.
Key Architecture Principle: AST-based expression evaluation ensures security by preventing code injection while maintaining full mathematical capability.
Development Commands
Testing
# Run all tests (130 test cases)
python -m pytest tests/ -v
# Run tests with coverage
python -m pytest tests/ --cov=src --cov-report=html
# Run specific test categories
python -m pytest tests/test_calculator.py -v # Core functionality
python -m pytest tests/performance/ -v # Performance tests
python -m pytest tests/security/ -v # Security validation
python -m pytest tests/precision/ -v # Numerical precision
python -m pytest tests/validation/ -v # Input validation
Code Quality
# Auto-format code (100-character line limit)
black src/ tests/ --line-length 100
# Lint with Ruff
ruff check src/ tests/ --fix
# Type checking
mypy src/
# Security analysis
bandit -r src/
# Run all pre-commit checks
pre-commit run --all-files
Running the Server
# Development mode (local testing)
python -m mcp_mathematics
# Using uv (recommended for production)
uvx mcp-mathematics
# Install in editable mode for development
pip install -e .
Building and Distribution
# Clean previous builds
rm -rf dist/ build/
# Build source and wheel distributions
python -m build
# Verify package integrity
twine check dist/*
# Test installation in clean environment
pip install dist/*.whl
Architecture Overview
Core Components
Single-File Architecture: All functionality is consolidated in src/mcp_mathematics/calculator.py (~4500 lines) for maximum portability and minimal dependencies.
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.
- 2mo ago First seen · 331 lines · 3,117 tokens per session scan C 39c52097a79b
MCP-Mathematics CLAUDE.md is an instructions file published in the GitHub repository SHSharkar/MCP-Mathematics (16 stars, last pushed 1y ago), licensed MIT. It adds 3,117 tokens to every session, about $0.0125 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
MCP-Mathematics CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| MCP-Mathematics CLAUDE.mdSHSharkar/MCP-Mathematics | Instructions file | 16 | 1y ago | MIT | C | 3,117 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |