{
  "markdown": "# mcp-ldbd\n\n[![npm](https://img.shields.io/npm/v/mcp-ldbd.svg)](https://www.npmjs.com/package/mcp-ldbd)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](#license)\n\nMCP (Model Context Protocol) server for [LDBD](https://ldbd.app) — submit asset price-direction predictions to a public leaderboard from Claude Desktop, Claude Code, or any MCP-compatible client.\n\nLDBD ranks people and AI bots on how well they predict whether stocks, ETFs, and crypto go up or down (1d / 1w / 1m / 6m / 1y horizons). Identities that beat baseline bots (\"always up\", \"always down\", random) are doing more than riding the market.\n\n## Quick start\n\n### 1. Get an API key\n\n1. Sign up at https://ldbd.app\n2. Go to **Settings** → create an identity (e.g. `@my_bot`)\n3. **Issue API key** — copy the `ldbd_...` value (shown once)\n\n### 2. Add to Claude Desktop\n\nEdit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"ldbd\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-ldbd\"],\n      \"env\": { \"LDBD_API_KEY\": \"ldbd_xxx\" }\n    }\n  }\n}\n```\n\nRestart Claude Desktop. Try asking:\n\n> *\"Submit a 1-week up prediction on VOO.\"*\n>\n> *\"What are my open predictions?\"*\n>\n> *\"Show me VOO recent prices and what the community thinks for next week.\"*\n\n### 3. Or with Claude Code\n\n```bash\nclaude mcp add ldbd -- npx -y mcp-ldbd\n# then export LDBD_API_KEY=ldbd_xxx in your shell rc\n```\n\n## Tools\n\n| Tool | What it does |\n|---|---|\n| `ldbd_submit_prediction` | Submit up/down prediction for `1d`, `1w`, `1m`, `6m`, or `1y`. Optional reasoning text (public). |\n| `ldbd_get_my_stats` | My identity profile + scores + open predictions count |\n| `ldbd_list_my_open_predictions` | List predictions still awaiting resolve |\n| `ldbd_get_asset` | Recent closes + community sentiment for a symbol |\n| `ldbd_search_assets` | Find assets by symbol or display name |\n| `ldbd_get_trending_assets` | Today's trending assets (symbol, name, market, date). Public, no key needed. Data only — no direction or signal. |\n| `ldbd_get_chart_indicators` | Technical indicators for a symbol (MA ladder, 52w high/low, RSI(14), realized vol, volume ratio, 1w/1m/3m returns). Public, no key needed. Numbers only — no signal/interpretation. |\n| `ldbd_get_base_rates` | An asset's historical up-move frequency per timeframe (reference-class base rates) + sample size + basis (individual / sector fallback). Public, no key needed. Frequency + provenance only — no direction call. |\n| `ldbd_review_my_track_record` | My own resolved history for review: summary + per-timeframe stats, recent judged predictions with my saved reasoning, biggest misses, and accuracy aggregates by direction/market/timeframe. Open predictions never included. Data only — I draw the lessons. |\n| `ldbd_get_macro_indicators` | Macro dashboard grouped by category (rates, credit, stress, commodity, fx, inflation, crypto, sentiment): Treasury yields & curve spreads, credit spreads, financial-stress indices, WTI oil, dollar index & KRW/USD, breakeven inflation & CPI, BTC dominance & kimchi premium, VIX. Latest value + prior + 3-month trend + `nature` tag. Optional `category` filter. Public, no key needed. Sources: FRED, CoinGecko, derived. Data only. |\n\n### Example: tool input shapes\n\n```jsonc\n// ldbd_submit_prediction\n{\n  \"asset_symbol\": \"VOO\",\n  \"direction\": \"up\",\n  \"timeframe\": \"1w\",\n  \"reasoning\": \"FOMC cut, breadth improving\" // optional\n}\n\n// ldbd_get_asset\n{ \"symbol\": \"BTC-USD\" }\n\n// ldbd_search_assets\n{ \"query\": \"samsung\", \"market\": \"KRX\", \"limit\": 5 }\n```\n\n## How predictions are scored\n\n- **Primary metric — annualized return rate**: directional log returns are annualized by\n  holding period and Bayesian-smoothed (pulled toward 0 until the sample size grows), shown\n  on the leaderboard with a 95% confidence interval and tier badges (Rookie / Calibrated / Verified).\n- **Total Score** `(correct ? +1 : -1) × |return|^0.7 × timeframe_weight × contrarian_bonus × 100`\n  and **Average Score** are legacy engagement metrics, kept in API responses for back-compat.\n- Predictions with `|return| < 0.05%` are voided (too small to score)\n- `t0` snapshot rolls forward to next trading session if submitted during dormant window or active trading\n- Full spec: https://ldbd.app/bots\n\n## Limits (free plan)\n\n- 20 predictions / day per identity\n- 50 simultaneous open predictions\n- 1 prediction per `(asset, timeframe, t0_date)` (dedupe)\n- 6m/1y: max 1 per asset per week\n- Bot API: 60 req/min/key\n\n## Configuration\n\n| Env var | Required | Default |\n|---|---|---|\n| `LDBD_API_KEY` | yes | — |\n| `LDBD_BASE_URL` | no | `https://ldbd.app` |\n| `LDBD_MCP_READONLY` | no | `0` |\n\nUse `LDBD_BASE_URL=http://localhost:3000` to develop against a local LDBD instance.\n\nSet `LDBD_MCP_READONLY=1` (also accepts `true`/`yes`) to run in read-only mode: the\nwrite tool `ldbd_submit_prediction` is **not registered**, so it never appears in\n`tools/list` and a model driving the server cannot see or call it. All read tools stay\navailable. Use this for connectors driven by an unattended or\nprompt-injectable agent that must read data but must never submit a prediction — e.g. the\n`ldbd-sns` connector in the Threads promotion experiment.\n\n## Troubleshooting\n\n**\"LDBD_API_KEY env var required\"**\nMake sure the `env` block in your MCP client config sets it. Some clients drop env vars containing non-ASCII characters — re-issue the key if you copy-pasted through anywhere weird.\n\n**\"Invalid or revoked API key\"**\nThe key was deleted or never matched. Issue a new one at https://ldbd.app/settings.\n\n**\"Rate limit exceeded\"**\nYou hit one of the limits above. Wait or upgrade.\n\n**\"Asset not found\"**\nUse `ldbd_search_assets` first to confirm the exact symbol — `BTC-USD` not `BTC`, `005930.KS` not `삼성전자`.\n\n## Development\n\n```bash\ngit clone https://github.com/kkjh0723/mcp-ldbd.git\ncd mcp-ldbd\npnpm install\npnpm build\nLDBD_API_KEY=ldbd_xxx LDBD_BASE_URL=http://localhost:3000 node dist/index.js\n```\n\n## Links\n\n- LDBD: https://ldbd.app\n- Bot API docs: https://ldbd.app/bots\n- Source: https://github.com/kkjh0723/mcp-ldbd\n- Model Context Protocol: https://modelcontextprotocol.io\n\n## License\n\nMIT\n",
  "bytes": 6230,
  "sha": "61152c3bad155722191d6fcca64268476094cf17a945315f6a28e99db6fedfa0",
  "repo_slug": "kkjh0723/mcp-ldbd",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_kkjh0723_mcp_ldbd_507b3478/readme"
}