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.
| Category | Tool Name | Description | Example Use Cases |
|---|---|---|---|
| Alerts | getAlerts | Retrieve 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 |
| Alerts | updateAlert | Update alert status, severity, or metadata | β’ Mark alerts as acknowledged or resolved β’ Declare incidents by setting severity levels β’ Add custom names to alerts for tracking |
| Alerts | setAlertOwner | Assign or remove alert ownership | β’ Assign alerts to team members for investigation β’ Clear ownership when transferring responsibility β’ Manage alert assignment workflows |
| Alerts | createOrUpdateAlertComment | Add 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 |
| Monitors | getMonitors | Get 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 |
| Monitors | getAudiences | Get notification audiences from Monte Carlo | β’ View configured notification routing β’ Understand who gets notified about data quality issues β’ Review audience groupings for monitors |
| Monitors | createValidationMonitorMac | Generate 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 |
| Monitors | createMetricMonitorMac | Generate YAML configuration for metric monitors (monitors as code) | β’ Track metric trends over time β’ Set up threshold-based monitoring β’ Automate metric monitor deployment |
| Monitors | createComparisonMonitorMac | Generate YAML configuration for comparison monitors (monitors as code) | β’ Compare data across tables or time periods β’ Detect drift between datasets β’ Automate comparison monitor deployment |
| Monitors | createCustomSqlMonitorMac | Generate 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 |
| Monitors | getValidationPredicates | List available predicates for creating validation monitors | β’ Discover supported validation rule types β’ Understand predicate syntax and parameters β’ Build complex validation conditions |
| Data operations | getQueriesForTable | Retrieve 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 operations | getQueryData | Get 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/Catalog | getTable | Get 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/Catalog | search | Search 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/Catalog | getDomains | List available domains in your Monte Carlo workspace | β’ Understand data organization and ownership β’ Filter other operations by domain β’ Navigate domain-based access controls |
| Dependencies | getAssetLineage | Trace 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 |
| Dependencies | getDownstreamBiReports | Find 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 cases | getUseCases | Get 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 cases | getUseCaseTableSummary | Get table criticality counts for a specific use case | β’ Assess monitoring coverage by criticality level β’ Prioritize tables for monitoring β’ Understand distribution of critical assets |
| Use cases | getUseCaseTables | Get 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 |
| Dashboards | createCustomDashboardWidget | Generate validated widget JSON for Monte Carlo custom dashboards | β’ Create charts, graphs, and tables for dashboards β’ Visualize data quality metrics β’ Build custom monitoring dashboards |
| Other | testConnection | Verifies connectivity and authentication with the Monte Carlo API | β’ Test MCP setup during initial configuration β’ Validate credentials and network connectivity β’ Troubleshoot connection issues |
| Other | getUser | Get current user information and permissions | β’ Verify authentication and user context β’ Check user permissions and access levels β’ Validate user-specific configurations |
| Other | getCurrentTime | Get 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/mcpThe 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
idandsecret. Store them securely.
Setup in Cursor
- Open Cursor β Settings.
- Select MCP & Integrations.
- Click Add Custom MCP. Cursor will open your
mcp.json. If you have no MCPs yet, it looks like:
{
"mcpServers": {
}
}- 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>"
]
}
}
}- Save
mcp.jsonand return to Settings β MCP & Integrations. You should see a monte-carlo toggle.
- Turn it on. Open an Agent Chat in Cursor and type:
Test Monte Carlo MCP connection. You should see it call thetestConnectiontool (in some versions it may appear astest_connection).
Setup in Visual Studio Code
- Open βShow and Run Commandsβ (SHIFT+CMD+P in Mac or SHIFT+Ctrl+P in Windows)
- Type βMCP: Open User Configurationβ
- This will open the
mcp.jsonfile, which should look something like this:
{
"servers": {}
}- 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": []
}- Save
mcp.jsonand click on the βStartβ button over the βmonte-carloβ MCP Server configuration
- Now the MCP Server should turn to βRunningβ:
- Open the Chat screen and make sure the βAgentβ mode is selected.
- Type:
Test Monte Carlo MCP connection. You should see it call thetestConnectiontool (in some versions it may appear astest_connection).
Setup in Claude Desktop
- Open Claude β Settings.
- Select Developer.
- 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": {
}
}- 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>"
]
}
}
}- Save
claude_desktop_config.jsonand close Claude. Open it again and return to Settings β Developer. You should see a monte-carlo MCP Server in status Running.
- Go to New Chat and type:
Test Monte Carlo MCP connection. You should see it call thetestConnectiontool (in some versions it may appear astest_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
npxis available on your PATH; theyflag auto-installsmcp-remoteif missing.
- Verify the URL (prod vs dev) and that it ends with
- 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>orx-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.
- Reopen Settings β MCP & Integrations or restart Cursor to reload
Check and install Node.js + npm
Quick check
node -v && npm -v && npx -v
# Optional: verify the shim can run
npx -y mcp-remote --versionInstall tips
- macOS:
brew install nodeor (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.comregistry.npmjs.org(first run ofnpxfetchesmcp-remote)
One-liner sanity checks for MCP Server connection with curl
curlThese 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).StatusCodeUpdated 2 days ago
