home / mcp / officemcp server

OfficeMCP Server

Provides an AI-controlled interface to automate Microsoft Office applications via COM on Windows.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "officemcp-officemcp": {
      "url": "http://127.0.0.1:8888/sse"
    }
  }
}

OfficeMCP lets you automate Microsoft Office Applications on Windows through a programmable server that exposes a set of tools to drive Word, Excel, PowerPoint, and more via a controlled interface. It enables your AI or automation scripts to launch apps, manipulate documents, and execute Python code within the server context to perform complex Office tasks safely and repeatably.

How to use

You run a local OfficeMCP server and connect to it from your AI client or IDE. You can instruct the AI to open Office applications, launch new documents, and perform actions such as editing cells, creating slides, or drawing on a Visio page. When you request a task, your AI client sends a request to the OfficeMCP server, which executes the actions through the COM interface and returns results or confirmations.

How to install

Prerequisites you need before installing OfficeMCP:

  • Windows operating system (required)
  • Python 3.1 or above installed
  • Uv command line tool installed (pip install uv)
# Install the uv runner
pip install uv

Two installation modes you can use

You can run OfficeMCP as a stdio server or as a server accessible via SSE (http). Choose the mode that fits your workflow. Both can be used on the same system if you want to provide multiple access methods.

{
  "mcpServers": {
    "officemcp": {
      "type": "stdio",
      "command": "uvx",
      "args": ["officemcp"]
    }
  }
}

Using stdio server

For stdio mode, create the configuration above in your MCP client settings (for example, in your AI IDE’s MCP.json). The server is started by running the command and it will listen for requests from your client.

Using SSE (http) server

SSE mode enables a single OfficeMCP server to handle multiple clients. You can run it with a fixed host/port or customize them as needed.

uvx officemcp sse
```

The server URL will be one of:
- http://127.0.0.1:8888/sse
- or your chosen host/port, for example http://127.0.0.8:7777/sse

Default working folder (where server stores its data) is D:\@officemcp. You can customize it when starting the server if you provide a different folder path.

Configure your client to connect to OfficeMCP SSE server

In your AI IDE or application, point the MCP client to the SSE URL of OfficeMCP so requests reach the server.

{
  "servers": {
    "OfficeMCP": {
      "url": "http://127.0.0.1:8888/sse"
    }
  }
}

Run-time environment and notes

OfficeMCP exposes a set of operational tools and a Python execution environment. You can run Python code within the server context to automate Office apps using objects like Officer.Excel, Officer.Word, and more. This enables complex workflows where code generates documents, edits cells, or manipulates slides programmatically.

Available tools

AvailableApps

Check if Microsoft Office applications are installed on your computer.

RunningApps

Get a list of currently running Office applications.

IsAppAvailable

Check if a specific Office application is installed.

Launch

Launch a new Office application and set its visibility.

Visible

Set the visibility of a specified Office application.

Quit

Quit the specified Office application.

Demonstrate

Run a demonstration of OfficeMCP automation features.

Speak

Speak a provided string.

Beep

Play a beep sound.

DefaultFolder

Return the OfficeMCP default work folder.

IsFileExists

Check if a file exists in the OfficeMCP root folder.

DownloadImage

Download an image from a URL and save it to a specified path.

RunPython

Execute Python code within the OfficeMCP server context and access Office objects via Officer.* bindings.