cdata-excelonline-mcp-gateway
Provides a read-only interface for querying live data residing in Microsoft Excel Online spreadsheets via the Model Context Protocol (MCP). This server leverages CData's JDBC technology to translate natural language inquiries from AI assistants into accessible relational data structures, bypassing the need for direct SQL comprehension by the end-user.
Author

CDataSoftware
Quick Info
Actions
Tags
CData Gateway for Excel Online via Model Context Protocol (MCP)
This utility establishes a restricted, read-only MCP endpoint to expose Excel Online datasets for consumption by large language models (LLMs) operating within compatible frameworks (e.g., Claude Desktop).
:warning: Limitation Notice: This specific implementation is strictly read-only. For comprehensive CRUD (Create, Read, Update, Delete) operations and streamlined deployment, please explore the full-featured, free beta version of the CData MCP Server for Excel Online here.
Core Functionality
This project encapsulates the CData JDBC Driver for Excel Online within a dedicated MCP server wrapper. The driver interprets Excel Online content as structured relational data sources (SQL models). The wrapper exposes these models through the MCP, enabling AI agents to interrogate the live spreadsheet contents using conversational language rather than structured query language.
Deployment Procedure
Phase 1: Preparation and Compilation
-
Acquire Source Code: Clone the repository: bash git clone https://github.com/cdatasoftware/excel-online-mcp-server-by-cdata.git cd excel-online-mcp-server-by-cdata
-
Artifact Generation: Compile the project using Maven: bash mvn clean install
This step yields the executable JAR:
CDataMCP-jar-with-dependencies.jar
Phase 2: Driver Installation and Licensing
- Download JDBC Driver: Obtain the necessary CData connector: https://www.cdata.com/drivers/excelonline/download/jdbc
- Activate License: Locate the driver's installation directory and execute the licensing utility:
- Path Examples:
- (Windows):
C:\Program Files\CData\CData JDBC Driver for Excel Online\ - (Unix-like):
/Applications/CData JDBC Driver for Excel Online/
- (Windows):
- Execution: Run the command
java -jar cdata.jdbc.excelonline.jar --license, providing your credentials and the trial/production key.
- Path Examples:
Phase 3: Configuration
- Connection String Generation:
- Execute the driver standalone to access the configuration utility:
java -jar cdata.jdbc.excelonline.jar - Define connection parameters (including OAuth authentication if necessary) and save the resulting JDBC connection string upon successful validation.
- Execute the driver standalone to access the configuration utility:
- Property File Creation (.prp): Construct a configuration file (e.g.,
excel-online.prp) detailing the server's metadata and driver specifics: env Prefix=excelonline ServerName=CDataExcelOnline ServerVersion=1.0 DriverPath=PATH\TO\cdata.jdbc.excelonline.jar DriverClass=cdata.jdbc.excelonline.ExcelOnlineDriver JdbcUrl=jdbc:excelonline:InitiateOAuth=GETANDREFRESH; Tables=
Integration with AI Clients (e.g., Claude Desktop)
-
Client Configuration Update: Modify or create the client's configuration file (e.g.,
claude_desktop_config.json) to incorporate the new MCP server endpoint definition under themcpServersblock. The structure below details the command necessary to launch the server wrapper:Windows Launch Command Structure:
{ "mcpServers": { "{classname_dash}": { "command": "PATH\TO\java.exe", "args": [ "-jar", "PATH\TO\CDataMCP-jar-with-dependencies.jar", "PATH\TO\excel-online.prp" ] }, ... } }
Linux/Mac Launch Command Structure:
{ "mcpServers": { "{classname_dash}": { "command": "/PATH/TO/java", "args": [ "-jar", "/PATH/TO/CDataMCP-jar-with-dependencies.jar", "/PATH/TO/excel-online.prp" ] }, ... } }
- Deployment Note: Ensure the configuration file is placed in the client application's designated settings directory (e.g.,
%APPDATA%\Claudeon Windows). - Client Refresh: Restart or reload the host application (e.g., Claude Desktop) to recognize the newly defined data interaction tool.
- Deployment Note: Ensure the configuration file is placed in the client application's designated settings directory (e.g.,
Standalone Server Execution
To operate the gateway independently (e.g., for direct JSON-RPC communication): bash java -jar /PATH/TO/CDataMCP-jar-with-dependencies.jar /PATH/TO/excel-online.prp
Constraint: Communication is strictly over
stdio; the client application must run on the same host machine as the server process.
Interaction Paradigms
Once connected, the AI client gains access to the following primitives for data exploration without manual SQL formulation. Simply pose questions related to the spreadsheet contents.
Example Inquiries: * "Summarize sales figures from the Q3 tab relative to region X." * "Identify all employees listed in the 'Personnel' worksheet who possess 'Senior Engineer' status."
Available MCP Tools
References below use {servername} as the key established in the configuration file.
* {servername}_get_tables: Fetches the schema names (worksheets/tables) available within the connected Excel Online workbook. Output is CSV.
* {servername}_get_columns: Retrieves detailed attribute definitions (column headers) for a specified table. Input requires the table argument. Output is CSV.
* {servername}_run_query: Executes custom SQL SELECT statements against the underlying data model. Input requires the sql argument.
JSON-RPC Protocol Examples (Direct Scripting)
These examples conform to the JSON-RPC 2.0 specification for scripting interactions:
Fetching Available Worksheets
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "excel_online_get_tables", "arguments": {} } }
Inspecting Columns in the "Customer_Records" Sheet
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "excel_online_get_columns", "arguments": { "table": "Customer_Records" } } }
Executing a Specific Data Retrieval
{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "excel_online_run_query", "arguments": { "sql": "SELECT CustomerName, TotalSpent FROM [Sales_Data] WHERE Region = 'West' ORDER BY TotalSpent DESC" } } }
Common Remediation Steps
- Visibility Issue: If the server is not detected by the client, ensure the client application has been fully terminated (check system process monitors like Task Manager/Activity Monitor) and relaunched.
- Data Retrieval Failure: Verify that the JDBC connection string specified in the
.prpfile was correctly copied from the Connection String utility after a successful test. - Connectivity Problems: For source connection failures, consult the CData Support Portal.
- Server Feedback: For issues concerning the MCP gateway itself or general suggestions, engage with the CData User Community.
Governing Agreement
This component is distributed under the permissive MIT License, granting broad rights for utilization, modification, and redistribution, contingent upon adherence to the license terms detailed in the accompanying LICENSE file.
Supported Data Endpoints
This framework is built upon CData technology, supporting an expansive array of data sources beyond Excel Online, including (but not limited to) Salesforce, Google Sheets, SQL Server, Oracle, SharePoint, Snowflake, and hundreds of others detailed in the comprehensive list below.
[Table of Supported Sources Omitted for Brevity: See Original README for full list of 400+ Connectors]
