MailNet
MailNet Mailing MCP Server
claude mcp add --transport stdio astroa7m-mailnet-mcp-server uv --directory /path/to/mcp-server run -m mcp_launcher.server \ --env is_local="true" \ --env AZURE_CLIENT_SECRET_VALUE="<your_azure_client_secret>" \ --env AZURE_APPLICATION_CLIENT_ID="<your_azure_client_id>" \ --env GOOGLE_CREDENTIALS_FILE_PATH="<path/to/google_credentials.json>" \ --env AZURE_PREFERRED_TOKEN_FILE_PATH="<path/to/azure_token.json>" \ --env GOOGLE_PREFERRED_TOKEN_FILE_PATH="<path/to/google_token.json>"
How to use
MailNet MCP Server provides a unified interface to manage Gmail and Outlook through a set of agentic tools. It exposes operations such as sending, reading, drafting, replying, searching, labeling, archiving, and deleting emails, all through a consistent provider-agnostic API. The server supports automatic token refresh and credential hygiene, and it includes an administrator-friendly settings surface to tune tone, signatures, thread context, and other preferences for generated email content. To operate it locally, launch the MCP server using your preferred launcher (uv or standard Python) and then interact with the tools via the provided endpoints or client wrappers. The included tools enable an assistant to perform end-to-end email workflows, from composing a draft to sending a reply or updating labels, while honoring the configured agentic email settings.
How to install
Prerequisites:
- Python 3.8+ and pip
- git
- Optional: uv (for faster local launches) as a convenience launcher
-
Clone the repository git clone https://github.com/Astroa7m/MailNet-MCP-Server.git cd MailNet-MCP-Server
-
Install dependencies pip install -r requirements.txt
-
Configure credentials (example env vars shown; replace with your values)
- Create or update your environment with credentials for Gmail and Outlook as described in the README: GOOCGLE_CREDENTIALS_FILE_PATH=/path/to/google_credentials.json GOOGLE_PREFERRED_TOKEN_FILE_PATH=/path/to/google_token.json AZURE_APPLICATION_CLIENT_ID=your-client-id AZURE_CLIENT_SECRET_VALUE=your-secret AZURE_PREFERRED_TOKEN_FILE_PATH=/path/to/azure_token.json is_local=true
-
Launch the MCP server Using uv (recommended): uv run -m mcp_launcher.server
Or using Python directly: python -m mcp_launcher.server
-
Optional: set up Claude Desktop integration by configuring claude_desktop_config.json as shown in the README, pointing to the uv invocation and providing the necessary environment variables.
Additional notes
Tips and notes:
- Ensure your Azure and Google credentials are kept secure and never committed to version control.
- The is_local flag is used to control how credentials are provided to the server; set it to true for local development.
- If you encounter token refresh issues, verify that the token file paths (GOOGLE_PREFERRED_TOKEN_FILE_PATH, AZURE_PREFERRED_TOKEN_FILE_PATH) exist and have the correct permissions.
- The agentic email settings block can be updated at runtime via the provided tools (load_email_settings, update_email_settings) to customize tone, signature, and threading behavior.
- For Claude Desktop integration, ensure the directory path to the MCP server is correct and that the env vars for credentials are present in the integration config.
Related MCP Servers
ddgs
A metasearch library that aggregates results from diverse web search services
ollama -bridge
Extend the Ollama API with dynamic AI tool integration from multiple MCP (Model Context Protocol) servers. Fully compatible, transparent, and developer-friendly, ideal for building powerful local LLM applications, AI agents, and custom chatbots
fli
Google Flights MCP and Python Library
supermcp
🚀 SuperMCP - Create multiple isolated MCP servers using a single connector. Build powerful Model Context Protocol integrations for databases (PostgreSQL, MSSQL) with FastAPI backend, React dashboard, and token-based auth. Perfect for multi-tenant apps and AI assistants.
Vector-Knowledge-Base
A semantic search engine that transforms your documents into an intelligent, searchable knowledge base using vector embeddings and AI
gcp-storage
A Model Context Protocol (MCP) server that provides seamless integration with Google Cloud Storage, enabling AI assistants to perform file operations, manage buckets, and interact with GCS resources directly.