npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@loguro/mcp

v1.2.0

Published

MCP server for Loguro — query logs from Claude Code, Cursor, and other MCP-compatible AI tools. Reuses the CLI's saved auth (zero config).

Readme

@loguro/mcp

MCP server for querying Loguro logs directly from Claude Code.

Auth

The MCP server uses a Loguro PAT (personal access token). Two ways to provide it:

A) Reuse the token saved by the CLI (zero config):

loguro login    # saves to ~/.config/loguro/auth.json

The MCP server picks it up automatically.

B) Explicit env var (Claude config / CI):

LOGURO_TOKEN=pat_…

Config

| Var | Required | Description | |-----|----------|-------------| | LOGURO_TOKEN | ✅ unless auth.json exists | Your Loguro PAT (pat_…) | | LOGURO_PROJECT | optional | Default project slug (skip passing it each call) | | LOGURO_BASE_URL | optional | Override base URL (default: https://logu.ro) |

Claude Code setup

Add to ~/.claude/settings.json (global) or .claude/settings.json (per project):

With saved CLI auth (recommended):

{
  "mcpServers": {
    "loguro": {
      "command": "bunx",
      "args": ["@loguro/mcp"],
      "env": {
        "LOGURO_PROJECT": "your-project-slug"
      }
    }
  }
}

With explicit token:

{
  "mcpServers": {
    "loguro": {
      "command": "bunx",
      "args": ["@loguro/mcp"],
      "env": {
        "LOGURO_TOKEN": "pat_…",
        "LOGURO_PROJECT": "your-project-slug"
      }
    }
  }
}

Tools

| Tool | Description | |------|-------------| | query_logs | Query logs with any filter: level, message, search, date range (incl. notFrom/notTo), trace, slow, rich context filters with operators (>=, !=, etc.) and negation, memory mode, cursor or offset pagination | | get_log_timeline | Get logs around a specific log ID — context window for an error | | get_distinct_values | List unique values for a field (e.g. all levels, all envs) | | group_logs | Group logs by a field with explicit groupValues | | get_slow_logs | Shortcut for slow requests above N ms | | sample_logs | Random sample — useful for exploring an unfamiliar project |

When to use the MCP vs CLI vs Web Console

The MCP server is one of three ways to interact with Loguro. Each fits a different moment in the workflow.

| Reach for MCP (this) when... | Reach for CLI when... | Reach for Web Console when... | |---|---|---| | Debugging in the IDE: ask Claude/Cursor about a failure and let it query logs iteratively | Reproducible scripts: cron jobs, CI alerts, loguro logs --json \| jq | Visual exploration: charts, timeline view, replay, saved view dashboards | | Natural-language questions: "show me errors after the deploy at 14:00" | Direct queries you already know: loguro logs -l error --from 1h | Setting up integrations interactively (OAuth flows, Slack app install) | | Multi-step investigation where Claude calls get_log_timeline then group_logs then get_distinct_values autonomously | One-shot ad-hoc queries from terminal, piping into other tools | First-time onboarding for someone new to your project | | Sharing context with the AI without copy-pasting log dumps | Bulk operations: project + key + alert in one shell session | Issue creation with rich UI, log shares, embed widgets |

Token footprint

This MCP exposes 6 focused tools (query_logs, get_log_timeline, get_distinct_values, group_logs, get_slow_logs, sample_logs) — ~1k tokens of system prompt vs the 5–10k tokens of MCPs that ship 30+ generic tools. That overhead matters when you run smaller models or have a long debugging conversation.

Zero-config setup

If you've already run loguro login, this MCP picks up the saved PAT from ~/.config/loguro/auth.json automatically. No second login, no per-session credentials. The same token works across all your projects.

For CI or shared agents where the CLI isn't installed, set LOGURO_TOKEN in env (see Config above).

Latency

The MCP makes a single fetch per tool call (no SQL round-tripping through an interpreter). For interactive AI workflows this is fast enough that Claude can chain 3–5 tool calls in a single turn without lag.

For bulk fetches (10k+ rows, exports, scripted pipelines), the CLI streams JSON faster — use loguro logs --json | jq instead.

Combine them

  • CLI for setup and scripted workflows
  • MCP for IDE-driven debugging and natural-language exploration
  • Web for visual analysis and saved-view dashboards

All three share auth and read the same data — switch freely based on what's least friction in the moment.

Context filters

context is an array of filter objects:

[
  { "key": "user_id", "value": "42" },
  { "key": "duration", "value": 500, "op": ">=" },
  { "key": "env", "value": "staging", "negate": true }
]

Operators: = (default), !=, >, <, >=, <=. negate: true excludes (maps to notContext_<key>).