npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@developer.k/ms-office-mcp

v1.0.0

Published

MCP server for local Microsoft Office files and active desktop Office documents

Readme

MS Office MCP

@developer.k/ms-office-mcp is an MCP server for working with Microsoft Office documents from an MCP client.

It supports two workflows:

  • File-based operations for .xlsx, .docx, and .pptx files.
  • Active desktop Office automation for documents already open in Excel, Word, or PowerPoint on Windows.

The server communicates over stdio and is designed to be launched by MCP clients such as Claude Desktop, Cursor, or other MCP-compatible tools.

Requirements

  • Node.js 20 or later.
  • Microsoft Office desktop apps for active-document tools.
  • Windows PowerShell and Office COM automation for tools that read or edit currently open Office documents.

File-based tools can run anywhere Node.js can access the target files. Active Excel, Word, and PowerPoint tools require a Windows desktop session with the corresponding Office app already running.

Usage with MCP Clients

Using npx

Add this server to your MCP client configuration:

{
  "mcpServers": {
    "ms-office-mcp": {
      "command": "npx",
      "args": ["-y", "-p", "@developer.k/ms-office-mcp", "ms-office-mcp"]
    }
  }
}

No environment variables are required.

Local Development

npm install
npm run build
npm start

For TypeScript development:

npm run dev

Tools

File-Based Tools

| Tool | Office app | Purpose | Key inputs | | --- | --- | --- | --- | | list_sheets | Excel | List worksheet names in an .xlsx file. | path | | read_excel | Excel | Read rows from a sheet as JSON objects. | path, optional sheetName | | write_excel | Excel | Create or overwrite a sheet from object rows. | path, sheetName, data | | read_word | Word | Extract raw text from a .docx file. | path | | write_word | Word | Create a .docx file with optional title and text content. | path, optional title, content | | read_pptx | PowerPoint | Extract text from a .pptx file. | path | | write_pptx | PowerPoint | Create a .pptx file from slide title/content pairs. | path, slides |

Active Office Tools

Active Office tools connect to an already-running Office desktop application. They operate on the open document but do not automatically save it.

Use the filename argument when multiple documents are open. If omitted, the active document is used.

| Tool | Office app | Purpose | Key inputs | | --- | --- | --- | --- | | list_active_excel | Excel | List open Excel workbooks. | none | | get_active_excel | Excel | Read the active sheet from an open workbook. | optional filename | | write_active_excel | Excel | Write object rows into the active sheet of an open workbook. | optional filename, data | | list_active_word | Word | List open Word documents. | none | | get_active_word | Word | Read text from an open Word document. | optional filename | | write_active_word | Word | Edit an open Word document. | optional filename, operation, text, optional findText, optional replaceAllMatches | | list_active_pptx | PowerPoint | List open PowerPoint presentations. | none | | get_active_pptx | PowerPoint | Read slide text from an open presentation. | optional filename | | write_active_pptx | PowerPoint | Edit slide-level text in an open presentation. | optional filename, operation, optional slideIndex, optional title, text, optional findText, optional replaceAllMatches | | inspect_active_pptx | PowerPoint | Inspect slides and shapes, including IDs, names, types, positions, sizes, text, and basic colors. | optional filename, optional slideIndex | | edit_active_pptx_object | PowerPoint | Edit a specific shape without selecting it in the UI. | optional filename, slideIndex, shapeId or shapeName, operation |

Supported Operations

| Tool | Operations | | --- | --- | | write_active_word | append, replace_text, replace_all | | write_active_pptx | add_slide, replace_text, replace_slide_text | | edit_active_pptx_object | set_text, set_position, set_size, set_fill_color, set_line_color, delete |

Common Input Examples

Read a specific Excel sheet:

{
  "path": "C:\\Documents\\report.xlsx",
  "sheetName": "Sheet1"
}

Replace text in an open Word document:

{
  "filename": "Document1.docx",
  "operation": "replace_text",
  "findText": "old phrase",
  "text": "new phrase",
  "replaceAllMatches": true
}

Edit a PowerPoint shape:

{
  "filename": "Presentation1.pptx",
  "slideIndex": 2,
  "shapeId": 5,
  "operation": "set_fill_color",
  "color": "#FFAA00"
}

Example Workflow

  1. Ask the MCP client to inspect slide 3 with inspect_active_pptx.
  2. Pick the returned shape ID for the object you want to modify.
  3. Call edit_active_pptx_object with that shape ID.
  4. Review the open PowerPoint window.
  5. Save manually if the result is correct.

Prompt Examples

These are examples of prompts you can type into an MCP client after this server is configured.

Excel

Read the Excel file at C:\Documents\sales.xlsx and summarize the first sheet.
List all sheets in C:\Documents\sales.xlsx, then read the sheet named "Q2".
Create an Excel file at C:\Documents\tasks.xlsx with columns Task, Owner, Status, and DueDate. Add five sample rows.
I have an Excel workbook open. Read the active sheet and tell me which rows have missing Status values.
Write these rows into the active Excel workbook: Task=Review proposal, Owner=Kim, Status=Done; Task=Send deck, Owner=Lee, Status=In progress.

Word

Read C:\Documents\proposal.docx and give me a concise summary with action items.
Create a Word document at C:\Documents\meeting-notes.docx titled "Meeting Notes" with sections for Attendees, Decisions, and Next Steps.
I have a Word document open. Replace every occurrence of "FY25" with "FY26", but do not save the file.
Append this paragraph to the open Word document: "Please review the updated timeline before Friday."
Read the currently active Word document and rewrite the executive summary in a more concise tone.

PowerPoint

Read C:\Documents\quarterly-review.pptx and summarize each slide in one sentence.
Create a PowerPoint file at C:\Documents\project-update.pptx with slides for Overview, Timeline, Risks, and Next Steps.
I have a PowerPoint deck open. Replace "Q1" with "Q2" on slide 2 only, without saving the file.
Inspect slide 3 of the open PowerPoint deck and show me the shapes with their IDs, names, text, position, and size.
On slide 3 of the open PowerPoint deck, find the shape that contains "Revenue" and change its fill color to #FFAA00.
Add a new slide to the open PowerPoint deck titled "Next Steps" with three bullets: finalize scope, assign owners, confirm timeline.
On slide 5, move the shape named "Title 1" to the top-left corner and make it wider.

Cross-Document Tasks

Read the active Excel workbook, summarize the key numbers, and add a new slide to the open PowerPoint deck with the summary.
Read C:\Documents\notes.docx and create a PowerPoint deck at C:\Documents\summary.pptx with one slide per major section.
Inspect the open PowerPoint deck, find slides that mention "risk", and append a risk summary paragraph to the open Word document.

Docker

The Docker image can be used for file-based operations where the target files are mounted into the container.

docker compose up --build

Active desktop Office automation is not available inside the provided Linux container because it depends on Windows Office COM automation.

Publishing

npm run build
npm pack --dry-run
npm publish --access public

The package includes only:

  • build
  • README.md
  • LICENSE
  • package.json

Limitations

  • Active-document tools are Windows-only.
  • Active-document tools require the corresponding Office app to be running.
  • Active-document tools modify the open document but do not save automatically.
  • .doc and .ppt legacy formats are not the primary target; use .docx and .pptx.
  • PowerPoint object editing currently targets shapes by slide and shape identifier/name.

Security Notes

This package does not require API keys or credentials. It can read and modify files or active Office documents that the server process can access, so configure it only in MCP clients and environments you trust.