Skip to content

Commit 3d5b74b

Browse files
wesmclaude
andauthored
Remove built-in chat command in favor of MCP server (#18)
## Why The built-in `msgvault chat` command implemented RAG (retrieval-augmented generation) over a local Ollama instance. While it worked, it was underbaked and took on responsibilities that don't belong in an archival tool: LLM client management, prompt engineering, streaming output, and retrieval orchestration. Meanwhile, the MCP server (`msgvault mcp`) already exposes the full archive — search, aggregates, message detail, metadata — as a standard protocol that any AI client can use. This is a better architecture: - **Claude Desktop** connects directly via MCP - **OpenWebUI** and other local LLM frontends support MCP tool use, so Ollama/llama.cpp users get the same integration without msgvault owning the LLM layer - **Any future MCP-capable agent** gets archive access for free Maintaining a bespoke chat implementation alongside MCP means duplicated effort for a worse result. Removing it lets us focus on making the MCP server excellent. ## What changed - Deleted `internal/chat/` package (RAG session, Ollama client, prompts, tests) - Deleted `cmd/msgvault/cmd/chat.go` CLI command - Removed `ChatConfig` from config and `[chat]` section defaults - Removed `github.com/ollama/ollama` dependency (~914 lines removed) - Updated README and quickstart docs ## Test plan - [x] `make build` passes - [x] `make test` passes - [x] `make lint` passes - [x] `msgvault --help` no longer shows `chat` command 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d274cc6 commit 3d5b74b

File tree

11 files changed

+3
-914
lines changed

11 files changed

+3
-914
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
> **Pre-alpha software.** APIs, storage format, and CLI flags may change without notice. Back up your data.
1010
11-
Archive a lifetime of email and chat. Analytics and search in milliseconds. Query with AI, entirely offline.
11+
Archive a lifetime of email. Analytics and search in milliseconds, entirely offline.
1212

1313
## Why msgvault?
1414

15-
Your messages are yours. Decades of correspondence, attachments, and history shouldn't be locked behind a web interface or an API. msgvault downloads a complete local copy and then everything runs offline. Search, analytics, and AI chat all work against local data with no network access required.
15+
Your messages are yours. Decades of correspondence, attachments, and history shouldn't be locked behind a web interface or an API. msgvault downloads a complete local copy and then everything runs offline. Search, analytics, and the MCP server all work against local data with no network access required.
1616

1717
Currently supports Gmail, with WhatsApp and other messaging platforms planned.
1818

cmd/msgvault/cmd/chat.go

Lines changed: 0 additions & 152 deletions
This file was deleted.

cmd/msgvault/cmd/quickstart.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -285,16 +285,6 @@ msgvault tui --account user@gmail.com
285285
| `?` | Help |
286286
| `q` | Quit |
287287

288-
## Chat with your archive (local LLM)
289-
290-
```bash
291-
# Requires Ollama running locally
292-
msgvault chat
293-
msgvault chat --server http://localhost:11434 --model llama3
294-
```
295-
296-
Interactive RAG-based chat that searches your email archive to answer questions.
297-
298288
## Typical agent workflow
299289

300290
1. **Check status**: `msgvault stats` — see what's in the archive.

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ require (
1515
github.com/mattn/go-runewidth v0.0.16
1616
github.com/mattn/go-sqlite3 v1.14.33
1717
github.com/muesli/termenv v0.16.0
18-
github.com/ollama/ollama v0.15.2
1918
github.com/spf13/cobra v1.10.2
2019
golang.org/x/oauth2 v0.34.0
2120
golang.org/x/sync v0.19.0
@@ -37,6 +36,7 @@ require (
3736
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
3837
github.com/goccy/go-json v0.10.5 // indirect
3938
github.com/google/flatbuffers v25.1.24+incompatible // indirect
39+
github.com/google/go-cmp v0.7.0 // indirect
4040
github.com/google/uuid v1.6.0 // indirect
4141
github.com/inconshreveable/mousetrap v1.1.0 // indirect
4242
github.com/invopop/jsonschema v0.13.0 // indirect
@@ -60,7 +60,6 @@ require (
6060
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
6161
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
6262
github.com/zeebo/xxh3 v1.0.2 // indirect
63-
golang.org/x/crypto v0.43.0 // indirect
6463
golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa // indirect
6564
golang.org/x/mod v0.30.0 // indirect
6665
golang.org/x/net v0.46.0 // indirect

go.sum

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc
103103
github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
104104
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
105105
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
106-
github.com/ollama/ollama v0.15.2 h1:uof4O7frnebDH9wzysMMyWU1aPI8NPJF7guhBOl+5a0=
107-
github.com/ollama/ollama v0.15.2/go.mod h1:4Yn3jw2hZ4VqyJ1XciYawDRE8bzv4RT3JiVZR1kCfwE=
108106
github.com/pierrec/lz4/v4 v4.1.22 h1:cKFw6uJDK+/gfw5BcDL0JL5aBsAFdsIT18eRtLj7VIU=
109107
github.com/pierrec/lz4/v4 v4.1.22/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
110108
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -138,8 +136,6 @@ github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN
138136
github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
139137
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
140138
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
141-
golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04=
142-
golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0=
143139
golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa h1:t2QcU6V556bFjYgu4L6C+6VrCPyJZ+eyRsABUPs1mz4=
144140
golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa/go.mod h1:BHOTPb3L19zxehTsLoJXVaTktb06DFgmdW6Wb9s8jqk=
145141
golang.org/x/mod v0.30.0 h1:fDEXFVZ/fmCKProc/yAXXUijritrDzahmwwefnjoPFk=
@@ -156,8 +152,6 @@ golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
156152
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
157153
golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8 h1:LvzTn0GQhWuvKH/kVRS3R3bVAsdQWI7hvfLHGgh9+lU=
158154
golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8/go.mod h1:Pi4ztBfryZoJEkyFTI5/Ocsu2jXyDr6iSdgJiYE/uwE=
159-
golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q=
160-
golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss=
161155
golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=
162156
golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
163157
golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ=

0 commit comments

Comments
 (0)