Skip to content
Back to search

OfficeMCP

The MCP server for AI like to automate Microsoft office applications like Word, Excel, Outlook, PowerPoint, Access, OneNote, Publisher, Visio, Project and also WPS .

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/officemcp--officemcp/badge.svg)](/listings/officemcp--officemcp)

HTML

<a href="/listings/officemcp--officemcp"><img src="/api/listings/officemcp--officemcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

There are two ways or two modes to install OfficeMCP (They also can be used in the same time):

1. Use OfficeMCP as stdio server:

- One OfficeMCP server for one mcp client mode - Put following setting to MCP.json file for vscode or some proper place for other AI IDE:

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

2. Use OfficeMCP as sse server:

- One OfficeMCP server for multi mcp client mode - You can change port and host as you like - This is recommended way to use OfficeMCP server.

step 1:

**Run one command in shell or power shell:** >uvx officemcp sse

the Mcp server url will be: "http://127.0.0.1:8888/sse" or "http://127.0.0.1:8888/sse" the default work folder is D:\@officemcp

or something like below

>uvx officemcp sse --port 7777 --host 127.0.0.8 --folder D:\myfolder

"url" will be : "http://127.0.0.8:7777/sse"

step 2:

**Put following setting to MCP.json file for vscode or some proper place for other AI IDE:**

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

or

{
    "servers": {
        "OfficeMCP": {
            "url": "http://{your_host}:{your_port}/sse"
        }
    }
}

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 142 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align="center">
  2. <!-- omit in toc -->
  3. # OfficeMCP v1.0.5
  4. <strong>>The most seeable and free way to control Microsof applications by AI model.</strong>
  5. [![PyPI - Version](https://img.shields.io/pypi/v/fastmcp.svg)](https://pypi.org/project/fastmcp)
  6. </div>
  7. # OfficeMCP
  8. OfficeMCP server is designed for AI to automate Microsoft Office Applications (Word, Excel, PowerPoint, Access, OneNote, Visio, Project, WPS.word, Wps.powerpoint, wps.excel etc.) by COM interface in Windows OS. Not working on Linux/MacOS.
  9. # Warns
  10. Please keep it in mind, as OfficeMCP not limit the usage of python. epeciall there's a tool RunPython(...) to execute python codes created by Ai model. But it is also the most wonderfull parts of OfficeMCP. we can't guarantee that your AI model will not do something bad to your computer. we don't take any responsibility.
  11. # System Requirements
  12. 1. Windows system
  13. 2. python 3.1 or above installed
  14. 3. uv installed
  15. open an shell window and run command
  16. >pip install uv
  17. ## How to install OfficeMCP
  18. There are two ways or two modes to install OfficeMCP (They also can be used in the same time):
  19. ### 1. Use OfficeMCP as stdio server:
  20. - One OfficeMCP server for one mcp client mode
  21. - Put following setting to MCP.json file for vscode or some proper place for other AI IDE:
  22. ```json
  23. {
  24. "mcpServers": {
  25. "OfficeMCP": {
  26. "type": "stdio",
  27. "command": "uvx",
  28. "args": [
  29. "officemcp"
  30. ]
  31. }
  32. }
  33. }
  34. ```
  35. ### 2. Use OfficeMCP as sse server:
  36. - One OfficeMCP server for multi mcp client mode
  37. - You can change port and host as you like
  38. - This is recommended way to use OfficeMCP server.
  39. #### step 1:
  40. **Run one command in shell or power shell:**
  41. >uvx officemcp sse
  42. the Mcp server url will be: "http://127.0.0.1:8888/sse" or "http://127.0.0.1:8888/sse"
  43. the default work folder is D:\@officemcp
  44. ##### or something like below
  45. >uvx officemcp sse --port 7777 --host 127.0.0.8 --folder D:\myfolder
  46. "url" will be : "http://127.0.0.8:7777/sse"
  47. #### step 2:
  48. **Put following setting to MCP.json file for vscode or some proper place for other AI IDE:**
  49. ```json
  50. {
  51. "servers": {
  52. "OfficeMCP": {
  53. "url": "http://127.0.0.1:8888/sse"
  54. }
  55. }
  56. }
  57. ```
  58. #### or
  59. ```json
  60. {
  61. "servers": {
  62. "OfficeMCP": {
  63. "url": "http://{your_host}:{your_port}/sse"
  64. }
  65. }
  66. }
  67. ```
  68. ## Usage
  69. On AI IDE, you can ask AI model to control Office Applications by OfficeMCP server:
  70. - You ask AI model to open a new Office Application.
  71. AI model will send a request to OfficeMCP server, and OfficeMCP server will open a new Office Application.
  72. - You ask AI model to do whatever you want to do in the current Office Application.
  73. AI model will analyze your request, and call OfficeMCP server's tool to accomplish your request.
  74. ## Tools Reference
  75. Tools:
  76. - AvailableApps(): check if Microsoft Office applications are installed on your computer.
  77. - RunningApps(): get a list of currently running Office applications.
  78. - IsAppAvailable(...): check if a specific Office application is installed.
  79. - Launch(...): launch a new Office application and set its visibility.
  80. - Visible(...): set the specified Office application's visibility to True or False.
  81. - Quit(...): quit the specified Office application.
  82. - Demonstrate(): run a demonstration of OfficeMCP automation features.
  83. - Speak(...): speak a string you passed in.
  84. - Beep(...): play a beep sound.
  85. - DefaultFolder(...): return the OfficeMCP root work folder default is ("D:\OfficeMCP")
  86. - IsFileExists(sub_path): check if a file exists in the OfficeMCP root folder.
  87. - DownloadImage(...): download an image from a given URL and save it to the specified path.
  88. - RunPython(codes,data): run python code in the OfficeMCP server context.
  89. - This is the most powerful tool in OfficeMCP server. AI can use this tool to do anything supported by the server, including automating Office applications.
  90. - There is an object "Officer" that can be used in the python code, e.g. `Officer.Excel` holds the current Excel com Application, and more are Officer.Word, Officer.Powerpoint, Office.Visio, Officer.Access, Officer.OneNote, Officer.Visio, Officer.Project. Office.Kwps for WPS word, Office.Ket for WPS excell, Office.Kwpp for WPS powerpoint.
  91. - There is an object "output" as RunPython(...) return that can be used in the python code, to put your own return result in to output, like output="run python sccessed", then RunPython return "run python sccessed" to AI model.
  92. - You can use Officer.Visio to create a new Visio document, and then use Officer.Visio.ActivePage to get the active page, and use Officer.Visio.ActivePage.DrawRectangle(...) to draw a rectangle on the page.
  93. - You can use Officer.Excel to create a new Excel document, and then use Officer.Excel.ActiveSheet to get the active sheet, and use Officer.Excel.ActiveSheet.Cells(...) to get the cell, and use Officer.Excel.ActiveSheet.Cells(...).Value = "hello" to set the cell value.
  94. - You use codes to control them by running the codes with RunPython tool.
  95. - More tools will be added in the future.
  96. ## Development
  97. ```bash
  98. git clone https://github.com/officemcp/officemcp
  99. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.