Edit Math Supervisor

A stateful MCP server that validates code edits by AI assistants before committing changes.
  • python

0

GitHub Stars

python

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "yrannkv-mcp-edit-math": {
      "command": "python",
      "args": [
        "/absolute/path/to/mcp-edit-math/mcp_edit_math.py"
      ]
    }
  }
}

Edit Math Supervisor is a stateful MCP server that acts as a gatekeeper for AI coding assistants. It enforces dependency verification before code edits can be committed, preventing unsafe changes from being saved and helping you avoid hidden integration issues.

How to use

You drive the workflow by invoking the MCP client with the #editmath trigger. The server analyzes your target function, verifies dependencies, and only allows a commit if the integrity check passes or you explicitly override it with user confirmation.

How to install

Prerequisites: you need Python and a working MCP client setup. Ensure you have access to the system where you will run the MCP server and that you can install Python packages.

# 1) Clone the project repository for the Edit Math MCP server
git clone https://github.com/your-username/mcp-edit-math.git
cd mcp-edit-math

# 2) Install Python dependencies
pip install mcp tree-sitter==0.21.3 tree-sitter-javascript==0.21.0 tree-sitter-typescript==0.21.0
```} ,{

Configuration and usage notes

Configure your MCP client to load the Edit Math MCP server so your AI agents can talk to it. The following example shows how to reference the local Python script as the server entry point.

{
  "mcpServers": {
    "edit_math": {
      "command": "python",
      "args": ["/absolute/path/to/mcp-edit-math/mcp_edit_math.py"]
    }
  }
}
```}]},{

Security and behavior notes

The MCP server uses an interactive workflow: it scans dependencies, requests a verification ticket, and only commits when a valid ticket is present or the user overrides with explicit approval. This design prevents unsafe edits from being saved and ensures you consciously authorize any dependency changes.

Troubleshooting

If edits are blocked, check the integrity score interaction and confirm you want to override only when you understand the changes being applied. Verify that the local path to the mcp_edit_math.py script is correct and accessible by the Python runtime.

Available tools

scan_dependencies

Scans the target function using AST to determine language and dependencies.

calculate_integrity_score

Calculates an integrity score to decide if edits are safe to commit.

commit_safe_edit

Commits edits only when the ticket is valid or a user override is provided.

force_override

Allows forcing a commit after user confirmation in special cases.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational