View as Markdown

Word Integration

Manage Word documents and sharing

The Word integration provides access to manage Word documents and sharing through the Integrate MCP server.

Installation

The Word integration is included with the SDK:

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

Setup

1. Create a Word 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 Word integration to your server configuration. The integration automatically reads WORD_CLIENT_ID and WORD_CLIENT_SECRET from your environment variables:

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

You can override the environment variables by passing explicit values:

wordIntegration({
  clientId: process.env.CUSTOM_WORD_ID,
  clientSecret: process.env.CUSTOM_WORD_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("word");
const result = await client.word.list({});
 
console.log(result);

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

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

Configuration Options

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

Tools

word_copy

Copy a Word document

export interface WordCopyParams {
    /** Document item ID to copy */
    item_id: string;

word_create

Create a new empty .docx file in OneDrive

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

word_delete

Delete a Word document permanently

export interface WordDeleteParams {
    /** Document item ID */
    item_id: string;

word_get

Get metadata for a Word document

export interface WordGetParams {
    /** Document item ID */
    item_id: string;

word_list

Search for Word documents

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

word_share

Create a sharing link for a Word document

export interface WordShareParams {
    /** Document item ID */
    item_id: string;

word_update_content

Update content

export interface WordUpdateContentParams {
    /** Document item ID */
    item_id: string;

Notes

  • Category: Productivity
  • Authentication mode: OAuth