# Regulatory Arbitrage Detection MCP (`ryanclinton/regulatory-arbitrage-detection-mcp`) Actor

Cross-jurisdictional regulatory arbitrage detection and compliance optimization using optimal transport, game theory, and econometric methods.

- **URL**: https://apify.com/ryanclinton/regulatory-arbitrage-detection-mcp.md
- **Developed by:** [ryan clinton](https://apify.com/ryanclinton) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Regulatory Arbitrage Detection MCP Server

**Cross-jurisdictional regulatory arbitrage detection and compliance optimization using optimal transport, game theory, and econometric methods.** This MCP server orchestrates **16 data sources** across federal registers, corporate registries in 6+ jurisdictions, financial regulators, and international databases to power **8 mathematically rigorous tools** for measuring regulatory distance, detecting regulatory capture, estimating lobbying impact, and forecasting regulatory changes. Implements Sinkhorn-Knopp optimal transport, MILP compliance routing, supermodular game theory, Hawkes processes, and Bayesian structural time series.

### What data can you access?

| Data Point | Source |
|---|---|
| Federal regulatory entries and proposed rules | Federal Register |
| Congressional bills and legislative activity | Congress Bills |
| Consumer financial complaints | CFPB |
| UK corporate registrations and filings | UK Companies House |
| Global corporate registry data (140+ jurisdictions) | OpenCorporates |
| Legal Entity Identifiers and ownership chains | GLEIF LEI |
| Canadian corporate registry | Canada Corporations |
| New Zealand corporate registry | NZ Companies |
| Australian business registry | Australia ABN |
| SEC regulatory filings | SEC EDGAR |
| US bank financial data | FDIC |
| OFAC sanctions lists | OFAC |
| Consolidated global sanctions | OpenSanctions |
| EU VAT registration verification | EU VAT |
| EU trademark registrations | EUIPO |
| Federal spending data | USAspending |

### MCP Tools

| Tool | Price | Description |
|------|-------|-------------|
| `measure_regulatory_distance` | $0.04 | Measure pairwise regulatory distance via Sinkhorn-regularized Wasserstein optimal transport |
| `optimize_compliance_routing` | $0.04 | Find cost-minimizing cross-jurisdictional compliance routing via MILP branch-and-bound |
| `detect_regulatory_capture` | $0.04 | Detect regulatory capture via bipartite C4 clustering coefficient on regulator-industry graph |
| `estimate_lobbying_impact` | $0.04 | Estimate causal lobbying impact via Difference-in-Differences with parallel trends test |
| `quantify_regulatory_complexity` | $0.04 | Quantify regulatory complexity via Lempel-Ziv compression as Kolmogorov complexity estimator |
| `model_regulatory_competition` | $0.04 | Model jurisdictional regulatory competition as supermodular game with Nash equilibrium |
| `predict_regulatory_changes` | $0.04 | Predict regulatory changes via Hawkes self-exciting point process with Ogata thinning |
| `estimate_causal_regulation_impact` | $0.04 | Estimate causal regulation impact via Bayesian Structural Time Series with Kalman filter |

### Data Sources

- **Federal Register** -- US proposed rules, final rules, notices, and executive orders
- **Congress Bills** -- Legislative activity, bill status, and committee assignments
- **CFPB** -- Consumer Financial Protection Bureau complaint and enforcement data
- **UK Companies House** -- UK corporate registrations, officers, and filings
- **OpenCorporates** -- Global corporate registry spanning 140+ jurisdictions
- **GLEIF LEI** -- Legal Entity Identifier ownership chains and parent-child relationships
- **Canada Corporations** -- Canadian federal corporate registry
- **NZ Companies** -- New Zealand corporate registry
- **Australia ABN** -- Australian Business Number registry
- **SEC EDGAR** -- Securities and Exchange Commission filings and analysis
- **FDIC Bank** -- Federal Deposit Insurance Corporation bank financial data
- **OFAC** -- Office of Foreign Assets Control sanctions lists
- **OpenSanctions** -- Consolidated global sanctions and PEP database
- **EU VAT** -- European Union VAT registration verification
- **EUIPO Trademark** -- EU Intellectual Property Office trademark registrations
- **USAspending** -- Federal government spending and contract data

### How the scoring works

Each tool implements a distinct mathematical framework:

**Sinkhorn-Knopp Optimal Transport** (Tool 1) builds regulation probability distributions per jurisdiction and computes pairwise Wasserstein distances with entropic regularization. The Gibbs kernel K_ij = exp(-C_ij/epsilon) is computed with alternating u/v scaling until convergence. Larger distances indicate greater regulatory divergence and arbitrage potential.

**MILP Compliance Routing** (Tool 2) formulates cross-jurisdictional compliance as a Mixed-Integer Linear Program: minimize total compliance cost subject to binary jurisdiction selection variables. Branch-and-bound enumeration finds the globally optimal route.

**Bipartite C4 Capture Detection** (Tool 3) builds a regulator-industry bipartite graph and counts 4-cycles through each regulator node. Results are compared to a null model (100 Monte Carlo iterations of random bipartite graphs with preserved degree sequences). Z-scores significantly above the null indicate capture risk.

**Difference-in-Differences** (Tool 4) partitions jurisdictions into treatment (with lobbying activity) and control groups. The treatment effect tau is computed with standard errors, t-statistics, and p-values. A parallel trends test validates the identification assumption.

**Lempel-Ziv Complexity** (Tool 5) estimates Kolmogorov complexity per jurisdiction by counting distinct substrings in sequential parsing of regulatory text representations. Compression ratios and Gini coefficients quantify complexity inequality across jurisdictions.

**Supermodular Game** (Tool 6) models N jurisdictions as players choosing regulatory levels with positive cross-derivatives (strategic complements). Best-response iteration converges to Nash equilibrium by Topkis' theorem. The race-to-bottom index measures how far the equilibrium falls below the Pareto optimum.

**Hawkes Process** (Tool 7) models regulatory event intensity as self-exciting: past events increase future event probability. The branching ratio (spectral radius of alpha/beta) approaching 1 signals critical instability. Ogata thinning generates forward simulations.

**Bayesian Structural Time Series** (Tool 8) decomposes regulatory impact into level, trend, and seasonal components via Kalman filtering. Counterfactual extrapolation estimates treatment effects with Bayesian credible intervals.

### How to connect this MCP server

#### Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "regulatory-arbitrage-detection": {
      "url": "https://regulatory-arbitrage-detection-mcp.apify.actor/mcp"
    }
  }
}
````

