logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

cdata-salesforce-mcp-gateway

A read-only Model Context Protocol (MCP) server designed to facilitate natural language interaction with live Salesforce data. It uses the CData JDBC Driver to abstract Salesforce entities (tables/columns) for consumption by large language models without requiring users to master SQL.

Author

cdata-salesforce-mcp-gateway logo

CDataSoftware

MIT License

Quick Info

GitHub GitHub Stars 0
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

cdatasoftwarecdatacloudserver cdataservices cdatasoftwarecdatasoftware salesforce

CData Salesforce MCP Endpoint Implementation

This repository provides a dedicated, read-only Model Context Protocol (MCP) service layer tailored for Salesforce data access, engineered via CData's technology stack.

:warning: Crucial Caveat: This specific deployment facilitates only data retrieval operations. For comprehensive CRUD (Create, Read, Update, Delete) functionalities and streamlined setup, users are strongly advised to investigate the complementary, full-featured CData MCP Server for Salesforce (beta).

Core Objective

The primary goal is enabling sophisticated Large Language Models (LLMs), such as Claude Desktop, to execute data queries against live Salesforce organizational information. This is achieved by wrapping the robust capabilities of the CData JDBC Driver for Salesforce, which presents Salesforce as structured, queryable SQL models.

This server acts as a mediator, translating natural language requests into accessible tool calls (schema discovery and query execution) via the MCP specification, eliminating the need for manual SQL crafting by the AI.

Deployment and Configuration Workflow

Follow these steps to compile and configure the server component:

  1. Source Code Acquisition: bash git clone https://github.com/cdatasoftware/salesforce-mcp-server-by-cdata.git cd salesforce-mcp-server-by-cdata

  2. Artifact Generation (Build): bash mvn clean install

    This compilation step results in the bundled JAR file: CDataMCP-jar-with-dependencies.jar 3. Driver Acquisition: Obtain the necessary CData JDBC Driver for Salesforce from: https://www.cdata.com/drivers/salesforce/download/jdbc 4. Driver Activation (Licensing): * Locate the installed driver's root directory (e.g., C:\Program Files\CData\CData JDBC Driver for Salesforce\ on Windows). * Execute the licensing utility: bash java -jar cdata.jdbc.salesforce.jar --license

    • Provide required user details and the license key (or "TRIAL").
    • Connection String Configuration:
    • Initiate the connection utility: bash java -jar cdata.jdbc.salesforce.jar

    • Within the utility, define connection parameters (OAuth handling may require browser interaction).

    • Verify connectivity via the "Test Connection" button.
    • Capture and save the resulting JDBC connection string.
    • Parameter Definition via .prp File (Property File): Create a configuration file (e.g., salesforce.prp) defining the server's behavior. Key settings include:
    • Prefix: Namespace for exposed tools.
    • ServerName/ServerVersion: Identification metadata.
    • DriverPath: Absolute path to the CData JDBC JAR file.
    • DriverClass: Fully qualified name of the driver implementation class.
    • JdbcUrl: The connection string obtained in the previous step.
    • Tables: Optional comma-separated list to restrict data exposure; leave empty for full access. env Prefix=salesforce ServerName=CDataSalesforceEndpoint ServerVersion=1.0 DriverPath=PATH\TO\cdata.jdbc.salesforce.jar DriverClass=cdata.jdbc.salesforce.SalesforceDriver JdbcUrl=jdbc:salesforce:InitiateOAuth=GETANDREFRESH; Tables=

Alternative: Environment Variable Overrides

For containerized deployments or simplified execution, configuration can be managed via environment variables instead of a .prp file:

Defined Environment Variables

  • CDATA_JDBC_URL - Mandatory - The connection URI.
  • CDATA_PREFIX - (Optional) Tool prefix (default: "salesforce").
  • CDATA_DRIVER_CLASS - (Optional) Driver class name (default applies if using bundled JAR).
  • CDATA_DRIVER_PATH - (Optional) Path to external JAR (ignored if bundled).
  • CDATA_TABLES - (Optional) Comma-delimited list of accessible tables.
  • CDATA_LOG_FILE - (Optional) Specifies an output path for logging.

