:zap: FLASH(Framework Layer for Agentic Serverless Headless Data360)
:ai-bot:A Headless, API-Native & Agentic AI Framework for Salesforce Data360
FLASH is a headless, API-native, agentic AI framework that transforms how Salesforce Data360 Implementations are delivered and operated. Built on the custom Model Context Protocol (MCP), FLASH exposes 60+ intelligent APIs and operational tools that allow AI agents to autonomously execute Data360 workflows through natural language — eliminating dependency on manual UI-driven configuration. From ingestion and modeling to segmentation, querying, and insights generation, FLASH enables organizations to operate Salesforce Data360 through a scalable headless and agentic architecture, accessible from:
- :computer: Cursor
- :desktop_computer: Claude Desktop
- :gear: Agentforce
- :ai-bot:Custom AI Agents
FLASH creates a reusable AI execution layer that standardizes, accelerates, and simplifies Data 360 operations across the enterprise.
Table of Contents
- Prerequisites
- Step-by-Step Setup
- Verify It Works
- Tool Catalog
- Configuration Reference
- Architecture
- Security
- Troubleshooting
Prerequisites
Before starting, make sure you have:
Step-by-Step Setup
Follow these steps in order. The entire setup takes about 15 minutes.
Step 1: Clone the Repository
git clone https://github.com/rishiganesh25/data360-mcp.git
cd data360-mcp
Step 2: Create a Python Virtual Environment
python3 -m venv .venv
Activate it:
# macOS / Linux
source .venv/bin/activate
# Windows (PowerShell)
.\.venv\Scripts\Activate.ps1
# Windows (cmd)
.\.venv\Scripts\activate.bat
You should see (.venv) in your terminal prompt.
Step 3: Install Dependencies
pip install -r requirements.txt
This installs the MCP SDK, requests, pydantic, and other required packages.
Step 4: Install the Salesforce CLI and log in
The server does not use a Connected App consumer secret. It reads the access token from an authenticated Salesforce CLI org, and it will not start unless the sf command is installed.
npm install -g @salesforce/cli
sf org login web --alias data360
Use --instance-url https://test.salesforce.com for a sandbox, or your My Domain URL for a production org. The user must have Data Cloud permissions.
Step 5: Verify the Server Can Start
python server.py
You should see Starting MCP server in the output. Press Ctrl+C to stop it.
Step 6: Point the server at that org
cp .env.example .env
chmod 600 .env
Set the alias you used above:
SF_TARGET_ORG=data360
Leave it unset to use the CLI's default target org. Do not put a consumer key or consumer secret in this file.
Step 7: Wire It Into Your MCP Client
Pick the MCP client you're using and follow the config below.
In all examples, replace
/absolute/path/to/data360-mcpwith the actual full path where you cloned the repo (e.g.,/Users/yourname/projects/data360-mcp).If you used a virtual environment (Step 2), replace
pythonwith.venv/bin/pythonin the command.
Option A: Claude Code (CLI or VS Code Extension)
Create or edit .mcp.json in your project root (or ~/.claude/mcp.json for global access):
{
"mcpServers": {
"datacloud": {
"type": "stdio",
"command": "bash",
"args": [
"-c",
"set -a && source /absolute/path/to/data360-mcp/.env && set +a && cd /absolute/path/to/data360-mcp && .venv/bin/python server.py"
]
}
}
}
Option B: Cursor
Open Cursor Settings > MCP > Add new global MCP server, or edit ~/.cursor/mcp.json:
{
"mcpServers": {
"datacloud": {
"command": "bash",
"args": [
"-c",
"set -a && source /absolute/path/to/data360-mcp/.env && set +a && cd /absolute/path/to/data360-mcp && .venv/bin/python server.py"
],
"disabled": false,
"autoApprove": [
"list_tables",
"describe_table",
"list_data_streams",
"list_data_model_objects",
"list_segments",
"list_calculated_insights"
]
}
}
}
Tip:
autoApprovelists read-only tools that won't prompt for confirmation each time.
Option C: Claude Desktop
Edit your config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"datacloud": {
"command": "bash",
"args": [
"-c",
"set -a && source /absolute/path/to/data360-mcp/.env && set +a && cd /absolute/path/to/data360-mcp && .venv/bin/python server.py"
]
}
}
}
Step 8: Use it
- Restart your MCP client (or reload the MCP server list)
- Ask it something — for example: "List all tables in Data Cloud"
If the CLI session expires, run sf org login web --alias data360 again. The server does not open its own browser login and does not store a token cache of its own. Delete tools stay refused until the call includes confirm=true after you approve the delete.
Verify It Works
Try these prompts in your MCP client to confirm everything is connected:
If any of these fail, check the Troubleshooting section.
Tool Catalog
Query & Schema (3 tools)
Data Streams (6 tools)
Data Lake Objects (3 tools)
Data Model Objects (5 tools)
DLO-DMO Mappings (5 tools)
Segments (5 tools)
Activations (4 tools)
Connectors (5 tools)
Data Action Targets (4 tools)
Data Actions (2 tools)
Data Spaces (5 tools)
Data Transforms (4 tools)
Calculated Insights (2 tools)
Data Graphs (4 tools)
Identity Resolution (1 tool)
Retrievers & Search (2 tools)
Salesforce REST (3 tools)
Configuration Reference
Architecture
flowchart LR
Client["MCP Client<br/>(Claude Code / Cursor / Claude Desktop)"] -->|stdio| Server["server.py<br/>FastMCP"]
Server --> OAuth["oauth.py<br/>sf org display"]
Server --> SQL["connect_api_dc_sql.py<br/>SQL query + row cap"]
Server --> DC["connect_api_datacloud.py<br/>Connect REST API"]
OAuth -->|access token| SF["Salesforce CLI session"]
SQL -->|POST /ssot/query-sql| DCAPI["Data Cloud Query API"]
DC -->|/ssot/*| ConnectAPI["Data Cloud Connect API"]
DC -->|/sobjects/*| RestAPI["Salesforce REST API"]
Security
- Salesforce CLI session — the server uses
sf org displayfor the org named bySF_TARGET_ORG. It does not store a Connected App consumer secret. - Mutations require
confirm=true— delete, update, data-action, and data-action-target tools refuse to run until that flag is set after an explicit approval. Read-only tools are marked withreadOnlyHint; deletes and updates are markeddestructiveHint. - External destinations are allowlisted — webhook and Marketing Cloud endpoints must be
httpshostnames listed inMCP_ALLOWED_WEBHOOK_HOSTS. - Tool categories can be disabled — set
MCP_ENABLE_WRITE_TOOLS=falseorMCP_ENABLE_DESTRUCTIVE_TOOLS=falsewhen the connected user should not have that access. sf_rest_apiis GET-only — allowed paths are Data Cloud/ssot/resources and sObject describe. Tooling API, SOQL, composite, and write methods are refused.create_sobject_recordis allowlisted — only named Data Cloud configuration objects can be created.- Path identifiers are validated — names placed in REST paths must match letters, numbers, underscores, and hyphens, then they are URL-encoded.
- Query results are capped —
querystops atMAX_QUERY_ROWS. The complete response, including metadata, must fit inMAX_QUERY_BYTES; an oversized row is omitted rather than returned. - Usage logs stay local and private — they are written to
~/.data360-mcp/usage_logswith0700/0600permissions. Arguments and errors are stored as SHA-256 hashes. - Rate limits are shared by category — all destructive tools share 10 calls per minute, all writes share 20, and all reads share 120. Override with
MCP_DESTRUCTIVE_RATE_LIMIT,MCP_WRITE_RATE_LIMIT, andMCP_READ_RATE_LIMIT. - Tool definitions are pinned — startup compares the tool list with
tool_definitions.sha256and stops on a mismatch. - Local transport only — the server communicates via stdio and does not listen on a network port.
Troubleshooting
Examples
The examples/ folder has standalone scripts using the same OAuth + API helpers:
# Count active data streams
python examples/count_streams.py
# Dump org DMO metadata
python examples/dump_metadata.py
Useful for verifying the Salesforce CLI login works before wiring up an MCP client.
Contributing
See CONTRIBUTING.md. Bug reports and PRs welcome.
License
Apache License 2.0. See SECURITY.md for vulnerability disclosure.