1.4 KiB
1.4 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Build Commands
# Build the project
dotnet build EmailSearch/EmailSearch.csproj
# Build release version
dotnet build EmailSearch/EmailSearch.csproj -c Release
# Run the MCP server (connects via stdio)
dotnet run --project EmailSearch/EmailSearch.csproj
Architecture
This is an MCP (Model Context Protocol) server that provides Outlook email search capabilities to LLM clients. It runs as a stdio-based server using the Microsoft.Extensions.Hosting pattern.
Key Components:
Program.cs- Entry point that configures the MCP server with stdio transport and registersEmailSearchToolsEmailSearchTools.cs- MCP tool implementations decorated with[McpServerTool]:SearchEmails- Search emails with filters (keywords, sender, subject, date range, folder, attachments, importance, category, flag status)ReadEmail- Retrieve full email body by subject and date
SearchFilters.cs- Filter parameter container for email searchesEmailResult.cs- DTO for search results with factory methodFromMailItem()
Dependencies:
ModelContextProtocol- MCP SDK for .NETNetOfficeFw.Outlook- COM interop wrapper for Outlook automation
Platform: Windows-only (.NET 9.0-windows) due to Outlook COM dependency