Provides an AI-controlled interface to automate Microsoft Office applications via COM on Windows.
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.
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.
Prerequisites you need before installing OfficeMCP:
# Install the uv runner
pip install uvYou 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"]
}
}
}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.
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.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"
}
}
}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.
Check if Microsoft Office applications are installed on your computer.
Get a list of currently running Office applications.
Check if a specific Office application is installed.
Launch a new Office application and set its visibility.
Set the visibility of a specified Office application.
Quit the specified Office application.
Run a demonstration of OfficeMCP automation features.
Speak a provided string.
Play a beep sound.
Return the OfficeMCP default work folder.
Check if a file exists in the OfficeMCP root folder.
Download an image from a URL and save it to a specified path.
Execute Python code within the OfficeMCP server context and access Office objects via Officer.* bindings.