MCP Server

How AI agents can interact with your Monte Carlo data

Overview

The Monte Carlo MCP Server provides AI agents and assistants with direct access to Monte Carlo's data observability platform through the Model Context Protocol (MCP). This integration enables seamless interaction with Monte Carlo's monitoring, alerting, and data quality capabilities directly from supported AI environments like Cursor, Claude Desktop, and Visual Studio Code.

Available Use-cases and Tools

  • APIs to help users understand alerts: getAlerts
  • APIs to help users manipulate alerts: updateAlert, setAlertOwner, createOrUpdateAlertComment
  • APIs to answer questions about assets: search, getTable, getQueriesForTable, getQueryData
  • APIs to understand asset dependencies: getAssetLineage, getDownstreamBiReports
  • APIs to understand monitors: getMonitors, getAudiences
  • APIs to create monitors as code: createValidationMonitorMac, createMetricMonitorMac, createComparisonMonitorMac, createCustomSqlMonitorMac
  • APIs to explore use cases: getUseCases, getUseCaseTableSummary, getUseCaseTables
  • API to create dashboard widgets: createCustomDashboardWidget
  • Other APIs to ensure smooth interaction with the MCP server: testConnection, getDomains, getUser, getCurrentTime, getValidationPredicates

Users can leverage it to ask questions such as:

  • "Are there any alerts assigned to me in the past day?"
  • "How's the health status of table X?"
  • "What are some trends and patterns in my alerts?"
  • "What tables should I add monitors for?"
  • "When was my table Y last updated?"
  • "What assets and reports would this data issue impact?"
  • "What BI dashboards depend on this table?"
  • "What are the most critical tables in this use case?"
  • "Can I deprecate table X?", and many more.
