home / mcp / salesforce mcp server
This read-only MCP Server allows you to connect to Salesforce data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out the first managed MCP platform: CData Connect AI (https://www.cdata.com/ai/).
Configuration
View docs{
"mcpServers": {
"cdatasoftware-salesforce-mcp-server-by-cdata": {
"command": "java",
"args": [
"-jar",
"CDataMCP-jar-with-dependencies.jar",
"/PATH/TO/salesforce.prp"
],
"env": {
"CDATA_JDBC_URL": "jdbc:salesforce:InitiateOAuth=GETANDREFRESH;"
}
}
}
}You can query live Salesforce data through a lightweight MCP server that exposes Salesforce data via a simple MCP interface. This enables language models to fetch up-to-date information without writing SQL, by treating Salesforce data as structured, queryable sources. The server runs locally and is read-only, making it safe for querying live data in a controlled environment.
You connect an MCP client to the local MCP server and use built-in tools to read data. After the server is running, you can ask questions like “What is the correlation between my closed won opportunities and the account industry?” or “How many open tickets do I have in the SUPPORT project?” The client will automatically retrieve data through the exposed MCP tools without requiring you to craft SQL queries.
# Prerequisites: Java installed on your machine
# 1. Clone the project
git clone https://github.com/cdatasoftware/salesforce-mcp-server-by-cdata.git
cd salesforce-mcp-server-by-cdata
# 2. Build the server
mvn clean install
# This creates CDataMCP-jar-with-dependencies.jar in the target directory# Prerequisites: Java installed and Maven available
# 3. Download and install the CData JDBC Driver for Salesforce
# 4. License the CData JDBC Driver
# Windows example (paths depend on your installation):
# C:\Program Files\CData\CData JDBC Driver for Salesforce\
# java -jar cdata.jdbc.salesforce.jar --license
# 5. Configure the connection to Salesforce using the JDBC Driver
# Run the connection utility and test the connection, then copy the connection string
java -jar cdata.jdbc.salesforce.jar
# 6. Create a .prp file (e.g., salesforce.prp) with your connection details
# Example content (adjust paths to your environment):
Prefix=salesforce
ServerName=CDataSalesforce
ServerVersion=1.0
DriverPath=PATH\\TO\\cdata.jdbc.salesforce.jar
DriverClass=cdata.jdbc.salesforce.SalesforceDriver
JdbcUrl=jdbc:salesforce:InitiateOAuth=GETANDREFRESH;
Tables=# 7. Run the MCP server with the prepared prp file
java -jar CDataMCP-jar-with-dependencies.jar /PATH/TO/salesforce.prpThe server is exposed locally via stdio, so it can be used with clients running on the same machine. To run with a prepared configuration, use the command shown above and ensure your prp file contains the correct JDBC connection details.
If you choose to run via environment variables, you can provide the JDBC URL and other options as environment variables. For example, you can set CDATA_JDBC_URL to the connection string and run the JAR without a prp file, or bundle the CData JAR inside the final artifact.
This MCP server is read-only, designed for safely querying Salesforce data from language models. Do not enable write or delete capabilities in this setup.
If you are using OAuth, you will complete authentication in the browser during the connection test. Ensure your OAuth flow is configured correctly in Salesforce to permit the MCP server to access the required data.
If the server does not appear in your MCP client, ensure you have fully stopped and restarted the client after starting the MCP server. Check that the JDBC connection string is correct and test the connection from the JDBC utility. If you encounter connection issues, verify OAuth configuration and permissions in Salesforce.
Retrieves a list of tables (data sources) available from Salesforce. Output is in CSV with headers.
Retrieves a list of columns for a specified table. Output is in CSV with headers.
Executes a SQL SELECT query against Salesforce data and returns results.