MCP Hub
Back to servers

office-addin-mcp

MCP server for Office add-ins via WebView2/CDP. Provides excel.*, page.*, and addin.* tools.

Registry
Updated
May 1, 2026

Quick Install

npx -y @dsbissett/office-addin-mcp

office-addin-mcp

MCP server for driving Office add-ins and Excel via WebView2 and the Chrome DevTools Protocol.

office-addin-mcp is a Go binary that exposes a high-level tool surface for Excel and browser add-ins running inside WebView2. It speaks the Model Context Protocol over stdio or a local TCP daemon.

v0.1.0 — see CHANGELOG.md

Features

  • 37 Excel tools — read/write ranges, worksheets, tables, charts, pivot tables, and arbitrary Excel.run scripts via embedded Office.js payloads
  • Page interaction — screenshot, snapshot, click, fill, type, hover, navigate, evaluate, console log, network log, and more
  • Add-in lifecycle — detect, launch, and stop add-ins; open task-pane dialogs
  • ~411 raw CDP methods — code-generated from Chrome's protocol JSON, hidden by default (--expose-raw-cdp to enable)
  • Daemon mode — persistent local server with automatic session reconnect for low-latency repeated calls
  • Stdio mode — pipe-friendly MCP transport for agents that read/write JSON on stdin/stdout

Requirements

RequirementNotes
Excel + Windows 10/11Required for excel.* and addin.* tools
Node.js 14+For npx install
Go 1.22+Build from source only
macOS / LinuxSupported for page.* / cdp.* tools against headless Chrome

Install

npm (recommended)

npm install -g @dsbissett/office-addin-mcp

Or run without installing:

npx @dsbissett/office-addin-mcp@latest --help

Pre-built binaries for Windows x64, macOS (Intel + Apple Silicon), and Linux (x64 + ARM64) are installed automatically via optional dependencies.

Build from source

go install github.com/dsbissett/office-addin-mcp/cmd/office-addin-mcp@latest

Excel Setup

Launch Excel with the WebView2 remote debugging port open once per Excel session:

PowerShell:

$env:WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS = "--remote-debugging-port=9222"
Start-Process excel.exe my-workbook.xlsx

Command Prompt:

set WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=9222
excel.exe my-workbook.xlsx

The server connects to http://127.0.0.1:9222 by default. Pass --browser-url to change the address.

MCP Client Configuration

Claude Code

claude mcp add office-addin-mcp -- npx -y @dsbissett/office-addin-mcp@latest

Or add manually to .claude/mcp.json (project) or ~/.claude/mcp.json (global):

{
  "mcpServers": {
    "office-addin-mcp": {
      "command": "npx",
      "args": ["-y", "@dsbissett/office-addin-mcp@latest"]
    }
  }
}

VS Code (GitHub Copilot)

Add to your workspace .vscode/mcp.json:

{
  "servers": {
    "office-addin-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@dsbissett/office-addin-mcp@latest"]
    }
  }
}

Alternatively, open the Command Palette → MCP: Add Server and paste the command.

Cursor

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):

{
  "mcpServers": {
    "office-addin-mcp": {
      "command": "npx",
      "args": ["-y", "@dsbissett/office-addin-mcp@latest"]
    }
  }
}

Codex (OpenAI)

Add to ~/.codex/config.toml:

[mcp_servers.office-addin-mcp]
command = "npx"
args = ["-y", "@dsbissett/office-addin-mcp@latest"]

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "office-addin-mcp": {
      "command": "npx",
      "args": ["-y", "@dsbissett/office-addin-mcp@latest"]
    }
  }
}

Generic (any MCP-compatible client)

The server speaks MCP over stdio. Configure your client with:

  • command: npx
  • args: ["-y", "@dsbissett/office-addin-mcp@latest"]
  • transport: stdio

Usage

Quick start

# List all available tools
office-addin-mcp list-tools

# Read a worksheet range
office-addin-mcp call \
  --tool excel.readRange \
  --param '{"address":"A1:D10","urlPattern":"taskpane"}' \
  --browser-url http://127.0.0.1:9222

# Capture a screenshot
office-addin-mcp call \
  --tool page.screenshot \
  --param '{"urlPattern":"taskpane","outputPath":"./shot.png"}' \
  --browser-url http://127.0.0.1:9222

# List WebView2 targets
office-addin-mcp call --tool pages.list --browser-url http://127.0.0.1:9222

The urlPattern parameter selects the WebView2 page by substring match against the target URL.

Daemon mode

Run a persistent daemon for low-latency repeated calls. Sessions reconnect automatically within a 3-reconnect-per-60s budget.

# Terminal 1 — start the daemon
office-addin-mcp daemon --idle-timeout 30m

# Terminal 2 — calls automatically route to the daemon
office-addin-mcp call \
  --tool excel.readRange \
  --param '{"address":"A1"}' \
  --browser-url http://127.0.0.1:9222

The daemon writes {port, token, pid} to %LOCALAPPDATA%\office-addin-mcp\daemon.json (Windows) or $XDG_CACHE_HOME/office-addin-mcp/daemon.json (mode 0600). Pass --no-daemon to force in-process dispatch.

Watch diagnostics.cdpRoundTrips in the response — the first call costs 3 round-trips; subsequent calls in the same session drop to 1.

Stdio mode (MCP protocol)

office-addin-mcp serve --stdio

Reads newline-delimited MCP JSON requests from stdin and writes responses to stdout. This is the transport used by all MCP clients above.

Tool Groups

PrefixCountDescription
excel.*37Read/write ranges, worksheets, tables, charts, pivot tables, custom XML, Excel.run scripts
page.*~15Screenshot, snapshot, click, fill, type, hover, navigate, evaluate, wait, console log, network log
pages.*4List, select, close, dialog
addin.*6Detect, launch, stop, context info, CF runtime info, dialog
cdp.*~411Raw Chrome DevTools Protocol methods (hidden by default, enable with --expose-raw-cdp)

Flags & Environment Variables

FlagEnvDefaultDescription
--browser-urlOAMCP_BROWSER_URLhttp://127.0.0.1:9222WebView2 / Chrome debug endpoint
--expose-raw-cdpOFFICE_ADDIN_MCP_EXPOSE_RAW_CDPoffRegister ~411 raw cdp.* methods
--allow-dangerous-cdpOAMCP_ALLOW_DANGEROUS_CDPoffEnable crash/terminate CDP methods
--no-daemonForce in-process dispatch, skip daemon lookup
--idle-timeout30mDaemon: shut down after this idle period

Subcommands

CommandDescription
callInvoke one tool. Auto-routes to a running daemon.
list-toolsPrint tool catalog with name, description, and JSON Schema.
daemonRun the persistent local TCP server.
serve --stdioRead MCP JSON requests from stdin, write responses to stdout.
versionPrint binary version.
helpPrint usage.

License

MIT

Reviews

No reviews yet

Sign in to write a review