Skip to main content
Glama
tenbux

log-query-mcp

by tenbux
README.md
# log-query-mcp

MCP server exposing Discord and Twitch/Chatty chat log query tools to Claude Code.

## Setup

```bash
npm install
cp .env.example .env
# Edit .env and set DISCORD_BOT_TOKEN
```

Register with Claude Code (global):

```bash
claude mcp add chat-logs -- node /path/to/log-query-mcp/mcp-server.js
```

## Twitch logs

Requires [chatty-log-query](https://github.com/sweinstein/chatty-log-query) checked out at `~/Projects/chatty-log-query`. Reads Chatty log files from `~/.chatty/logs/`.

## Tools

### Discord

| Tool | Description |
|------|-------------|
| `discord_search` | Search messages by content across server or channel |
| `discord_channel_stats` | Message count and top chatters for a channel |
| `discord_list_channels` | List all known channel names and IDs |

### Twitch (Chatty logs)

| Tool | Description |
|------|-------------|
| `twitch_search` | Regex/string search across channel logs |
| `twitch_user_messages` | All messages from a user in a channel |
| `twitch_top_chatters` | Rank chatters by message count |
| `twitch_activity_rate` | Rank chatters by message count, with msgs/hour vs their first-to-last-seen span |
| `twitch_events` | Query sub/bits/giftsub events |

All Twitch tools accept either `days` (recent N days) or `from`/`to` (`YYYY-MM-DD` range) — `from`/`to` take precedence when both are given.

## Environment

| Variable | Description |
|----------|-------------|
| `DISCORD_BOT_TOKEN` | Bot token from Discord Developer Portal |

TDQS

A3.6/5.0

Scored across 7 tools

Disambiguation5/5

Each tool targets a distinct platform (Discord or Twitch) and a specific operation (search, list, stats, events), with no overlapping purposes. The platform prefix and clear action verbs make them easily distinguishable.

Naming Consistency5/5

All tools follow a consistent `platform_action` pattern using snake_case (e.g., discord_list_channels, twitch_search). The naming is uniform and predictable across both platforms.

Tool Count5/5

7 tools is a well-scoped set for a log query server covering two platforms (Discord and Twitch). Each tool provides a meaningful query capability without unnecessary bloat.

Completeness4/5

The tool set covers the core query operations for both platforms: searching, listing, stats, and user-specific queries. Minor gaps include lacking direct message retrieval by ID or cross-platform search, but the surface is largely complete for a query-focused server.

Maintenance

ActivityMaintained
ResponsivenessSyncing