MCP-server
by Prathapmahi
README.md
# π§ MCP Server Project - Multi-Agent AI Tools
This project demonstrates how to build and serve multiple AI tools using the **FastMCP** framework. It includes a combination of COM-based email automation, external API integration (OpenWeather), local file-based notes, and utility functionsβall accessible via an MCP-compatible agent interface.
-----------------------------------------------------------------------------------------------------
## π§ Requirements
- Python 3.10+
- Windows (required for Outlook COM)
- `.env` file with:
```env
OPENWEATHER_API_KEY=your_openweather_key_here
```
-----------------------------------------------------------------------------------------------------
## π Directory Structure
.
βββ outlook_assistant.py # Outlook email read/reply/compose/search tools
βββ weather_mcp.py # Current, forecast, historical, and air quality weather tools
βββ sticky_notes.py # Notes tools backed by a text file
βββ addition_server.py # Simple addition and greeting tool
βββ notes.txt # File to store sticky notes
βββ README.md # This file
-----------------------------------------------------------------------------------------------------
## π¬ Outlook Email Assistant
A COM-based email assistant that integrates with Microsoft Outlook to:
- List all folders in Outlook
- Fetch and display recent or matching emails
- Read full email contents
- Send replies or compose new emails
### π§ Tools Exposed:
- `list_folders()`
- `list_recent_emails(days, folder_name)`
- `search_emails(search_term, days, folder_name)`
- `get_email_by_number(email_number)`
- `reply_to_email_by_number(email_number, reply_text)`
- `compose_email(recipient_email, subject, body, cc_email)`
> β οΈ Must be run on **Windows** with Microsoft Outlook installed.
-----------------------------------------------------------------------------------------------------
## π Weather Tools (OpenWeather API)
Provides weather details using OpenWeatherMap API including:
- Current weather
- 5-day forecast
- Air quality
- Weather alerts
- Historical weather (past 5 days)
### π¦ Tools Exposed:
- `get_current_weather(location)`
- `get_weather_forecast(location, days)`
- `get_air_quality(location)`
- `get_historical_weather(location, date)`
- `get_weather_alerts(location)`
- `search_location(query)`
> π Requires setting `OPENWEATHER_API_KEY` in `.env`
-----------------------------------------------------------------------------------------------------
## π AI Sticky Notes
Simple note-taking assistant that stores notes locally in a `notes.txt` file.
### π Tools and Resources:
- `add_note(message)`
- `read_notes()`
- `get_latest_note()` β as resource `notes://latest`
- `note_summary_prompt()` β generates a summarization prompt from all notes
-----------------------------------------------------------------------------------------------------
## β Addition Utility
Example of a simple arithmetic and dynamic greeting tool using MCP:
- `add(a, b)`
- `get_greeting(name)` β resource `greeting://{name}`
-----------------------------------------------------------------------------------------------------
## π Running Any MCP Server
Each file defines its own FastMCP server. Run them individually:
python outlook_assistant.py
python weather_mcp.py
python sticky_notes.py
python addition_server.py
> Each server will start on its own FastMCP interface for integration with agents.
---
## π§ͺ Example Agents
You can now connect these MCP tools with agents (CrewAI, LangChain, etc.) to enable conversational workflows like:
- "Whatβs the weather in London today?"
- "Summarize my latest sticky notes"
- "Reply to the last unread email from Ajay"
- "What is 42 + 11?"This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues