melty#
MCP server with FTS5 full-text search over a SQLite export of a discord server.
The canonical repo is hosted on Tangled at dunkirk.sh/melty.
Setup#
bun install
cp .env.example .env
# Edit .env with your Discord token and guild ID
Export Discord data#
bun run export # Exports messages to discord-export/melty.db (resumable)
After export completes, build the thread index:
bun run src/build-threads.ts
Run the MCP server#
bun run mcp
Or configure it in your MCP client:
{
"mcp": {
"melty-discord": {
"command": "bun",
"args": ["run", "./src/mcp-server.ts"],
"type": "stdio"
}
}
}
MCP Tools#
| Tool | Description |
|---|---|
search |
Full-text search across conversation threads (FTS5 with BM25 ranking). Start here. |
get_thread |
Read full text of a thread by ID. Use after search. |
channel_search |
Same as search but scoped to a specific channel. |
get_messages |
Paginated raw message access within a channel, newest-first. |
list_channels |
All channels with message counts, grouped by category. |
stats |
Database statistics: total messages, threads, authors, date range. |
query |
Raw read-only SQL against the database. Escape hatch. |
Search syntax#
Supports FTS5 query syntax:
word— matches any thread containing "word""exact phrase"— exact phrase matchsearch*— prefix matchapple AND banana— both terms requiredapple OR banana— either termapple NOT banana— exclude term
Optional filters: after/before (ISO-8601 timestamps), author (name substring).
© 2026-present Kieran Klukas