================================================================================

        _                 _
   _ __ ___   ___ _ __   | | ___   ___ | |_ __| |_ __ ___  _ __
  | '_ ` _ \ / __| '_ \  | |/ _ \ / _ \| __/ _` | '__/ _ \| '_ \
  | | | | | | (__| |_) | | | (_) | (_) | || (_| | | | (_) | |_) |
  |_| |_| |_|\___| .__/  |_|\___/ \___/ \__\__,_|_|  \___/| .__/
                 |_|                                       |_|
        T H E   S T A R T U P   G R A V E Y A R D ,   v i a   M C P

================================================================================

  Project     : mcp-lootdrop
  Tagline     : Unofficial read-only MCP server for loot-drop.io
  Author      : Aïssa BELKOUSSA
  Contact     : contact@aissabelkoussa.fr
  Website     : https://www.loot-drop.io/ (data source, third party)
  Repository  : https://github.com/aissablk1/mcp-lootdrop
  License     : MIT
  Created     : 2026-06-09
  Updated     : 2026-06-09
  Version     : 0.1.0
  Status      : Active

--------------------------------------------------------------------------------
  DESCRIPTION
--------------------------------------------------------------------------------

  Model Context Protocol server giving AI agents structured, read-only access to
  loot-drop.io — "The Startup Graveyard": 1 700+ dead startups, their causes of
  death, the lessons they left behind (the loot), failure clustering, and
  AI-generated rebuild / pivot plans.

  It consumes the same public Supabase REST API (publishable key + Row-Level
  Security) that the loot-drop.io frontend uses from the browser. No scraping,
  no writes. Unofficial and not affiliated with loot-drop.io.

--------------------------------------------------------------------------------
  STACK
--------------------------------------------------------------------------------

  - TypeScript (ES2022, strict)
  - @modelcontextprotocol/sdk (stdio transport)
  - zod + zod-to-json-schema (input validation / schemas)
  - Data source: Supabase PostgREST (loot-drop.io public API)

--------------------------------------------------------------------------------
  STRUCTURE
--------------------------------------------------------------------------------

  src/index.ts   server bootstrap + tool registry (read-only annotations)
  src/config.ts  data-source config + env overrides
  src/client.ts  PostgREST client: filters, ordering, cache, retry, pagination
  src/types.ts   table types
  src/format.ts  Markdown rendering
  src/tools.ts   Zod schemas + handlers (9 tools)
  test-all.mjs   real-data integration tests
  server.json    MCP registry manifest

--------------------------------------------------------------------------------
  INSTALL
--------------------------------------------------------------------------------

  npm install -g mcp-lootdrop      # or: npx -y mcp-lootdrop
  # from source:
  npm install && npm run build

--------------------------------------------------------------------------------
  USAGE
--------------------------------------------------------------------------------

  Add to ~/.claude/settings.json under "mcpServers":
    "mcp-lootdrop": { "command": "npx", "args": ["-y", "mcp-lootdrop"] }

  Tools: lootdrop_diagnose, search_startups, get_startup, list_rebuild_ideas,
  failure_landscape, graveyard_stats, random_loot, top_startups, list_facets.

--------------------------------------------------------------------------------
  ENV
--------------------------------------------------------------------------------

  LOOTDROP_SUPABASE_URL   override data source URL
  LOOTDROP_SUPABASE_KEY   override public publishable key (if rotated)
  LOOTDROP_CACHE_TTL_MS   cache TTL (default 300000)
  LOOTDROP_TIMEOUT_MS     request timeout (default 15000)

--------------------------------------------------------------------------------
  CREDITS
--------------------------------------------------------------------------------

  Author : Aïssa BELKOUSSA
  Data   : loot-drop.io (third party, AI-assisted, "as-is").

--------------------------------------------------------------------------------
  CONTACT
--------------------------------------------------------------------------------

  contact@aissabelkoussa.fr  ·  https://github.com/aissablk1/mcp-lootdrop

--------------------------------------------------------------------------------
  NOTES
--------------------------------------------------------------------------------

  Read-only. Unofficial. If upstream rotates the key or changes the schema,
  override via the env vars above. Content is AI-assisted and provided as-is.

================================================================================
  Copyright (c) 2026 Aïssa BELKOUSSA — MIT License
================================================================================
