Differentiation MCP Server

Differentiation MCP Server

Provides comprehensive mathematical differentiation capabilities using symbolic computation (SymPy) and automatic differentiation (autograd).

Category
Visit Server

README

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:

  1. differentiate_symbolic - Compute exact symbolic derivatives using SymPy

    • Supports any order of derivatives
    • Automatic simplification
    • LaTeX output for mathematical notation
  2. differentiate_numerical - Numerical derivatives using autograd

    • First and second order derivatives
    • Evaluation at specific points
    • High precision numerical computation
  3. partial_derivatives - Multivariable function differentiation

    • First-order partials for all variables
    • Mixed partial derivatives
    • Support for any number of variables
  4. gradient_vector - Gradient computation for multivariable functions

    • Symbolic gradient vectors
    • Point evaluation capabilities
    • LaTeX formatted output
  5. chain_rule - Application of the chain rule for composite functions

    • Step-by-step breakdown
    • Automatic substitution and simplification
    • Educational explanations
  6. 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

Dependencies

  • mcp - Model Context Protocol framework
  • autograd - Automatic differentiation library
  • sympy - Symbolic mathematics library
  • numpy - 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: 1

Numerical Differentiation

Tool: differentiate_numerical
Arguments:
- function_def: "lambda x: anp.sin(x) + x**2"
- point: 1.5707963267948966
- order: 1

Partial 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_server

Debugging

Use the MCP Inspector for debugging:

npx @modelcontextprotocol/inspector python -m differentiation_server

Building

uv sync
uv build

Educational 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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured