View as Markdown

Excel Integration

Manage Excel workbooks, worksheets, and tables

The Excel integration provides access to manage Excel workbooks, worksheets, and tables through the Integrate MCP server.

Installation

The Excel integration is included with the SDK:

import { excelIntegration } from "integrate-sdk/server";

Setup

1. Create an Excel OAuth App

  1. Go to Azure Portal — App Registrations
  2. Create a new OAuth application
  3. Configure your redirect URI
  4. Note your Client ID and Client Secret

2. Configure the Integration on Your Server

Add the Excel integration to your server configuration. The integration automatically reads EXCEL_CLIENT_ID and EXCEL_CLIENT_SECRET from your environment variables:

import { createMCPServer, excelIntegration } from "integrate-sdk/server";
 
export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    excelIntegration({
    }),
  ],
});

You can override the environment variables by passing explicit values:

excelIntegration({
  clientId: process.env.CUSTOM_EXCEL_ID,
  clientSecret: process.env.CUSTOM_EXCEL_SECRET,
});

3. Client-Side Usage

The default client automatically includes all integrations. You can use it directly:

import { client } from "integrate-sdk";
 
await client.authorize("excel");
const result = await client.excel.list({});
 
console.log(result);

If you're using a custom client, add the integration to the integrations array:

import { createMCPClient, excelIntegration } from "integrate-sdk";
 
const customClient = createMCPClient({
  integrations: [excelIntegration()],
});

Configuration Options

export interface ExcelIntegrationConfig {
  /** Microsoft OAuth client ID (defaults to EXCEL_CLIENT_ID env var) */
  clientId?: string;

Tools

excel_add_table_rows

Append rows to a table

export interface ExcelAddTableRowsParams {
    /** Workbook item ID */
    item_id: string;

excel_add_worksheet

Add a new worksheet to a workbook

export interface ExcelAddWorksheetParams {
    /** Workbook item ID */
    item_id: string;

excel_clear_range

Clear contents and/or formatting from a cell range

export interface ExcelClearRangeParams {
    /** Workbook item ID */
    item_id: string;

excel_create

Create a new empty .xlsx workbook in OneDrive

export interface ExcelCreateParams {
    /** File name (.xlsx appended automatically if missing) */
    name: string;

excel_create_table

Create a table from a cell range

export interface ExcelCreateTableParams {
    /** Workbook item ID */
    item_id: string;

excel_delete

Delete an Excel workbook permanently

export interface ExcelDeleteParams {
    /** Workbook item ID */
    item_id: string;

excel_delete_worksheet

Delete a worksheet from a workbook

export interface ExcelDeleteWorksheetParams {
    /** Workbook item ID */
    item_id: string;

excel_get

Get metadata for an Excel workbook

export interface ExcelGetParams {
    /** Workbook item ID */
    item_id: string;

excel_get_range

Get values, formulas, and formatting from a cell range

export interface ExcelGetRangeParams {
    /** Workbook item ID */
    item_id: string;

excel_get_table_rows

Get rows from a table

export interface ExcelGetTableRowsParams {
    /** Workbook item ID */
    item_id: string;

excel_get_used_range

Get the bounding range of all data in a worksheet

export interface ExcelGetUsedRangeParams {
    /** Workbook item ID */
    item_id: string;

excel_list

Search for Excel workbooks

export interface ExcelListParams {
    /** Filter by name (default: searches .xlsx) */
    query?: string;

excel_list_tables

List all tables in a worksheet

export interface ExcelListTablesParams {
    /** Workbook item ID */
    item_id: string;

excel_list_worksheets

List all worksheets in a workbook

export interface ExcelListWorksheetsParams {
    /** Workbook item ID */
    item_id: string;

excel_share

Create a sharing link for an Excel workbook

export interface ExcelShareParams {
    /** Workbook item ID */
    item_id: string;

excel_update_range

Update cell values in a range

export interface ExcelUpdateRangeParams {
    /** Workbook item ID */
    item_id: string;

Notes

  • Category: Productivity
  • Authentication mode: OAuth