microsoft-office-mcp
Enables creating PowerPoint presentations with ERD diagrams from text prompts by connecting to Microsoft Visio/PowerPoint tools via an MCP server.
README
Create PowerPoint Presentation with ERD from Text Prompt
This project uses LangChain's MultiServerMCPClient to connect to a custom MCP server (Microsoft Office/Visio MCP) and generate a PowerPoint presentation containing an ERD (Entity-Relationship Diagram) visualization.
Prerequisites
- Python 3.8+
- Microsoft Office (PowerPoint/Visio) installed
- MCP Server running with Visio/PowerPoint tools
Installation
-
Clone the repository:
git clone <repository-url> cd microsoft-office-mcp -
Install dependencies:
pip install -r requirements.txt
Usage
Start MCP Server
Run the MCP server that exposes Visio/PowerPoint tools:
python server.py
Run the Agent
Execute the agent script with a prompt describing the desired ERD:
python agent.py
Modify the main() function in agent.py to customize the prompt:
async def main():
agent = ERDAgent()
prompt = """
Create a PowerPoint presentation with an ERD diagram for this scenario:
[Your ERD description here]
Key requirements:
- Use Crow's Foot notation for relationships
- Keep entities within slide boundaries
- Save as vsdx file
"""
await agent.run(prompt)
How It Works
-
server.py: Implements a FastMCP server that exposes:init_new_visio_document: Creates a new Visio/PowerPoint documentdraw_erd_entity: Draws ERD entity shapes with specified coordinatesconnect_entities: Creates relationship connectors between entitiessave_as_vsdx: Saves the diagram as a .vsdx file
-
agent.py: A LangGraph agent that:- Connects to the MCP server using
MultiServerMCPClient - Uses
create_react_agentwith Ollama (or another LLM) for reasoning - Executes the MCP tools sequentially to build the diagram
- Streams the agent's thought process to the console
- Connects to the MCP server using
Customization
- LLM Model: Change
OLLAMA_MODELin.envorconfig.py - MCP Server URL: Update
MCP_SERVER_URLin.env - Diagram Design: Modify the prompt in
agent.pyto change:- Entities and attributes
- Relationships and cardinality
- Document layout and styling
Example Prompt
"""
Design a simple ERD diagram for a gym membership system.
Entities:
- MEMBERS (member_id, name, email, phone, address)
- CLASSES (class_id, name, capacity, instructor)
- MEMBERSHIPS (membership_id, type, start_date, end_date)
Relationships:
- A MEMBER can have one MEMBERSHIP (1:1)
- A MEMBER can attend multiple CLASSES (M:N)
- A CLASS has one instructor (1:1)
Requirements:
- Use Crow's Foot notation
- Keep the diagram clean and organized
- Save as vsdx file with appropriate filename
"""
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.