# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Build Commands ```bash # 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 registers `EmailSearchTools` - `EmailSearchTools.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 searches - `EmailResult.cs` - DTO for search results with factory method `FromMailItem()` **Dependencies:** - `ModelContextProtocol` - MCP SDK for .NET - `NetOfficeFw.Outlook` - COM interop wrapper for Outlook automation **Platform:** Windows-only (.NET 9.0-windows) due to Outlook COM dependency