- Home
- MCP servers
- Salesforce
Salesforce
- java
0
GitHub Stars
java
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
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.
How to use
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.
How to install
# 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.prp
Configuration and running notes
The 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.
Security and usage notes
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.
Troubleshooting
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.
Available tools
salesforce_get_tables
Retrieves a list of tables (data sources) available from Salesforce. Output is in CSV with headers.
salesforce_get_columns
Retrieves a list of columns for a specified table. Output is in CSV with headers.
salesforce_run_query
Executes a SQL SELECT query against Salesforce data and returns results.