# Mode Analytics MCP for AI Agents AI Agent Connect

> Mode Analytics MCP lets you manage collaborative data analysis via your AI agent. You can list spaces, query report details, trigger new runs with custom parameters, and audit the underlying SQL logic for your reports without switching tabs.

## Overview
- **Category:** brain-trust
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_SRi8OhPiH6AqqyQpnSFSA21WRVtjdvVcCqhb8EAY/ai-agent-connect
- **Tags:** sql-analytics, data-visualization, collaborative-data, python-notebooks, data-science, report-automation

## Description

This Connector brings your Mode Analytics workspace directly into your conversation with your agent, letting you handle data science and business intelligence tasks without leaving your current window. Usually, checking a report's status or digging into the SQL logic behind a dashboard requires a dozen clicks and multiple browser tabs. You have to navigate through spaces, find the right report, and then hunt for the underlying query. This tool removes that friction. You can simply ask your agent to pull the SQL for a specific report, list all the reports in a marketing space, or check if a recent run has finished. It handles the navigation and metadata retrieval so you can stay focused on the actual analysis. Because Vinkius makes it easy to connect these types of tools, you can bridge the gap between your raw data and your daily workflow instantly. Whether you're auditing data lineage to ensure metric consistency or triggering new runs with custom parameters to get fresh numbers, this Connector puts the power of your Mode environment into a natural chat interface. You get a direct line to your data without the overhead of manual navigation or constant context switching.

## Tools

### run_mode_report
Trigger a new run for a specific report. This lets you start data processing immediately via your agent.

### get_mode_account
Get authenticated account details. Use this to verify your connection to the workspace.

### get_mode_report_run
Get details for a specific report run. This helps you see exactly when a run started or finished.

### list_mode_members
List workspace members. This helps you see who has access to your analytical environment.

### list_mode_spaces
List Mode Analytics spaces. Use this to get an overview of your entire workspace structure.

### get_mode_report
Get details for a specific report. Use this to pull metadata like descriptions or IDs for a report.

### list_mode_definitions
List calculated field definitions. This ensures your metrics remain consistent across different reports.

### list_mode_queries
List SQL queries in a report. Use this to peek under the hood at the logic powering your data.

### list_mode_report_runs
List runs for a report. This gives you a history of every time a specific report was executed.

### list_mode_reports
List reports in a space. This lets you browse all available content in a specific workspace area.

## Prompt Examples

**Prompt:** 
```
Show me the SQL for the 'Monthly Sales' report.
```

**Response:** 
```
I've pulled the SQL query for the Monthly Sales report:

```sql
SELECT 
  date_trunc('month', order_date) AS month, 
  SUM(total_amount) AS total_sales
FROM orders
WHERE status = 'completed'
GROUP BY 1
ORDER BY 1 DESC;
```

This query aggregates total sales by month for all completed orders.
```

**Prompt:** 
```
Is the 'User Retention' report finished running?
```

**Response:** 
```
I've checked the latest run for the User Retention report.

*   **Run ID:** `run_98765`
*   **Status:** ✅ Completed
*   **Finished At:** 2023-10-27 14:22:01 UTC
*   **Duration:** 42 seconds

Your data is ready for analysis.
```

**Prompt:** 
```
List all reports in the 'Finance' space.
```

**Response:** 
```
I found 5 reports in the Finance space:

| Report Name | ID | Last Run |
| :--- | :--- | :--- |
| Quarterly Tax Summary | `rep_111` | 2 hours ago |
| Payroll Overview | `rep_222` | 1 day ago |
| OpEx Breakdown | `rep_333` | 4 hours ago |
| Net Profit Margin | `rep_444` | 5 hours ago |
| Revenue Forecast | `rep_555` | 3 hours ago |
```

## Capabilities

### Trigger report runs
Start a new run for a specific report with custom parameters directly from your chat.

### Audit SQL queries
View the underlying SQL queries for any report to understand the data logic.

### Browse workspace spaces
List all spaces and reports within your Mode Analytics environment.

### Check run statuses
Get the current status and details of any specific report run.

### Track field definitions
List calculated field definitions to ensure your metrics are consistent.

## Use Cases

### Auditing a suspicious metric
An analyst needs to know why a Churn number looks wrong. They ask the agent to show the SQL query for the Churn report using list_mode_queries.

### Browsing marketing assets
A manager needs to see what reports are available in the Marketing space. They ask the agent to list all reports in that space using list_mode_reports.

### Refreshing campaign data
A growth lead needs to refresh a specific campaign's data. They tell the agent to trigger a new run for the campaign report using run_mode_report.

### Checking workspace permissions
A new team member needs to know who has access. They ask the agent to list all members in the workspace using list_mode_members.

## Benefits

- Stop tab-switching by using list_mode_reports and list_mode_spaces to browse your data environment directly in your chat.
- Audit your data lineage instantly with list_mode_queries to see the exact SQL logic without opening the report editor.
- Ensure metric consistency across the company by using list_mode_definitions to check calculated fields on demand.
- Speed up your workflow by using run_mode_report to trigger new data runs with custom parameters from your agent.
- Monitor your team's activity and report usage easily with list_mode_members and get_mode_account for better oversight.
- Track the progress of long-running jobs using get_mode_report_run to see if your data is ready for analysis.

## How It Works

The bottom line is you can manage your entire Mode Analytics reporting suite through natural conversation.

1. Subscribe to the Connector and provide your Mode API Token, API Secret, and Workspace slug.
2. Connect the Connector to your preferred client like Claude, Cursor, or Windsurf.
3. Ask your agent to list reports, trigger runs, or audit SQL queries.

## Frequently Asked Questions

**Can Mode Analytics MCP help me audit my SQL?**
Yes. You can ask your agent to pull the exact SQL queries for any report in your workspace. This helps you verify data logic without manually opening the report editor.

**How do I trigger a report run using this Connector?**
Simply tell your agent to run a specific report. You can even include custom parameters in your request to filter the data or select specific dates.

**Can I see who has access to my Mode Analytics workspace?**
Yes, you can ask your agent to list all workspace members. This makes it easy to check permissions and see who is currently active in your environment.

**Does this help with data consistency across reports?**
Absolutely. You can use the agent to check calculated field definitions. This ensures that the same metrics are being calculated identically across different reports.

**Can I see the status of a report run?**
Yes. You can ask the agent for the status of a specific run. It will tell you if the report is still enqueued, running, or if it has finished successfully.

**Is it easy to set up Mode Analytics MCP?**
It's very straightforward. Once you have your Mode API Token and Workspace slug, you just plug them into your Connector client and you're ready to go.

**How do I find my API Token and Secret?**
In Mode, click on your name in the top left, go to **My Account** > **API Tokens**. There you can create and manage your API keys.

**What is the Workspace slug?**
The Workspace slug is the unique identifier for your organization in the Mode URL (e.g., `app.mode.com/org_name`). The `org_name` part is your workspace slug.

**Can I provide parameters when running a report?**
Yes! The `run_mode_report` action accepts an optional `parameters` field where you can provide a JSON string of keys and values used by the report.