cdata-veeva-model-protocol-gateway
Facilitates querying live Veeva enterprise data via a simplified Model Context Protocol (MCP) endpoint. This abstraction layer translates natural language inquiries into data retrievals, eliminating the prerequisite for users to write SQL. It leverages the CData JDBC Driver for Veeva to interface with the underlying data structures.
Author

CDataSoftware
Quick Info
Actions
Tags
CData Veeva Data Access Server via MCP
This utility establishes a server implementation compliant with the Model Context Protocol (MCP) specifically tailored for read-only access to Veeva systems, powered by CData's connectivity solutions.
:heavy_exclamation_mark: Important Notice: This specific deployment is limited to read operations. For comprehensive data manipulation capabilities (CRUD+Actions) and a streamlined deployment experience, consider utilizing the complimentary CData MCP Server for Veeva (Beta release).
Core Functionality
This read-only MCP server was engineered to empower Large Language Models (such as Claude Desktop instances) to interrogate live data residing within Veeva environments. This capability is realized through the integration of the CData JDBC Driver for Veeva.
The CData JDBC Driver serves as the intermediary, mapping Veeva's native schema into a structured, relational SQL model accessible via JDBC. Our server component then wraps this driver, exposing the Veeva data through an intuitive MCP interface. Consequently, AI agents can dynamically fetch current data by formulating plain English questions, completely bypassing the need for manual SQL construction.
Implementation Workflow
-
Source Code Acquisition: bash git clone https://github.com/cdatasoftware/veeva-mcp-server-by-cdata.git cd veeva-mcp-server-by-cdata
-
Compilation: Execute the build process using Maven: bash mvn clean install
This action generates the necessary executable JAR:
CDataMCP-jar-with-dependencies.jar3. Driver Acquisition: Procure and install the CData JDBC Driver for Veeva from: https://www.cdata.com/drivers/veeva/download/jdbc 4. Driver Activation/Licensing: * Navigate to the driver's installation directory, usually located at: * (Windows)C:\Program Files\CData\CData JDBC Driver for Veeva\* (Mac/Linux)/Applications/CData JDBC Driver for Veeva/* Run the licensing utility: * Executejava -jar cdata.jdbc.veevavault.jar --license* Input your credentials and use "TRIAL" or your specific license key when prompted. 5. Data Connection Configuration: * Launch the connection utility via command line:java -jar cdata.jdbc.veevavault.jar- Within the utility, define and test your connection string (e.g., connecting to Salesforce as a demonstration).
OAuth Requirement: If authentication relies on OAuth, an in-browser authorization flow will be initiated.
- Upon a successful verification, capture the resulting JDBC Connection String.
- Property File Creation (.prp): Generate a configuration file (e.g.,
veeva.prp) detailing the server metadata and connection parameters: - Prefix: Tool prefix for exposure.
- ServerName: Identifier for the resulting server.
- ServerVersion: Version tag.
- DriverPath: Absolute path to the compiled JDBC driver JAR.
- DriverClass: The fully qualified name of the JDBC driver implementation (e.g.,
cdata.jdbc.veevavault.VeevaVaultDriver). - JdbcUrl: The connection string obtained in the previous step.
- Tables: Specify a list of tables for restricted access; leave empty (
Tables=) for full schema exposure. env Prefix=veevavault ServerName=CDataVeevaVault ServerVersion=1.0 DriverPath=PATH\TO\cdata.jdbc.veevavault.jar DriverClass=cdata.jdbc.veevavault.VeevaVaultDriver JdbcUrl=jdbc:veevavault:InitiateOAuth=GETANDREFRESH; Tables=
- Within the utility, define and test your connection string (e.g., connecting to Salesforce as a demonstration).
Integrating with AI Clients (e.g., Claude Desktop)
-
Client Configuration Update: Modify the client's configuration file (e.g.,
claude_desktop_config.json) to register the new MCP server. Append the entry to themcpServersblock:Windows Path Example:
{ "mcpServers": { "{classname_dash}": { "command": "PATH\TO\java.exe", "args": [ "-jar", "PATH\TO\CDataMCP-jar-with-dependencies.jar", "PATH\TO\veeva.prp" ] }, ... } }
Linux/Mac Path Example:
{ "mcpServers": { "{classname_dash}": { "command": "/PATH/TO/java", "args": [ "-jar", "/PATH/TO/CDataMCP-jar-with-dependencies.jar", "/PATH/TO/veeva.prp" ] }, ... } }
If the configuration file is not in the expected location, relocate it (e.g., to the default Claude Desktop directory): Windows Relocation: bash cp C:\PATH\TO\claude_desktop_config.json %APPDATA%\Claude\claude_desktop_config.json
Linux/Mac Relocation: bash cp /PATH/TO/claude_desktop_config.json /Users/{user}/Library/Application\ Support/Claude/claude_desktop_config.json
-
Client Restart/Refresh: Restart or fully refresh your consuming application (like Claude Desktop) to load the newly defined MCP server definitions.
Troubleshooting Tip: If the server does not appear in the client, ensure the client application process has been completely terminated (check Task Manager on Windows or Activity Monitor on macOS) before relaunching.
Standalone Server Execution
To initiate the MCP server as an independent process: bash java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/Salesforce.prp
Constraint: The server communicates via standard input/output (
stdio), restricting its use to clients running on the identical host machine.
Operational Usage
Once successfully integrated, the AI client gains access to the underlying data model via a suite of generated tools. Direct invocation of these tools is generally unnecessary; users should frame their data requirements in natural language.
Illustrative Queries: * "Analyze the relationship between finalized sales records and the account's designated sector." * "Tally the count of outstanding service requests assigned to the 'SUPPORT' department." * "List all scheduled appointments for today retrieved from the connected calendar system."
Available Service Tools
Tool names are prefixed according to the configuration (e.g., {servername} is substituted with the name derived from your setup, like veeva_vault).
* {servername}_get_tables - Fetches a delimited list of accessible data structures. Use {servername}_get_columns to inspect schema details for a specific table. Output is delivered in CSV format, beginning with column headers.
* {servername}_get_columns - Retrieves the attribute list for a specified table. Cross-reference with {servername}_get_tables for the full inventory. Output is delivered in CSV format, including the header row.
* {servername}_run_query - Executes arbitrary SQL SELECT statements against the data source.
JSON-RPC Interface Examples
For programmatic interaction bypassing the native AI client interface, utilize JSON-RPC 2.0 formatted payloads to invoke the registered tools.
Example: veeva_get_tables Invocation
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "veeva_get_tables", "arguments": {} } }
Example: veeva_get_columns Invocation (Requesting Schema for 'Account')
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "veeva_get_columns", "arguments": { "table": "Account" } } }
Example: veeva_run_query Invocation (Executing a Select Statement)
{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "veeva_run_query", "arguments": { "sql": "SELECT * FROM [Account] WHERE [IsDeleted] = true" } } }
Common Resolution Points
- Server Visibility Issue: If the CData MCP Server is absent in the client application (e.g., Claude Desktop), confirm the client application has been fully shut down (check system processes).
- Data Retrieval Failures: If the client cannot fetch data, re-verify the JDBC connection string configuration against the value generated by the utility tool and ensure it is accurately represented in the
.prpfile. - Data Source Connectivity Problems: For issues preventing a connection to the final data source, engage the CData Support Team for assistance.
- MCP Server Feedback: For general feedback or issues concerning the MCP server functionality itself, please utilize the CData Community.
Software Licensing
This MCP server component is distributed under the permissive MIT License. This grants broad rights for usage, modification, and redistribution, subject only to the terms outlined in the accompanying LICENSE file.
Comprehensive Connector Catalog
[A substantial list of supported external data sources via CData drivers follows, including but not limited to: Salesforce, SAP, Oracle, various cloud storage solutions (S3, GCS), SQL databases (PostgreSQL, SQL Server), and numerous SaaS platforms like Jira, HubSpot, and ServiceNow. Specific support for Veeva CRM and Veeva Vault is confirmed.]
The full list is omitted here for brevity, but the included table demonstrates the vast connectivity supported by the underlying CData driver framework.
Background Context: XMLHttpRequest (WIKIPEDIA Snippet)
XMLHttpRequest (XHR) is a JavaScript API represented by a dedicated object, used to dispatch HTTP requests between a web browser and a remote server. Its methods permit client-side applications to initiate server communications post-page load and receive resulting data asynchronously. XHR is foundational to the technology known as Ajax. Before XHR's widespread adoption, interactivity with servers typically mandated full page reloads initiated by standard hyperlink clicks or form submissions.
Historical Development
The core concept enabling XHR originated around 2000 with Microsoft Outlook developers. It was first integrated into Internet Explorer 5 (1999), though initially using vendor-specific identifiers (ActiveXObject(...)) rather than the standardized XMLHttpRequest naming. By Internet Explorer 7 (2006), this standardized name became universally recognized across major browser engines, including Mozilla's Gecko (2002), Safari 1.2 (2004), and Opera 8.0 (2005).
Standardization Efforts
The W3C published the initial Working Draft specification for the object on April 5, 2006. Level 2 enhancements, introduced in a February 2008 Working Draft, added features for monitoring progress, facilitating cross-domain calls, and stream processing of byte data. These Level 2 features were later folded back into the primary specification by the close of 2011. Development transitioned to WHATWG in late 2012, which now maintains the document using Web IDL.