CategoryTool NameDescriptionExample Use Cases
AlertsgetAlertsRetrieve alerts and incidents from Monte Carlo with filtering optionsβ€’ Get recent data quality alerts for a specific time period β€’ Filter alerts by severity, status, or data assets β€’ Generate reports on incident trends and patterns
AlertsupdateAlertUpdate alert status, severity, or metadataβ€’ Mark alerts as acknowledged or resolved β€’ Declare incidents by setting severity levels β€’ Add custom names to alerts for tracking
AlertssetAlertOwnerAssign or remove alert ownershipβ€’ Assign alerts to team members for investigation β€’ Clear ownership when transferring responsibility β€’ Manage alert assignment workflows
AlertscreateOrUpdateAlertCommentAdd comments to alerts for collaborationβ€’ Document investigation findings and next steps β€’ Share context with team members on alert resolution β€’ Track alert resolution progress and decisions
MonitorsgetMonitorsGet monitors from Monte Carlo based on specified filtersβ€’ List monitors for a specific table or domain β€’ Review monitor configurations and metadata β€’ Audit monitoring coverage across assets
MonitorsgetAudiencesGet notification audiences from Monte Carloβ€’ View configured notification routing β€’ Understand who gets notified about data quality issues β€’ Review audience groupings for monitors
MonitorscreateValidationMonitorMacGenerate YAML configuration for validation monitors (monitors as code)β€’ Create data quality rules using monitors-as-code β€’ Define custom validation logic for specific tables β€’ Automate monitor deployment through CI/CD pipelines
MonitorscreateMetricMonitorMacGenerate YAML configuration for metric monitors (monitors as code)β€’ Track metric trends over time β€’ Set up threshold-based monitoring β€’ Automate metric monitor deployment
MonitorscreateComparisonMonitorMacGenerate YAML configuration for comparison monitors (monitors as code)β€’ Compare data across tables or time periods β€’ Detect drift between datasets β€’ Automate comparison monitor deployment
MonitorscreateCustomSqlMonitorMacGenerate YAML configuration for custom SQL monitors (monitors as code)β€’ Define custom SQL-based data quality checks β€’ Create monitors with complex business logic β€’ Automate custom SQL monitor deployment
MonitorsgetValidationPredicatesList available predicates for creating validation monitorsβ€’ Discover supported validation rule types β€’ Understand predicate syntax and parameters β€’ Build complex validation conditions
Data operationsgetQueriesForTableRetrieve query logs for a table, showing reads or writes over timeβ€’ Analyze table usage patterns and frequency β€’ Identify which queries are updating specific tables β€’ Investigate data lineage through query analysis
Data operationsgetQueryDataGet full query text and metadata for specific query occurrencesβ€’ Review complete SQL for truncated query snippets β€’ Analyze query performance and execution details β€’ Debug data pipeline issues
Assets/CataloggetTableGet detailed table information including schema, statistics, and metadataβ€’ Understand table structure and data types β€’ Review table statistics and monitoring capabilities β€’ Explore table metadata and tags
Assets/CatalogsearchSearch the Monte Carlo catalog for tables, views, dashboards, and other assetsβ€’ Find tables by name or description across warehouses β€’ Discover related data assets and BI reports β€’ Locate specific datasets within large data catalogs
Assets/CataloggetDomainsList available domains in your Monte Carlo workspaceβ€’ Understand data organization and ownership β€’ Filter other operations by domain β€’ Navigate domain-based access controls
DependenciesgetAssetLineageTrace upstream and downstream data flow relationshipsβ€’ Map data flow between tables and systems β€’ Understand impact analysis for schema changes β€’ Visualize end-to-end data pipelines
DependenciesgetDownstreamBiReportsFind all downstream BI assets (Tableau, Looker, Power BI, etc.) that depend on given source tablesβ€’ Identify BI dashboards impacted by a data issue β€’ Assess blast radius of schema changes β€’ Map table-to-report dependencies
Use casesgetUseCasesGet all use cases for a warehouse, representing business-critical data flowsβ€’ Discover monitoring opportunities for data products β€’ Review use case criticality levels β€’ Understand business-critical data flows
Use casesgetUseCaseTableSummaryGet table criticality counts for a specific use caseβ€’ Assess monitoring coverage by criticality level β€’ Prioritize tables for monitoring β€’ Understand distribution of critical assets
Use casesgetUseCaseTablesGet tables associated with a use case, with criticality levels and golden table statusβ€’ Identify the most business-critical tables β€’ Review table criticality reasoning β€’ Find golden tables in a use case
DashboardscreateCustomDashboardWidgetGenerate validated widget JSON for Monte Carlo custom dashboardsβ€’ Create charts, graphs, and tables for dashboards β€’ Visualize data quality metrics β€’ Build custom monitoring dashboards
OthertestConnectionVerifies connectivity and authentication with the Monte Carlo APIβ€’ Test MCP setup during initial configuration β€’ Validate credentials and network connectivity β€’ Troubleshoot connection issues
OthergetUserGet current user information and permissionsβ€’ Verify authentication and user context β€’ Check user permissions and access levels β€’ Validate user-specific configurations
OthergetCurrentTimeGet current time in ISO format for API compatibilityβ€’ Generate time ranges for other API calls β€’ Ensure consistent timestamp formatting β€’ Calculate relative time periods

See a quick demo below on the MCP server in action:


How to set up

1. Connect to the MCP Server

There are two ways to authenticate with the Monte Carlo MCP Server: using MCP Server keys (manual credential setup) or OAuth 2.1 (browser-based login). Both methods require the same permissions β€” only users with roles that can create MCP integration keys (Editors, Monitor Editors, Domain Managers, and Account Owners) are able to authenticate.

Option 1: OAuth 2.1 (recommended for MCP clients that support HTTP transport)

MCP clients that support HTTP-based transport can connect using OAuth 2.1, which lets you authenticate through the Monte Carlo website β€” no API keys to manage.

Setup in Claude Code

Run the following command to add the Monte Carlo MCP server:

