lore-mcp

manorit2001/lore-mcp

3.2

If you are the rightful owner of lore-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The lore-mcp server is a Model Context Protocol (MCP) server designed to interact with the lore.kernel.org mailing list archives, providing tools for searching and fetching messages and threads.

Tools
8
Resources
0
Prompts
0

lore-mcp

lore-mcp is an MCP server that lets agents and IDEs search lore.kernel.org, inspect individual mails, and download entire threads through a single stdio process. The CLI and LLM integrations are still available for power users, but the primary workflow is to run the server and plug it into your MCP client.

Quick Start

Run with Node.js

npm install
npm run build
npm start        # runs the MCP server (dist/index.js) over stdio

The server caches fetched mail in ./maildir by default. Override with LORE_MCP_MAILDIR=/path/to/maildir. During development you can use npm run dev to execute the TypeScript entry via ts-node.

Run with Docker

docker build -t lore-mcp .
docker run --rm -it lore-mcp

Mount a persistent Maildir if you want cache reuse:

docker run --rm -it -v "$PWD/maildir:/data/maildir" lore-mcp

Connect to an MCP Client

Claude Code CLI (global config)

Edit ~/.claude.json so every project can reach the server. This example runs the Docker image directly (no wrapper) and persists the Maildir cache under ~/.cache/lore-mcp.

{
  "mcpServers": {
    "lore-mcp": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "/home/you/.cache/lore-mcp:/data/maildir",
        "lore-mcp"
      ],
      "env": {
        "LORE_BASE": "https://lore.kernel.org",
        "LORE_SCOPE": "all"
      }
    }
  }
}

Replace /home/you with your home directory. Restart Claude Code CLI (new shell) so it picks up the change. Claude streams requests over stdio, so keep the -i flag in place.

Claude Desktop

Use either the Node entry point or the Docker image.

Node

claude mcp add lore-mcp node /absolute/path/to/lore-mcp/dist/index.js
claude mcp list    # confirm registration

Docker

claude mcp add lore-mcp docker run --rm -i \
  -v /absolute/path/to/maildir:/data/maildir \
  lore-mcp

Adjust the volume path so Claude can persist cache data. Restart Claude Desktop after adding the server.

Other MCP clients (Cursor, Cline, Codex CLI, etc.)

Configure a server that runs node /absolute/path/to/lore-mcp/dist/index.js (or the Docker command above) and pass any desired environment variables (see below). Once registered, call list_scopes or read the mcp://lore-mcp/scopes resource to verify the connection.

Tools at a Glance

  • search_lore – Run public-inbox/lore queries and return matching messages.
  • get_message_raw – Fetch headers and body for a single message.
  • get_thread_mbox – Download an entire thread as parsed messages.
  • get_thread_summary – Produce a compact summary without using an LLM.
  • get_patchset – Summarize multi-patch series, optionally including truncated diffs.
  • list_scopes – Enumerate available lore.kernel.org mailing lists.
  • lore_help – Show quick search syntax tips.
  • summarize_thread_llm – Optional LLM-powered summary (see Advanced Topics).

Configuration Basics

These environment variables cover the common deployments:

  • LORE_BASE – Base URL (default https://lore.kernel.org).
  • LORE_SCOPE – Default mailing list scope (default all).
  • LORE_MCP_MAILDIR – Maildir location for cached messages (default ./maildir).
  • LORE_CACHE_DIR / LORE_MCP_CACHE_DIR – Disk cache directory for raw responses.
  • HTTP_PROXY, HTTPS_PROXY, NO_PROXY – Standard proxy support.

If the public-inbox lei binary is on PATH, search_lore will automatically use it for faster, more expressive queries; otherwise the server falls back to HTTP endpoints.

Development & Testing

  • npm run dev – Start the server with ts-node for iterative changes.
  • npm test – Build and run the Node test suite.
  • npm run typecheck – Strict TypeScript checks without emitting files.

Advanced Topics

CLI Toolkit

Every MCP tool also has a CLI command, useful for scripting and regression tests.

npm run build
npm run cli -- help
npm run cli -- search --q 's:regression d:2024-01-01..' --scope linux-kernel --n 5

Additional helpers:

  • npm run cli -- cache … – Populate a Maildir with messages or entire threads.
  • npm run cli -- help:lore – Print a cheat sheet for public-inbox queries.

LLM Summaries

summarize_thread_llm can produce abstractive summaries when you supply credentials for a provider:

  • OpenAI / Anthropic – OPENAI_API_KEY / ANTHROPIC_API_KEY
  • Google Gemini – GEMINI_API_KEY
  • Ollama – OLLAMA_URL (auto-detected if the daemon is running locally)
  • LiteLLM router – LITELLM_BASE_URL and optional LITELLM_API_KEY
  • Generic command – set LLM_PROVIDER=command and LLM_CMD="<shell command>"

Optional tuning variables: LLM_MODEL, LLM_CONTEXT_TOKENS, LLM_MAX_OUTPUT_TOKENS, LLM_TEMPERATURE, LLM_BASE_URL.

Maildir & Disk Caching

The server writes fetched artifacts to a Maildir so repeated calls stay fast. Control it with:

  • maildir input parameter (per request)
  • LORE_MCP_MAILDIR for a global default
  • LORE_MCP_CACHE_MAILDIR=0 to disable Maildir writes

Raw responses and thread archives also live under the cache directory governed by LORE_CACHE_DIR.

Optional lei Integration

Installing the public-inbox lei binary unlocks faster searches while keeping deployments portable when lei is absent.

lei --version

When available, search_lore shells out to lei; otherwise it continues to use HTTPS endpoints.