Access your local Microsoft Teams message cache effortlessly.
Project details
teamscache provides a convenient way to read and manage the message cache of the Microsoft Teams v2 desktop client. This CLI tool retrieves your chats and messages directly from your disk without needing complex permissions or internet access, ensuring privacy and ease of use.
The teamscache project offers a command-line interface (CLI) and a read-only MCP server for accessing the message cache of the Microsoft Teams v2 desktop client. This tool allows users to retrieve chat messages, direct messages, and @-mentions, presenting the data in a structured JSON format.
Direct Access to Local Cache: Unlike other solutions that require Microsoft Graph or network access, teamscache reads messages directly from the locally stored data of the Teams client, ensuring privacy and simplicity.
No Special Permissions Required: Many organizations limit access to Microsoft Graph API, requiring admin consent for permissions such as Chat.Read. teamscache circumvents this by leveraging the existing Teams client cache, making it accessible to users in various scenarios such as guest accounts or limited permissions.
For typical operations, users can simply execute commands in their terminal:
Read Cached Messages: Fetch all messages in a specific chat:
teamscache conversations --limit 0 # Retrieve conversation ID
teamscache read "19:abc@thread.v2" --limit 0
Filter by Account: View messages associated with specific accounts or WebView2 profiles:
teamscache accounts # List accounts in the cache
teamscache overview --account "<tenantId>:<userId>"
teamscache profiles # Get names of available profiles
teamscache overview --profile "Default"
Save Output to File: Redirect JSON data to a file:
teamscache read "19:abc@thread.v2" --limit 0 > chat.json
teamscache includes various commands to interact with chats and messages, including:
accounts: List all tenant and user contexts.profiles: Discover available WebView2 profiles.overview: Summarize recent activity based on conversations.recent: View messages from the last specified days, sorted from newest to oldest.mentions: Identify unread @-mentions.search: Find messages based on specific query terms.teamscache mcp can be utilized to run a read-only MCP server. This enables integration with AI assistants and other tools, facilitating seamless interaction with the cached data. Configurations for various applications can be easily established to retrieve and process messaging data efficiently.
The tool ensures data confidentiality by operating locally without making any network calls. Additionally, it structures its data output with careful attention to privacy, making it suitable for sensitive information. Temporary data copies are securely handled and removed after each session.
The teamscache exploits the underlying technology of the Teams client's data storage, specifically targeting the IndexedDB implementation stored in LevelDB format. This allows for direct reading of cached messages and other relevant information, providing a reliable access point for users needing to interact with their Teams data without additional barriers.
Comments
0Start the conversation
Share the first comment.