claude mcp add --transport http monte-carlo-mcp https://integrations.getmontecarlo.com/mcp

The next time Claude Code attempts to use the MCP server, your browser will open to the Monte Carlo login page. After signing in, you will see a consent screen asking you to authorize access:

Click Allow access to complete the connection. Claude Code will now be able to interact with your Monte Carlo account.

Setup in Cursor

In your mcp.json, add the Monte Carlo server with just the URL β€” no keys needed:

{
  "mcpServers": {
    "monte-carlo": {
      "url": "https://integrations.getmontecarlo.com/mcp"
    }
  }
}

When Cursor connects to the server, your browser will open to complete authentication.

Setup in Visual Studio Code

Open your MCP configuration (MCP: Open User Configuration) and add:

{
  "servers": {
    "monte-carlo": {
      "url": "https://integrations.getmontecarlo.com/mcp"
    }
  }
}

When VS Code connects to the server, your browser will open to complete authentication.

Setup in other MCP clients

Any MCP client that supports HTTP transport with OAuth 2.1 can connect to the Monte Carlo MCP Server using the endpoint:

https://integrations.getmontecarlo.com/mcp

Configure your client to use HTTP transport with the URL above. On first connection, the client will initiate the OAuth flow and redirect you to the Monte Carlo website for authentication and consent.

Option 2: MCP Server keys (works with all MCP clients)

If your MCP client does not support HTTP transport or OAuth, you can use MCP Server keys instead.

Prerequisites

  • Cursor Version: 1.7.17+ (if you use Cursor)
  • VSCode Version: 1.99.3+ (if you use VS Code)
  • Claude Desktop Version: 0.13.19+ (if you use Claude)
  • Node.js (LTS) + npm installed (this includes npx)
  • Network access to your Monte Carlo MCP endpoint (prod or dev).
  • Your Key id and Key secret ready.
  • MC Cli v0.141.4+ (if you want to create the MCP Server keys using the Cli)

Once you have your Key id and Key secret, add the Monte Carlo MCP Server to your IDE.

Monte Carlo's MCP Server should work for all LLM apps that support MCP. Below are the specific installation instruction for the common LLM applications.

Create MCP Server keys

First, you will need to create MCP server keys for authenticating into your own Monte Carlo API access. Note that MCP Server keys are scoped credentials that grant access only to the Monte Carlo MCP Server. They are not the same as standard API keys, and API keys will not work with the MCP Server. Only users with roles: Editors, Monitor Editors, Domain Managers and Account Owners will be able to create MCP Server keys (same as for API keys).

Why separate keys for MCP server?

  • Least privilege: MCP keys can’t be reused against other Monte Carlo APIs.
  • Operational clarity: Easier to rotate/revoke without affecting other integrations.

Security tips: Treat the Key secret like any other credential. Store it securely (e.g., a secrets manager, 1Password, etc). If it’s lost or exposed, create a new key and revoke the old one.

You can create MCP Server keys via the UI, the CLI, or the GraphQL API.

Option A: via UI

Go to Settings -> API Keys in the Monte Carlo UI, click on the blue "Add" button to start creating a MCP server key.

Select "MCP server" as the API key type, add a description to the key, then hit "Add".

Copy your API key and secret. You will use these to install the MCP server in your LLM app.

Option B: via CLI

Prerequisite: You’re logged in to the Monte Carlo CLI with permissions to create integration keys.

montecarlo mcp create-key --description "Local test key"

The command returns a Key id and Key secret:

Key id: XXX
Key secret: YYY

Copy both values and store them securely.

Option C: via GraphQL API

Use the createMcpIntegrationKey mutation:

mutation CreateMcpIntegrationKey($description: String) {
    createMcpIntegrationKey(description: $description) {
      key {
        id
        secret
      }
    }
  }

Variables:

{
  "description": "Local test key"
}

