AI Office Assistant
Enables building LLM applications with LangChain, providing prompt templates, chains, document handling, and retrieval for the RAG pipeline.
Planned integration for defining stateful workflows with LangGraph, enabling multi-step agent processes and tool orchestration.
Planned web interface using Streamlit to allow users to interact with the AI assistant and trigger automation tasks.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AI Office AssistantWhat's the weather in Paris and save it to Excel?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AI Office Assistant
A beginner-friendly AI project using:
MCP (Model Context Protocol)
RAG (Retrieval-Augmented Generation)
Groq LLM
ChromaDB
Weather API
Excel Automation
Word Automation
Features
Ask weather questions
Query local PDF and DOCX documents
Automatically save weather results to Excel
Automatically generate Word reports
MCP tool calling
mcp-rag-office-assistant/ │ ├── app.py ├── requirements.txt ├── .env ├── .gitignore ├── README.md │ ├── data/ │ ├── pdfs/ │ ├── docs/ │ └── vector_db/ │ ├── outputs/ │ ├── excel/ │ └── word/ │ ├── config/ │ ├── init.py │ ├── settings.py │ └── logger.py │ ├── llm/ │ ├── init.py │ ├── groq_model.py │ └── prompt.py │ ├── rag/ │ ├── init.py │ ├── loader.py │ ├── splitter.py │ ├── embeddings.py │ ├── vector_store.py │ └── retriever.py │ ├── mcp_server/ │ ├── init.py │ ├── server.py │ ├── tools.py │ └── schemas.py │ ├── services/ │ ├── init.py │ ├── weather_service.py │ ├── excel_service.py │ └── word_service.py │
LangChain
Purpose
Build LLM applications
Prompt Templates
Chains
Document handling
Retrieval
Prompt
↓
Retriever
↓
LLM
↓
Answer
LangChain Community
User │ ▼ Groq LLM │ ├──────────────┐ ▼ ▼ MCP Tools RAG │ │ Weather API ChromaDB │ │ └──────┬───────┘ ▼ Final Answer │ ┌──────┴──────┐ ▼ ▼ Excel Word
Complete Architecture
USER
│
▼
Groq LLM
│
Tool Calling (MCP)
│
┌──────────┬─────────────┬─────────────┐
▼ ▼ ▼
Weather Excel Tool Word Tool │ │ │ ▼ ▼ ▼ OpenWeather Microsoft Microsoft API Excel Word │ │ ▼ ▼ Write Cells Write Report │ │ └──────┬──────┘ ▼ Save Documents
Then We'll Upgrade Even More
After Office automation, we'll add more desktop tools.
Desktop Agent
├── Weather Tool ├── Excel Automation ├── Word Automation ├── Open Chrome ├── Read PDF ├── Search Documents (RAG) ├── Take Screenshot ├── File Explorer ├── Calculator ├── Notepad ├── Send Email ├── Voice Input (Optional) └── OCR (Optional)
🤖 MCP RAG Office Assistant
An AI-powered Office Assistant built using LLM + RAG + Tool Calling + Office Automation.
The assistant can understand user requests, decide the required action, retrieve information from documents, call external tools, and automatically generate Microsoft Excel and Word reports.
🚀 Project Overview
Traditional applications require users to manually search documents, collect information, and create reports.
This project demonstrates an AI Agent workflow:
User Query
|
|
v
LLM (Groq)
|
|
+----------------------+
| |
v v
Weather Tool RAG Pipeline
| |
| |
Weather API Document Retrieval
|
|
v
ChromaDB
|
|
v
Context
|
|
v
Groq LLM
|
|
v
Office Automation
+-------------+
| |
v v
Excel Microsoft Word
🎯 Project Objective
Build a beginner-level AI Agent system that demonstrates:
Large Language Model integration
Retrieval Augmented Generation (RAG)
Tool execution
MCP architecture concepts
Document understanding
Automated report generation
Desktop application automation
🧠 Technologies Used
Artificial Intelligence
Technology | Purpose |
Groq LLM | Language model |
LangChain | LLM application framework |
RAG | Document question answering |
ChromaDB | Vector database |
HuggingFace Embeddings | Text embeddings |
Related MCP server: unifiles-mcp
Backend
Technology | Purpose |
Python | Programming language |
PyWin32 | Microsoft Office automation |
Requests | API calls |
Logging | Application monitoring |
Office Automation
Application | Usage |
Microsoft Excel | Generate reports |
Microsoft Word | Create documents |
📂 Project Structure
mcp-rag-office-assistant/
│
├── app.py
│
├── config/
│ |
│ ├── settings.py
│ └── logger.py
│
│
├── llm/
│ |
│ ├── grok_model.py
│ └── prompt.py
│
│
├── rag/
│ |
│ ├── loader.py
│ ├── splitter.py
│ ├── embeddings.py
│ ├── vector_store.py
│ ├── retriever.py
│ └── rag_pipeline.py
│
│
├── services/
│ |
│ ├── weather_service.py
│ ├── excel_service.py
│ ├── word_service.py
│ └── office_agent.py
│
│
├── agent/
│ |
│ └── office_agent_executor.py
│
│
├── data/
│ |
│ ├── pdf/
│ |
│ └── docs/
│
│
├── vector_db/
│
│
├── outputs/
│ |
│ ├── excel/
│ |
│ └── word/
│
│
└── requirements.txt
⚙️ Installation
1. Clone Project
git clone <repository-url>
cd mcp-rag-office-assistant2. Create Virtual Environment
python -m venv .venvActivate:
Windows
.venv\Scripts\activate3. Install Requirements
pip install -r requirements.txt4. Environment Variables
Create:
.envAdd:
GROQ_API_KEY=your_api_key🔑 Groq Configuration
The project uses:
llama-3.3-70b-versatileModel configuration:
config/settings.pyExample:
LLM_MODEL="llama-3.3-70b-versatile"📚 RAG Pipeline
The RAG system follows this architecture:
Documents
(PDF/DOCX)
|
v
Document Loader
|
v
Text Splitter
|
v
Embedding Model
|
v
Chroma Vector Database
|
v
Retriever
|
v
Groq LLM
|
v
Final Answer
📄 Supported Documents
Currently supported:
PDF
DOCX
Place files:
data/pdf/
data/docs/Example:
data/pdf/company_policy.pdf🔎 RAG Workflow Example
User:
What is the leave policy?System:
Searches company documents
Retrieves relevant chunks
Creates context
Sends context + question to Groq
Generates answer
Creates Word report
Output:
outputs/word/
Company_Policy_Report.docx🌦 Weather Tool
Example:
Weather HyderabadWorkflow:
User
|
v
Weather Detection
|
v
Weather API
|
v
Excel Generator
|
v
Word Generator
Output:
outputs/
├── excel
│ └── Weather_Report.xlsx
└── word
└── Weather_Report.docx
📊 Excel Automation
The project uses:
pywin32to control Microsoft Excel.
Workflow:
Python
|
v
Open Excel Application
|
v
Create Workbook
|
v
Write Data
|
v
Save File
Example:
Generated Excel:
Weather_Report.xlsx📝 Word Automation
The project automatically opens Microsoft Word.
Workflow:
Python
|
v
Open Word
|
v
Create Document
|
v
Insert Content
|
v
Save DOCX
Example:
Weather_Report.docx🧩 MCP Architecture Concept
This project follows MCP principles.
AI Agent
|
|
+----------------+
| |
v v
Resources Tools
Resources
Information sources:
Examples:
PDF files
DOCX files
Vector database
Tools
Actions:
Examples:
Weather API
Excel Writer
Word Writer
▶️ Running Project
Start:
python app.pyExample:
You : Weather HyderabadOutput:
Weather report generated successfully
Excel:
outputs/excel/Weather_Report.xlsx
Word:
outputs/word/Weather_Report.docxExample RAG:
You : Explain company leave policyOutput:
Company_Policy_Report.docx🧪 Testing
Test RAG:
python test_rag.pyExpected:
RAG Pipeline Ready
Answer Generated
Documents Retrieved: 3🛠 Future Enhancements
Planned improvements:
1. Streamlit Interface
Web UI:
User
|
v
Streamlit
|
v
AI Agent2. Complete MCP Server
Add:
MCP Resources
MCP Tools
MCP Prompts
3. LangGraph Integration
Future workflow:
START
|
Agent Node
|
Decision Node
|
Tool Node
|
Response Node
|
END
4. More Office Actions
Future tools:
Email generation
PowerPoint creation
Excel analysis
Meeting summary
Report generation
🎓 Learning Concepts Covered
This project teaches:
✅ LLM Applications
✅ Prompt Engineering
✅ LangChain
✅ RAG Architecture
✅ Embeddings
✅ Vector Databases
✅ Tool Calling
✅ AI Agents
✅ MCP Concepts
✅ Office Automation
✅ Production Project Structure
👨💻 Author
AI Engineering Learning Project
Built for understanding:
LLM + RAG + Agents + MCP + AutomationThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/varma5359/AI_MCP_Assistance'
If you have feedback or need assistance with the MCP directory API, please join our Discord server