Differentiation MCP 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., "@Differentiation MCP Server Find the derivative of x^3 + 2x^2 + x + 1"
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.
Differentiation MCP Server
A Model Context Protocol (MCP) server that provides comprehensive mathematical differentiation capabilities using both symbolic computation (SymPy) and automatic differentiation (autograd).
Features
Differentiation Tools
The server provides six powerful differentiation tools:
differentiate_symbolic - Compute exact symbolic derivatives using SymPy
Supports any order of derivatives
Automatic simplification
LaTeX output for mathematical notation
differentiate_numerical - Numerical derivatives using autograd
First and second order derivatives
Evaluation at specific points
High precision numerical computation
partial_derivatives - Multivariable function differentiation
First-order partials for all variables
Mixed partial derivatives
Support for any number of variables
gradient_vector - Gradient computation for multivariable functions
Symbolic gradient vectors
Point evaluation capabilities
LaTeX formatted output
chain_rule - Application of the chain rule for composite functions
Step-by-step breakdown
Automatic substitution and simplification
Educational explanations
implicit_differentiation - Differentiation of implicit equations
Handles equations of the form F(x,y) = 0
Automatic application of implicit differentiation rules
Clear step-by-step solutions
Prompts
The server provides educational prompts:
differentiation-help: Get guidance on which tool to use for different types of problems
calculus-problem-solver: Structured approach to solving calculus problems
Related MCP server: ReasonForge
Dependencies
mcp- Model Context Protocol frameworkautograd- Automatic differentiation librarysympy- Symbolic mathematics librarynumpy- Numerical operations
Installation and Setup
Prerequisites
Python 3.12 or higher
Virtual environment (created automatically by the project)
Configuration for Claude Desktop
Windows
Add to %APPDATA%/Claude/claude_desktop_config.json:
{
"mcpServers": {
"differentiation-server": {
"command": "python",
"args": ["-m", "differentiation_server"],
"cwd": "c:\\Users\\shawn\\OneDrive\\Desktop\\diffrentiation",
"env": {
"PYTHONPATH": "c:\\Users\\shawn\\OneDrive\\Desktop\\diffrentiation\\src"
}
}
}
}macOS
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"differentiation-server": {
"command": "python",
"args": ["-m", "differentiation_server"],
"cwd": "/path/to/your/diffrentiation",
"env": {
"PYTHONPATH": "/path/to/your/diffrentiation/src"
}
}
}
}Usage Examples
Symbolic Differentiation
Tool: differentiate_symbolic
Arguments:
- expression: "x**3 + 2*x**2 + x + 1"
- variable: "x"
- order: 1Numerical Differentiation
Tool: differentiate_numerical
Arguments:
- function_def: "lambda x: anp.sin(x) + x**2"
- point: 1.5707963267948966
- order: 1Partial Derivatives
Tool: partial_derivatives
Arguments:
- expression: "x**2 + y**2 + x*y"
- variables: ["x", "y"]Chain Rule
Tool: chain_rule
Arguments:
- outer_function: "sin(u)"
- inner_function: "x**2 + 1"
- variable: "x"Development
Running the Server
cd diffrentiation
.\.venv\Scripts\activate.bat # Windows
source .venv/bin/activate # macOS/Linux
python -m differentiation_serverDebugging
Use the MCP Inspector for debugging:
npx @modelcontextprotocol/inspector python -m differentiation_serverBuilding
uv sync
uv buildEducational Value
This MCP server is designed to be educational, providing:
Step-by-step solutions for complex differentiation problems
Clear explanations of mathematical concepts
LaTeX formatting for proper mathematical notation
Error handling with helpful messages
Support for various difficulty levels from basic to advanced calculus
Contributing
The server is built using the Model Context Protocol and follows MCP best practices. Contributions are welcome for:
Additional differentiation techniques
Enhanced error handling
More educational prompts
Performance optimizations
License
This project is open source and available under standard licensing terms.
Available Tools
6 toolschain_ruleB
Apply the chain rule for composite functions
Inputs: inner_function (required), outer_function (required), variable, inner_var.
differentiate_numericalC
Compute numerical derivatives using autograd for specific function values
Inputs: point (required), function_def (required), order.
differentiate_symbolicA
Compute symbolic derivatives of mathematical expressions using SymPy
Inputs: expression (required), order, simplify, variable.
gradient_vectorB
Compute the gradient vector of a multivariable function
Inputs: expression (required), point, variables.
implicit_differentiationB
Perform implicit differentiation for equations of the form F(x,y) = 0
Inputs: equation (required), dependent_var, independent_var.
partial_derivativesC
Compute partial derivatives for multivariable functions
Inputs: expression (required), variables, mixed_order.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Most tools have clearly distinct purposes: symbolic vs. numerical differentiation are separated by method, and chain rule/implicit differentiation cover specific techniques. However, partial_derivatives and gradient_vector are closely related since a gradient is essentially the vector of all partial derivatives, which could cause some misselection.
Two tools follow a clear verb_noun pattern (differentiate_symbolic, differentiate_numerical), but the remaining four are descriptive noun phrases like partial_derivatives, gradient_vector, chain_rule, and implicit_differentiation. The naming is readable and consistently snake_case, but the structural conventions are mixed.
Six tools is a well-scoped count for a differentiation-focused server. Each tool covers a meaningful aspect of the domain without unnecessary redundancy or bloat.
The toolset covers symbolic, numerical, partial, gradient, chain rule, and implicit differentiation, which addresses the core domain well. Minor gaps such as higher-order derivatives or directional derivatives could be added, but they are not obvious dead ends for typical differentiation workflows.
Maintenance
Related MCP Connectors
Evaluate, simplify, and differentiate mathematical expressions.
Exact arithmetic, algebra, calculus, physics, chemistry and finance with a checkable formula.
Scientific compute for AI agents: symbolic, numerical, quantum, chemistry, ODE. Paid via x402.
Integrates Wolfram Language and Wolfram|Alpha accessing curated data and sophisticated algorithms.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides advanced mathematical calculation capabilities including symbolic algebra, numerical computing, data analysis, and image processing through SymPy, NumPy, SciPy, and pandas integration.3MIT
- AlicenseNot gradedqualityDmaintenanceProvides a suite of deterministic math tools powered by SymPy to handle algebra, calculus, linear algebra, and statistics via the Model Context Protocol. It enables smaller language models to delegate complex computations to a verified symbolic backend for accurate and reliable results.Apache 2.0
- AlicenseBqualityDmaintenanceProvides mathematical calculation capabilities using MathJS, enabling expression evaluation and derivative calculation.214 npmMIT
- AlicenseBqualityBmaintenanceEnables creation of new mathematical formulas through symbolic derivation, verification, and step-by-step control, leveraging SymPy for computation and storing results with provenance.824Apache 2.0