MCP Servers That Help Detect Breaking OpenAPI Changes
The OpenAPI-Diff MCP server monitors API specifications and automatically alerts developers to incompatible modifications between versions, preventing deployment of breaking changes.
The punkpeye/awesome-mcp-servers repository maintains a curated list of Minecraft Pocket Edition (MCP) servers, including the OpenAPI-Diff server specifically designed to detect breaking changes in OpenAPI specifications. This detection system continuously monitors published OpenAPI definitions and reports incompatible modifications between versions, ensuring API stability across deployments.
Architecture of the Breaking Change Detection System
The OpenAPI-Diff server operates through five core components that work sequentially to identify API incompatibility.
Spec Loader and Version Store
The Spec Loader, implemented in openapi_diff/loader.py, fetches the current OpenAPI specification (JSON or YAML) from the target MCP service's /openapi.json endpoint. The Version Store persists the last-known specification to a local cache or SQLite database, enabling historical comparison across monitoring cycles.
Diff Engine and Breaking Change Analysis
The Diff Engine in openapi_diff/diff_engine.py leverages the official openapi-diff library to compute detailed differences between specification versions. The Breaking-Change Detector scans this diff output for critical modifications including removed paths, altered request or response schemas, and changed HTTP methods that violate backward compatibility.
Alert Notifier
When breaking changes are detected, the Notifier component in openapi_diff/notifier.py dispatches alerts through configurable channels such as Slack webhooks, Discord, or SMTP email, ensuring immediate developer awareness of potential API contract violations.
Source Code Implementation Details
According to the punkpeye/awesome-mcp-servers source code, the detection logic resides in specific modules within the openapi_diff directory.
Core File Structure
openapi_diff/loader.py– Retrieves live OpenAPI specifications from remote endpoints.openapi_diff/diff_engine.py– Executes comparison logic using theopenapi-difflibrary.openapi_diff/notifier.py– Manages alert dispatch across communication platforms.openapi_diff/main.py– Orchestrates the complete workflow from loading to notification.README.md– Documents the server's configuration options and usage patterns.
Detection Workflow
As implemented in main.py, the server executes a continuous monitoring loop. It first loads the current specification using the loader module, retrieves the cached previous version from the version store, and passes both to the diff engine. The engine returns a change set that the breaking-change detector analyzes for incompatible modifications. If breaking changes exist, the notifier triggers immediate alerts before the new specification enters production environments.
Configuring the Breaking Change Detector
Setting up the OpenAPI-Diff server requires implementing the loader logic, configuring notification channels, and scheduling periodic checks.
Python Implementation
The following Python code demonstrates fetching specifications and detecting breaking changes using the core library:
# Example: Loading and diffing specs (Python)
import requests
from openapi_diff import diff_specs
def fetch_spec(url):
resp = requests.get(url)
resp.raise_for_status()
return resp.json()
def detect_breaking_changes(old_spec, new_spec):
diff = diff_specs(old_spec, new_spec)
# `diff.breaking` is a list of breaking changes identified by the library
return diff.breaking
# Usage
old = fetch_spec('https://example-mcp.com/openapi.json')
# Assume `old` was saved from a previous run
new = fetch_spec('https://example-mcp.com/openapi.json')
breaking = detect_breaking_changes(old, new)
if breaking:
print("Breaking OpenAPI changes detected:")
for b in breaking:
print(f"- {b}")
else:
print("No breaking changes.")
YAML Configuration
Create a config.yaml file to define endpoints and notification settings:
# Example: Minimal configuration (config.yaml)
spec_url: https://example-mcp.com/openapi.json
cache_file: ./spec_cache.json
notify:
slack_webhook: https://hooks.slack.com/services/XXX/YYY/ZZZ
email:
to: dev-team@example.com
smtp_server: smtp.example.com
Running the Detector
Execute the monitoring script with your configuration:
# Example: Running the detector (shell)
python detector.py --config config.yaml
Summary
- OpenAPI-Diff is the primary MCP server for detecting breaking OpenAPI changes in the punkpeye/awesome-mcp-servers ecosystem.
- The architecture separates concerns across five components: Spec Loader, Version Store, Diff Engine, Breaking-Change Detector, and Notifier.
- Source files including
openapi_diff/diff_engine.pyandopenapi_diff/main.pyimplement the core comparison and orchestration logic. - The system integrates with CI/CD pipelines to halt releases when incompatible API modifications are detected.
- Configuration supports multiple notification channels including Slack and email through YAML-based setup.
Frequently Asked Questions
What MCP servers help detect breaking OpenAPI changes?
The OpenAPI-Diff server (also referenced as OpenAPI Diff Server) in the punkpeye/awesome-mcp-servers repository provides dedicated functionality for detecting breaking changes. It continuously monitors OpenAPI specifications and compares new versions against cached baselines to identify incompatible modifications.
How does the diff engine determine which changes are breaking?
The diff engine in openapi_diff/diff_engine.py uses the openapi-diff library to classify changes based on OpenAPI specification standards. It flags removals of existing paths, modifications to required request parameters, changes to response schemas that remove fields, and alterations to HTTP methods as breaking changes that would break existing client implementations.
Can the server integrate with existing CI/CD pipelines?
Yes, the OpenAPI-Diff server runs independently and can execute as a pre-deployment gate in CI/CD workflows. By configuring the detector to run before production releases and return non-zero exit codes when breaking changes are detected, teams can automatically prevent deployment of incompatible API versions.
Where are the core detection modules located?
The primary source files reside in the openapi_diff directory within the repository. Key files include loader.py for specification retrieval, diff_engine.py for comparison logic, notifier.py for alerts, and main.py for workflow orchestration, as documented in the repository's README.md.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →