fts5 based full text search mcp server
0

Configure Feed

Select the types of activity you want to include in your feed.

TypeScript 100.0%
3 1 0

Clone this repository

https://git.vm.fail/dunkirk.sh/melty https://git.vm.fail/did:plc:xzo2ehibavl2xcadrn3ck3nb
ssh://git@knot.dunkirk.sh:2222/dunkirk.sh/melty ssh://git@knot.dunkirk.sh:2222/did:plc:xzo2ehibavl2xcadrn3ck3nb

For self-hosted knots, clone URLs may differ based on your setup.


README.md

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 match
  • search* — prefix match
  • apple AND banana — both terms required
  • apple OR banana — either term
  • apple NOT banana — exclude term

Optional filters: after/before (ISO-8601 timestamps), author (name substring).

© 2026-present Kieran Klukas