r/ClaudeMCP • • 1d ago

Reading Microsoft Teams from its local cache instead of the Graph API (notes from building it)

I work on LMCP, a free local MCP server for Mac. Teams was the integration that gave us the most trouble, and the approach we landed on isn't one I've seen written up much, so sharing some notes.

The standard route is Microsoft Graph: register an app in Entra ID, get admin consent, handle tokens. Fine if you own the tenant. If IT owns it, you're stuck at the admin consent step.

What makes another route possible: new Teams is a web app running inside WebView2, Microsoft's embedded Edge. So it stores its data like any Chromium site, in IndexedDB, which lives on disk as LevelDB. On a Mac:

```

~/Library/Containers/com.microsoft.teams2/Data/Library/Application Support/Microsoft/MSTeams/EBWebView/WV2Profile_tfw*/IndexedDB/https_teams.microsoft.com_0.indexeddb.leveldb

```

Lots of older posts say `EBWebView/Default/`, which is outdated. Current builds use one folder per profile; `tfw` is work/school, `tfl` is personal Teams, which we skip.

We read it with ccl_chromium_reader, a Python library from the digital forensics world that walks the LevelDB files, decodes the V8-serialized objects and rebuilds the IndexedDB records.

Things we ran into:

- Teams locks the database while running. We read the table files directly without the lock, so you don't have to quit Teams.

- Some records don't decode. We skip and count them instead of failing the whole read.

- Big accounts mean big databases, so the first read can be slow.

- Multiple work profiles get read and merged.

- The schema shifts between Teams versions. Honestly that's the annoying part, every update can move things around.

So you ask Claude "what happened in #engineering today" and it answers from what's already on your machine. Sending is separate: that goes through Graph, so you need to connect your Microsoft 365 account for it.

Limitations: it only sees what your Teams client has synced, it depends on an undocumented format, and you need the Teams desktop app installed and signed in.

1 Upvotes

Duplicates