Skip to content
Back to search

teamscache

CLI and read-only MCP server for the local Microsoft Teams v2 message cache. No Graph API, no network.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 21 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/stn1slv/teamscache with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/stn1slv/teamscache'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/stn1slv--teamscache/badge.svg)](/listings/stn1slv--teamscache)

HTML

<a href="/listings/stn1slv--teamscache"><img src="/api/listings/stn1slv--teamscache/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

With Homebrew on macOS or Linux:

brew install stn1slv/tap/teamscache

Binaries for macOS, Linux and Windows are on the [releases page](https://github.com/stn1slv/teamscache/releases).

With Go 1.27 or later:

go install github.com/stn1slv/teamscache/cmd/teamscache@latest

Or build from source with `make build`; the binary is written to `bin/teamscache`.

You need a new Teams client that has been signed in at least once. Auto-discovery of the cache works on macOS and Windows. On Linux it is best effort.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 128 lines
  1. # teamscache
  2. `teamscache` reads the message cache of the new Microsoft Teams (v2) desktop client on your computer. It prints chats, messages and @-mentions as JSON, and it can also run as a read-only MCP server for AI assistants.
  3. It does not use Microsoft Graph, OAuth, an Azure app registration or the network. It reads only what the signed-in Teams client already keeps on your disk.
  4. ## Why
  5. To read Teams messages through Microsoft Graph, you need permissions such as `Chat.Read`, and many tenants allow them only after admin consent. As a guest in another company's tenant, you often cannot get that consent. The desktop client still keeps your recent conversations on your disk, and `teamscache` reads them from there.
  6. ## Install
  7. With Homebrew on macOS or Linux:
  8. ```bash
  9. brew install stn1slv/tap/teamscache
  10. ```
  11. Binaries for macOS, Linux and Windows are on the [releases page](https://github.com/stn1slv/teamscache/releases).
  12. With Go 1.27 or later:
  13. ```bash
  14. go install github.com/stn1slv/teamscache/cmd/teamscache@latest
  15. ```
  16. Or build from source with `make build`; the binary is written to `bin/teamscache`.
  17. You need a new Teams client that has been signed in at least once. Auto-discovery of the cache works on macOS and Windows. On Linux it is best effort.
  18. ## Usage
  19. ```bash
  20. teamscache accounts # tenant and user contexts in the cache
  21. teamscache overview --days 7 # recent activity grouped by conversation
  22. teamscache recent --days 3 # messages of the last 3 days, newest first
  23. teamscache mentions --unread # @-mentions of you that are not read yet
  24. teamscache search "quarterly budget" # text in message content or sender name, newest first
  25. teamscache conversations # chats and channels
  26. teamscache read "19:abc@thread.v2" # last messages of one conversation
  27. ```
  28. All commands print JSON to stdout and a short summary to stderr, for example `# 12 result(s), 0 record(s) skipped, 0 damaged section(s)`. Skipped records could not be decoded. Damaged sections are unreadable file sections or missing referenced blob files, and are counted separately.
  29. | Flag | Commands | Meaning |
  30. |------|----------|---------|
  31. | `--account <tenantId>:<userId>` | all | Only one account. The keys come from `teamscache accounts`. With `mcp`, every tool serves only this account. |
  32. | `--limit N` | most | Maximum number of results; `0` means no limit. |
  33. | `--days N` | `search`, `recent`, `mentions`, `overview` | Only items of the last N days; `0` means all. |
  34. | `--leveldb PATH` | all | Read this cache folder instead of the auto-discovered one. |
  35. | `--max-content N` | all | Characters of message content in mentions, the overview and MCP results; `0` means no limit (default 600). |
  36. | `-v`, `--verbose` | all | Log details, such as skipped records, to stderr. |
  37. Environment variables:
  38. | Variable | Meaning |
  39. |----------|---------|
  40. | `TEAMSCACHE_LEVELDB` | Default for `--leveldb`. |
  41. | `TEAMSCACHE_MAX_CONTENT` | Default for `--max-content`. |
  42. | `TEAMSCACHE_CACHE_TTL` | Seconds the MCP server reuses a parsed cache (default 180). |
  43. The cache has no general read or unread marker. The read state of @-mentions is the only read state it keeps, so `mentions --unread` is the reliable way to find what needs your attention.
  44. ## MCP server
  45. `teamscache mcp` runs a read-only MCP server on stdin and stdout. Example configuration for Claude Desktop or Claude Code:
  46. ```json
  47. {
  48. "mcpServers": {
  49. "teams": { "command": "teamscache", "args": ["mcp"] }
  50. }
  51. }
  52. ```
  53. | Tool | Purpose |
  54. |------|---------|
  55. | `overview` | Who messaged you: recent activity grouped by conversation. A good first call. |
  56. | `recent_messages` | Messages of the last N days, newest first. |
  57. | `mentions` | @-mentions of you, with content and read state; `unread_only` filter. |
  58. | `unread_messages` | Your unread @-mentions. |
  59. | `search_messages` | Text search in content and sender names, with an optional `days` filter. |
  60. | `list_conversations` | Chats and channels with their titles. |
  61. | `read_conversation` | Last messages of one conversation. |
  62. | `list_accounts` | Accounts in the cache; use the `key` as the `account` filter. |
  63. The server parses the cache on the first tool call and keeps the result in memory. It parses again when the TTL ends or when Teams writes new data.
  64. Every tool response keeps its rows in `result` and includes `skipped_records`, `damaged_sections`, and `partial`. When `partial` is true, some cache data could not be read, so an empty result does not confirm that no matching messages exist.
  65. ## How it works
  66. The new Teams client (`com.microsoft.teams2` on macOS, the `MSTeams` package on Windows) is an Edge WebView2 app. It stores recent conversations in an IndexedDB database, which Chromium keeps in LevelDB with values in the V8 serialization format. `teamscache`:
  67. 1. finds the LevelDB folder, or uses `--leveldb`,
  68. 2. copies its data files and referenced blob files to a temporary folder, because the running client locks the files, and removes the copy when it is done,
  69. 3. reads the LevelDB files directly (tables and logs, including Snappy-compressed blocks), without a LevelDB engine,
  70. 4. decodes the IndexedDB keys and the Blink and V8 values,
  71. 5. maps the Teams schema: messages in `replychains` and its numbered copies such as `replychains-2`, chats in `conversations`, mentions in `mentions-metadata-items`, one database set per tenant and user.
  72. LevelDB can keep older versions of a record until it compacts its files. `teamscache` uses only the newest version of each record, so an edited message shows its current text and the read state of a mention is the current one.
  73. The LevelDB, IndexedDB and V8 decoding is a Go port of parts of [ccl_chromium_reader](https://github.com/cclgroupltd/ccl_chromium_reader). See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
  74. ## Privacy
  75. The tool is read-only and makes no network calls. The temporary copy of the cache is created with owner-only permissions and removed after each run. Output can contain message content from all tenants in the cache, so treat it as confidential.
  76. ## Development
  77. ```bash
  78. make setup # download dependencies
  79. make test # unit tests with the race detector
  80. make lint # golangci-lint and gofumpt
  81. make format # format the code
  82. make build # build bin/teamscache
  83. make upgrade-deps # update dependencies and pinned Go tools
  84. ```
  85. Tests use synthetic data only. The test fixtures and their generators are in `testdata` folders:
  86. - `internal/v8/testdata`: values written by Node.js `v8.serialize` (`gen.mjs`) and the result of `ccl_chromium_reader` for the same bytes (`golden.py`).
  87. - `internal/indexeddb/testdata`: a synthetic IndexedDB written by `gen/main.go`, and the records `ccl_chromium_reader` reads from it (`gen/golden.py`).
  88. - `internal/teams/testdata/gen`: a synthetic Teams cache with edge cases, for manual end-to-end checks.
  89. ## License
  90. MIT. See [LICENSE](LICENSE) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.