Driver Bundling for Self-Contained Executable

To integrate the driver directly into the final artifact: 1. Place the CData JDBC JAR (e.g., cdata.jdbc.salesforce.jar) into a project lib subdirectory. 2. Execute mvn clean install. The Maven Shade Plugin incorporates these classes into CDataMCP-jar-with-dependencies.jar.

Execution with Variables

bash

Minimum required setup

export CDATA_JDBC_URL="jdbc:salesforce:InitiateOAuth=GETANDREFRESH;" java -jar CDataMCP-jar-with-dependencies.jar

Advanced setup using variables

export CDATA_PREFIX="sf_data" export CDATA_JDBC_URL="jdbc:salesforce:InitiateOAuth=GETANDREFRESH;" java -jar CDataMCP-jar-with-dependencies.jar

Integration with LLM Interfaces (e.g., Claude Desktop)

To expose this service to an AI client, update its configuration file (e.g., claude_desktop_config.json) by appending a new entry to the mcpServers object. The specific structure depends on whether you reference the .prp file or rely on environment variables.

Configuration using .prp file:

Windows Example:

{ "mcpServers": { "{classname_dash}": { "command": "PATH\TO\java.exe", "args": [ "-jar", "PATH\TO\CDataMCP-jar-with-dependencies.jar", "PATH\TO\salesforce.prp" ] } } }

Configuration using Environment Variables (Linux/Mac Example):

{ "mcpServers": { "salesforce": { "command": "/PATH/TO/java", "args": [ "-jar", "/PATH/TO/CDataMCP-jar-with-dependencies.jar" ], "env": { "CDATA_JDBC_URL": "jdbc:salesforce:InitiateOAuth=GETANDREFRESH;" } } } }

After modifying the client configuration, restart or refresh the client application for the new server definition to load.

Operating the Service

The server runs based on standard input/output (stdio) communication, suitable only for clients running locally alongside the server process.

To launch independently: bash java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/Salesforce.prp

AI Interaction Capabilities

Once active, the AI client gains access to schema inspection and data retrieval tools:

  • {servername}_get_tables: Fetches the available data structure names (tables). Output is CSV format.
  • {servername}_get_columns: Retrieves the schema definition for a specified table. Output is CSV format.
  • {servername}_run_query: Executes arbitrary SQL SELECT statements against Salesforce.

Example Query Prompts: * "Determine the correlation between successful sales opportunities and the corresponding account's primary sector." * "Count the number of pending service requests associated with the 'Critical' priority level."

JSON-RPC Tool Invocation Schemas

For programmatic invocation conforming to JSON-RPC 2.0:

salesforce_run_query Sample Payload

{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "salesforce_run_query", "arguments": { "sql": "SELECT Name, AnnualRevenue FROM [Account] WHERE Industry = 'Technology'" } } }

Support and Licensing

This MCP server is distributed under the permissive MIT License. For technical assistance or connection difficulties, please utilize the CData Support Team or engage with the CData Community.

Supported Data Ecosystems (Via CData JDBC Driver)

The underlying driver technology supports connectivity to a vast array of data sources beyond Salesforce, including but not limited to: BigQuery, Snowflake, Dynamics 365, HubSpot, Oracle, SAP, SQL Server, and hundreds more listed below.

... [Rest of the extensive table content truncated for brevity] ...
AccessAct CRMAct-OnActive Directory
ActiveCampaignAcumaticaAdobe AnalyticsAdobe Commerce
ADPAirtableAlloyDBAmazon Athena
Zoho BooksZoho CreatorZoho CRMZoho Inventory
Zoho ProjectsZuora... Dozens More

See Also

`