Logotipo de macOS Office 365 MCP Server

macOS Office 365 MCP Server

Comunidad
vAirpower

A Model Context Protocol (MCP) server for automating Microsoft Office 365 applications (PowerPoint and Word) on macOS through AI agents like Claude and Cline.

EditorvAirpower
Repositoriomacos-office365-mcp-server
IdiomaPython
Forks
5
Estrellas
14
Herramientas disponibles
0
Tipo de transportestdio
Categorías
LicenciaMIT
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    macOS Office 365 MCP Server ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 0 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés en el código abierto

    14 estrellas y 5 forks en el repositorio enlazado.

macOS Office 365 MCP Server

A Model Context Protocol (MCP) server that enables AI assistants to create and manipulate Microsoft Office documents (PowerPoint, Word, and Excel) on macOS. This is a Proof of Concept and a personal project that is not an official MCP Server. Let me know if you have any issues.

LinkedIn: https://www.linkedin.com/in/bluhmadam/

Features

PowerPoint

  • Create presentations with custom titles and themes
  • Add slides with various layouts
  • Insert text, images, and speaker notes
  • Save presentations in multiple formats

Word

  • Create documents from scratch or templates
  • Add headings, paragraphs, lists, and tables
  • Apply text formatting and styles
  • Save documents in multiple formats

Excel

  • Create workbooks with multiple worksheets
  • Write data to cells and ranges
  • Add formulas and calculations
  • Create charts (bar, line, pie)
  • Apply cell formatting and styles
  • Save workbooks in multiple formats

Prerequisites

System Requirements

  • macOS 10.15 or later
  • Python 3.8 or later
  • Microsoft Office for Mac (PowerPoint, Word, and/or Excel)

Python Dependencies

bash
pip install mcp
pip install python-pptx
pip install python-docx
pip install openpyxl
pip install aiofiles

Installation

  1. Clone the repository

    bash
    git clone https://github.com/vAirpower/macos-office365-mcp-server.git
    cd macos-office365-mcp-server
  2. Install dependencies

    bash
    pip install -r requirements.txt
  3. Set up macOS permissions

    The server uses AppleScript to control Office applications. You need to grant permissions:

    a. Open System Preferences → Security & Privacy → Privacy b. Select Automation in the left sidebar c. Find your terminal application (Terminal, iTerm2, VS Code, etc.) d. Check the boxes for:

    • Microsoft PowerPoint
    • Microsoft Word
    • Microsoft Excel

    If prompted when first running the server, click "OK" to allow automation.

Configuration

MCP Client Configuration

Add the server to your MCP client configuration:

For Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{
  "mcpServers": {
    "office365": {
      "command": "python",
      "args": ["/path/to/macos-office365-mcp-server/src/office365_mcp_server.py"]
    }
  }
}

For Cline (VS Code)

Edit your Cline MCP settings:

json
{
  "mcpServers": {
    "office365": {
      "command": "python",
      "args": ["/path/to/macos-office365-mcp-server/src/office365_mcp_server.py"]
    }
  }
}

Usage

Once configured, the AI assistant can use the following tools:

PowerPoint Tools

  • create_presentation - Create a new presentation
  • add_slide - Add a slide to a presentation
  • add_text_to_slide - Add text content to a slide
  • add_image_to_slide - Add an image to a slide
  • add_speaker_notes - Add speaker notes to a slide
  • save_presentation - Save the presentation to a file

Word Tools

  • create_document - Create a new document
  • add_heading - Add a heading to a document
  • add_paragraph - Add a paragraph with optional formatting
  • add_list - Add a bulleted or numbered list
  • add_table - Add a table with data
  • save_document - Save the document to a file

Excel Tools

  • create_workbook - Create a new workbook
  • add_worksheet - Add a worksheet to a workbook
  • write_cell - Write data to a specific cell
  • write_range - Write data to a range of cells
  • add_formula - Add a formula to a cell
  • create_chart - Create a chart from data
  • save_workbook - Save the workbook to a file
  • list_worksheets - List all worksheets in a workbook

Utility Tools

  • list_active_presentations - List all open presentations
  • list_active_documents - List all open documents
  • list_active_workbooks - List all open workbooks
  • check_office_status - Check if Office apps are available

Example Usage

Creating a PowerPoint Presentation

python
# AI Assistant can execute:
result = await create_presentation(
    title="Q4 Sales Report",
    theme="modern"
)

slide = await add_slide(
    presentation_id=result["presentation_id"],
    layout="Title and Content"
)

await add_text_to_slide(
    slide_id=slide["slide_id"],
    text="Revenue increased by 25%",
    placeholder="content"
)

await save_presentation(
    presentation_id=result["presentation_id"],
    file_path="~/Desktop/Q4_Sales.pptx"
)

Creating a Word Document

python
# AI Assistant can execute:
doc = await create_document(title="Project Proposal")

await add_heading(
    document_id=doc["document_id"],
    text="Executive Summary",
    level=1
)

await add_paragraph(
    document_id=doc["document_id"],
    text="This proposal outlines our approach...",
    formatting={"font_size": 12, "font_name": "Arial"}
)