Notes:

  • The response includes both id and secret. Store them securely.

Setup in Cursor

  1. Open Cursor β†’ Settings.
  1. Select MCP & Integrations.
  1. Click Add Custom MCP. Cursor will open your mcp.json. If you have no MCPs yet, it looks like:
{
  "mcpServers": {
  }
}
  1. Add the Monte Carlo entry inside mcpServers (replace <KEY_ID> and <KEY_SECRET> with your values obtained from the previous step. The URL should be: https://integrations.getmontecarlo.com/mcp/):
{
  "mcpServers": {
    "monte-carlo": {
      "command": "npx",
      "args": [
            "-y",
            "mcp-remote",
            "https://integrations.getmontecarlo.com/mcp/",
            "--header",
            "Authorization: Bearer <Key Id>:<Key Secret>"
      ]
    }
  }
}

Alternatively, we also support using custom headers instead of Authorization, so you can use the following:

{
  "mcpServers": {
    "monte-carlo": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://integrations.getmontecarlo.com/mcp/",
        "--header",
        "x-mcd-id: <KEY_ID>",
        "--header",
        "x-mcd-token: <KEY_SECRET>"
      ]
    }
  }
}
  1. Save mcp.json and return to Settings β†’ MCP & Integrations. You should see a monte-carlo toggle.
  1. Turn it on. Open an Agent Chat in Cursor and type: Test Monte Carlo MCP connection. You should see it call the testConnection tool (in some versions it may appear as test_connection).

Setup in Visual Studio Code

  1. Open β€œShow and Run Commands” (SHIFT+CMD+P in Mac or SHIFT+Ctrl+P in Windows)
  1. Type β€œMCP: Open User Configuration”
  1. This will open the mcp.json file, which should look something like this:
{
	"servers": {}
}
  1. Add the Monte Carlo entry inside servers (replace <KEY_ID> and <KEY_SECRET> with your values obtained from previous step.
{
	"servers": {
		"monte-carlo": {
			"command": "npx",
			"args": [
				"-y",
				"mcp-remote",
				"https://integrations.getmontecarlo.com/mcp/",
				"--header",
				"Authorization: Bearer <KEY_ID>:<KEY_SECRET>"
			]
		}
	},
	"inputs": []
}

Alternatively, we also support using custom headers instead of Authorization, so you can use the following:

{
	"servers": {
		"monte-carlo": {
			"command": "npx",
			"args": [
				"-y",
				"mcp-remote",
				"https://integrations.getmontecarlo.com/mcp/",
				"--header",
				"x-mcd-id: <KEY_ID>",
        "--header",
        "x-mcd-token: <KEY_SECRET>"
			]
		}
	},
	"inputs": []
}
  1. Save mcp.json and click on the β€œStart” button over the β€œmonte-carlo” MCP Server configuration
  1. Now the MCP Server should turn to β€œRunning”:
  1. Open the Chat screen and make sure the β€œAgent” mode is selected.
  1. Type: Test Monte Carlo MCP connection. You should see it call the testConnection tool (in some versions it may appear as test_connection).

Setup in Claude Desktop

  1. Open Claude β†’ Settings.
  1. Select Developer.
  1. Click the Edit Config button. This will open the location of the claude_desktop_config.json. Open it in your preferred editor, you should see something like this:
{
  "mcpServers": {
  }
}
  1. Add the Monte Carlo entry inside mcpServers (replace <KEY_ID> and <KEY_SECRET> with your values obtained from previous step;
{
  "mcpServers": {
    "monte-carlo": {
      "command": "npx",
      "args": [
            "-y",
            "mcp-remote",
            "https://integrations.getmontecarlo.com/mcp/",
            "--header",
            "Authorization: Bearer <Key Id>:<Key Secret>"
      ]
    }
  }
}

Alternatively, we can also support using custom headers instead of Authorization:

{
  "mcpServers": {
    "monte-carlo": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://integrations.getmontecarlo.com/mcp/",
        "--header",
        "x-mcd-id: <KEY_ID>",
        "--header",
        "x-mcd-token: <KEY_SECRET>"
      ]
    }
  }
}
  1. Save claude_desktop_config.json and close Claude. Open it again and return to Settings β†’ Developer. You should see a monte-carlo MCP Server in status Running.
  1. Go to New Chat and type: Test Monte Carlo MCP connection. You should see it call the testConnection tool (in some versions it may appear as test_connection).