#### Programmatic (HTTP)

```bash
curl -X POST https://regulatory-arbitrage-detection-mcp.apify.actor/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"measure_regulatory_distance","arguments":{"query":"banking regulation EU US UK"}},"id":1}'
```

This MCP also works with **Cursor**, **Windsurf**, **Cline**, and any other MCP-compatible client.

### Use cases for regulatory arbitrage intelligence

#### Cross-Border Compliance Strategy

Measure regulatory distance between jurisdictions to identify where compliance programs can be harmonized and where jurisdiction-specific requirements demand separate approaches.

#### Regulatory Capture Risk Assessment

Screen regulators for capture indicators using network analysis. Identify revolving door patterns, rule weakening trends, and regulator-industry clustering that signal compromised oversight.

#### Lobbying ROI Analysis

Estimate the causal impact of lobbying expenditure on regulatory outcomes using econometric methods. Determine whether lobbying investments are producing measurable regulatory changes.

#### Regulatory Complexity Benchmarking

Compare regulatory burden across jurisdictions using information-theoretic complexity measures. Identify over-complex regulatory regimes that may benefit from simplification.

#### Race-to-Bottom Early Warning

Model competitive dynamics between jurisdictions to detect whether regulatory competition is producing a race to the bottom. Quantify the welfare gap between Nash equilibrium and Pareto optimum.

#### Regulatory Change Forecasting

Predict when and where regulatory changes will occur using self-exciting point process models. Identify sectors where regulatory event clustering signals imminent new rules.

### How much does it cost?

This MCP uses **pay-per-event** pricing. Each tool call costs $0.04.

The **Apify Free plan** includes $5 of monthly platform credits, which covers 125 tool calls.