await save_document(
    document_id=doc["document_id"],
    file_path="~/Desktop/proposal.docx"
)

Creating an Excel Workbook

python
# AI Assistant can execute:
workbook = await create_workbook(title="Sales Analysis")

# Add data
data = [
    ["Product", "Q1", "Q2", "Q3", "Q4"],
    ["Laptops", 100, 150, 200, 180],
    ["Tablets", 80, 90, 110, 120],
    ["Phones", 200, 250, 300, 350]
]

await write_range(
    workbook_id=workbook["workbook_id"],
    sheet_name="Sheet1",
    start_cell="A1",
    data=data,
    formatting={"bold": True}  # Bold headers
)

# Add a formula
await add_formula(
    workbook_id=workbook["workbook_id"],
    sheet_name="Sheet1",
    cell="F2",
    formula="=SUM(B2:E2)"
)

# Create a chart
await create_chart(
    workbook_id=workbook["workbook_id"],
    sheet_name="Sheet1",
    chart_type="bar",
    data_range="A1:E4",
    chart_title="Quarterly Sales",
    position="G2"
)

await save_workbook(
    workbook_id=workbook["workbook_id"],
    file_path="~/Desktop/sales_analysis.xlsx"
)

Troubleshooting

Permission Issues

If you see "Not authorized to send Apple events", ensure:

  1. Your terminal has automation permissions for Office apps
  2. Office applications are installed and have been opened at least once
  3. You may need to restart your terminal after granting permissions

Import Errors

If you see import errors:

  1. Ensure all dependencies are installed: pip install -r requirements.txt
  2. Check Python version: python --version (should be 3.8+)
  3. Verify MCP is installed: pip show mcp

Office Not Found

If Office applications aren't detected:

  1. Ensure Microsoft Office for Mac is installed
  2. Try opening PowerPoint/Word/Excel manually first
  3. Check if Office is installed in the standard Applications folder

Development

Project Structure

macos-office365-mcp-server/
├── src/
│   ├── office365_mcp_server.py    # Main MCP server
│   ├── controllers/
│   │   ├── powerpoint_controller.py
│   │   ├── word_controller.py
│   │   └── excel_controller.py
│   ├── integrations/
│   │   └── applescript_bridge.py  # AppleScript automation
│   └── utils/
│       ├── config.py
│       ├── logger.py
│       └── validators.py
├── requirements.txt
└── README.md

Adding New Features

  1. Add new methods to the appropriate controller
  2. Register new tools in office365_mcp_server.py
  3. Update this README with usage examples

License

MIT License - see LICENSE file for details

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Submit a pull request

Support

For issues and questions:

  • Open an issue on GitHub
  • Check existing issues for solutions
  • Ensure you've followed all setup steps

Acknowledgments

  • Built with the Model Context Protocol (MCP)
  • Uses python-pptx, python-docx, and openpyxl for document manipulation
  • AppleScript integration for native Office control

Instalación

TypingMind
{
  "mcpServers": {
    "macos-office365-mcp-server": {
      "command": "python",
      "args": [
        "/path/to/macos-office365-mcp-server/src/office365_mcp_server.py"
      ]
    }
  }
}

Usa el MCP de macOS Office 365 MCP Server con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado macOS Office 365 MCP Server, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Esta integración MCP se ejecuta localmente en tu dispositivo a través del conector MCP de TypingMind.

Guía de configuración para usar el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade macOS Office 365 MCP Server como servidor

Cuando el estado del conector sea «Listo», haz clic en «Edita servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en Edita servidores.
  3. Pega la configuración del servidor MCP de macOS Office 365 MCP Server.
  4. Guarda la lista de servidores.
  5. Actualiza para comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Edita servidores»
{
  "mcpServers": {
    "macos-office365-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Úsala con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de macOS Office 365 MCP Server y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de macOS Office 365 MCP Server.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar macOS Office 365 MCP Server para ayudarme con esta tarea?
macOS Office 365 MCP Server
Claro. Lo he leído.
Esto he encontrado usando macOS Office 365 MCP Server.

Preguntas frecuentes

¿Para qué sirve el servidor MCP macOS Office 365 MCP Server?

macOS Office 365 MCP Server es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas y contexto externos. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP macOS Office 365 MCP Server con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar macOS Office 365 MCP Server con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el conector MCP de macOS Office 365 MCP Server con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves de API y herramientas MCP en un solo espacio de trabajo. Con macOS Office 365 MCP Server conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu flujo de trabajo de chat en TypingMind.

¿Cómo conecto el servidor MCP macOS Office 365 MCP Server a TypingMind?

macOS Office 365 MCP Server funciona a través del conector MCP local de TypingMind. Es la mejor opción cuando el servidor MCP necesita acceder a archivos locales, aplicaciones de escritorio, herramientas de línea de comandos o recursos privados de tu ordenador.

¿Qué herramientas ofrece el servidor MCP macOS Office 365 MCP Server en TypingMind?

macOS Office 365 MCP Server ofrece funciones MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves de API con TypingMind para usar el servidor MCP macOS Office 365 MCP Server?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves de API, prompts y configuración MCP. Si macOS Office 365 MCP Server requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

Servidores MCP relacionados

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