Network Access Control

You can restrict access to the MCP Server endpoint by IP address using Network Access Control Lists. See Network Access Control for setup and configuration details.

Troubleshooting

  • Toggle won't turn on / shows error
    • Verify the URL (prod vs dev) and that it ends with /mcp/.
    • Ensure npx is available on your PATH; the y flag auto-installs mcp-remote if missing.
  • 401 / Unauthorized
    • Double-check you pasted the correct Key id and Key secret.
    • Check that you are passing the headers correctly(Authorization: Bearer <id>:<secret> or x-mcd-id / x-mcd-token).
    • Make sure the key scope is MCP (API keys won’t work).
  • Connection error: ServerError: HTTP 403: Invalid OAuth error response
    • This error often occurs when using an outdated version of Cursor. Upgrade to the latest version.
    • In some cases, the MCP Server output console will show missing parameters (e.g., Using custom headers: {"Authorization":""}).
    • This means the Authorization token is not being passed. Older versions of Cursor may incorrectly omit these headers.
  • Network / proxy issues
    • Confirm your corporate proxy allows requests to the MCP endpoint.
    • Try again on a different network to rule out blocking.
  • Cursor isn’t picking up changes
    • Reopen Settings β†’ MCP & Integrations or restart Cursor to reload mcp.json.

Check and install Node.js + npm

Quick check

node -v && npm -v && npx -v
# Optional: verify the shim can run
npx -y mcp-remote --version

Install tips

  • macOS: brew install node or (recommended) nvm install --lts
  • Linux: curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && nvm install --lts
  • Windows: winget install OpenJS.NodeJS.LTS

If you’re behind a proxy/allow-list, permit access to:

  • integrations.getmontecarlo.com
  • registry.npmjs.org (first run of npx fetches mcp-remote)

One-liner sanity checks for MCP Server connection with curl

These checks simply verify that auth headers are accepted by your endpoint. You’re good if you do not get 401/403. (Seeing 202 is fine for this quick test.)

macOS/Linux (bash/zsh)

export MCD_URL="https://integrations.getmontecarlo.com/mcp/"
export MCD_ID="<KEY_ID>"
export MCD_SECRET="<KEY_SECRET>"

# Authorization: Bearer <id>:<secret>
curl -sS -o /dev/null -w "%{http_code}\n" -X POST "$MCD_URL" \
  -H "Authorization: Bearer $MCD_ID:$MCD_SECRET"

# OR alternate custom headers
curl -sS -o /dev/null -w "%{http_code}\n" -X POST "$MCD_URL" \
  -H "x-mcd-id: $MCD_ID" \
  -H "x-mcd-token: $MCD_SECRET"

Windows PowerShell

$MCD_URL    = "https://integrations.getmontecarlo.com/mcp/"
$MCD_ID     = "<KEY_ID>"
$MCD_SECRET = "<KEY_SECRET>"

# Authorization: Bearer <id>:<secret>
(Invoke-WebRequest -Method POST $MCD_URL -Headers @{ Authorization = "Bearer $MCD_ID:$MCD_SECRET" } -UseBasicParsing).StatusCode

# OR alternate custom headers
(Invoke-WebRequest -Method POST $MCD_URL -Headers @{ "x-mcd-id" = $MCD_ID; "x-mcd-token" = $MCD_SECRET } -UseBasicParsing).StatusCode