| Example Use | Approximate Cost |
|---|---|
| Measure regulatory distance between two jurisdictions | $0.04 |
| Detect regulatory capture in a sector | $0.04 |
| Full suite of 8 analyses for one topic | $0.32 |

### How it works

1. **You call a tool** with a regulatory query and optional data source category filters (regulatory, corporate, financial, international, spending)
2. **Up to 16 Apify actors run in parallel** fetching data from federal registers, corporate registries, financial regulators, and international databases
3. **A regulatory network is constructed** with entity resolution linking records across jurisdictions
4. **The mathematical model runs** on the network -- optimal transport, MILP, game theory, or econometric analysis
5. **Structured results are returned** with model outputs, statistical diagnostics, and supporting data

### FAQ

**Q: What jurisdictions are covered?**
A: The system queries corporate registries in the US, UK, Canada, New Zealand, Australia, and the EU, plus global corporate data via OpenCorporates (140+ jurisdictions). Federal regulatory data is US-focused.

**Q: How reliable are the causal estimates?**
A: The Difference-in-Differences and BSTS tools implement standard econometric identification strategies with diagnostic tests (parallel trends, Bayesian credible intervals). Results should be interpreted as estimates subject to the usual causal inference assumptions.

**Q: Can this detect illegal regulatory arbitrage?**
A: The system identifies regulatory distance and arbitrage opportunities. It does not make legal determinations about whether specific arbitrage strategies are lawful.

**Q: Is it legal to use this data?**
A: All data sources are publicly available government registries and open databases. See [Apify's guide on web scraping legality](https://blog.apify.com/is-web-scraping-legal/).

**Q: What is the Hawkes process branching ratio?**
A: The branching ratio measures self-excitation intensity. Values near 0 indicate independent events; values approaching 1 indicate critical instability where each event triggers more events. Values above 0.8 are concerning.

**Q: Can I combine this with other MCPs?**
A: Yes. Use alongside the Regulatory Change Intelligence MCP for US federal regulatory monitoring or the UK Regulatory Ecosystem MCP for UK-specific compliance analysis.

### Related MCP servers

| MCP Server | Description |
|---|---|
| [ryanclinton/regulatory-change-intelligence-mcp](https://apify.com/ryanclinton/regulatory-change-intelligence-mcp) | US federal regulatory pipeline monitoring |
| [ryanclinton/uk-regulatory-ecosystem-mcp](https://apify.com/ryanclinton/uk-regulatory-ecosystem-mcp) | UK multi-agency regulatory intelligence |
| [ryanclinton/sanctions-evasion-network-mcp](https://apify.com/ryanclinton/sanctions-evasion-network-mcp) | Structural sanctions evasion detection |

### Integrations

This MCP server is built on the **Apify platform** and supports:

- **Apify API** for programmatic access and regulatory monitoring automation
- **Scheduled runs** via Apify Scheduler for recurring regulatory analysis
- **Webhooks** for triggering alerts when regulatory distances or capture scores change
- **Integration with 200+ Apify actors** for extending jurisdictional coverage

# Actor input Schema

## Actor input object example

```json
{}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ryanclinton/regulatory-arbitrage-detection-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("ryanclinton/regulatory-arbitrage-detection-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call ryanclinton/regulatory-arbitrage-detection-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ryanclinton/regulatory-arbitrage-detection-mcp",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Regulatory Arbitrage Detection MCP",
        "description": "Cross-jurisdictional regulatory arbitrage detection and compliance optimization using optimal transport, game theory, and econometric methods.",
        "version": "1.0",
        "x-build-id": "JVtDNZlUlpvfLDO3d"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ryanclinton~regulatory-arbitrage-detection-mcp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ryanclinton-regulatory-arbitrage-detection-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ryanclinton~regulatory-arbitrage-detection-mcp/runs": {
            "post": {
                "operationId": "runs-sync-ryanclinton-regulatory-arbitrage-detection-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ryanclinton~regulatory-arbitrage-detection-mcp/run-sync": {
            "post": {
                "operationId": "run-sync-ryanclinton-regulatory-arbitrage-detection-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {}
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
