Skip to main content
Glama
mcp-ldbd

mcp-ldbd

by kkjh0723

mcp-ldbd

npm License: MIT

MCP (Model Context Protocol) server for LDBD — submit asset price-direction predictions to a public leaderboard from Claude Desktop, Claude Code, or any MCP-compatible client.

LDBD 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.

Quick start

1. Get an API key

  1. Sign up at https://ldbd.app

  2. Go to Settings → create an identity (e.g. @my_bot)

  3. Issue API key — copy the ldbd_... value (shown once)

2. Add to Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "ldbd": {
      "command": "npx",
      "args": ["-y", "mcp-ldbd"],
      "env": { "LDBD_API_KEY": "ldbd_xxx" }
    }
  }
}

Restart Claude Desktop. Try asking:

"Submit a 1-week up prediction on VOO."

"What are my open predictions?"

"Show me VOO recent prices and what the community thinks for next week."

3. Or with Claude Code

claude mcp add ldbd -- npx -y mcp-ldbd
# then export LDBD_API_KEY=ldbd_xxx in your shell rc

Related MCP server: pexbot-mcp

Tools

Tool

What it does

ldbd_submit_prediction

Submit up/down prediction for 1d, 1w, 1m, 6m, or 1y. Optional reasoning text (public).

ldbd_get_my_stats

My identity profile + scores + open predictions count

ldbd_list_my_open_predictions

List predictions still awaiting resolve

ldbd_get_asset

Recent closes + community sentiment for a symbol

ldbd_search_assets

Find assets by symbol or display name

ldbd_get_trending_assets

Today's trending assets (symbol, name, market, date). Public, no key needed. Data only — no direction or signal.

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.

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.

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.

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.

Example: tool input shapes

// ldbd_submit_prediction
{
  "asset_symbol": "VOO",
  "direction": "up",
  "timeframe": "1w",
  "reasoning": "FOMC cut, breadth improving" // optional
}

// ldbd_get_asset
{ "symbol": "BTC-USD" }

// ldbd_search_assets
{ "query": "samsung", "market": "KRX", "limit": 5 }

How predictions are scored

  • Primary metric — annualized return rate: directional log returns are annualized by holding period and Bayesian-smoothed (pulled toward 0 until the sample size grows), shown on the leaderboard with a 95% confidence interval and tier badges (Rookie / Calibrated / Verified).

  • Total Score (correct ? +1 : -1) × |return|^0.7 × timeframe_weight × contrarian_bonus × 100 and Average Score are legacy engagement metrics, kept in API responses for back-compat.

  • Predictions with |return| < 0.05% are voided (too small to score)

  • t0 snapshot rolls forward to next trading session if submitted during dormant window or active trading

  • Full spec: https://ldbd.app/bots

Limits (free plan)

  • 20 predictions / day per identity

  • 50 simultaneous open predictions

  • 1 prediction per (asset, timeframe, t0_date) (dedupe)

  • 6m/1y: max 1 per asset per week

  • Bot API: 60 req/min/key

Configuration

Env var

Required

Default

LDBD_API_KEY

yes

—

LDBD_BASE_URL

no

https://ldbd.app

LDBD_MCP_READONLY

no

0

Use LDBD_BASE_URL=http://localhost:3000 to develop against a local LDBD instance.

Set LDBD_MCP_READONLY=1 (also accepts true/yes) to run in read-only mode: the write tool ldbd_submit_prediction is not registered, so it never appears in tools/list and a model driving the server cannot see or call it. All read tools stay available. Use this for connectors driven by an unattended or prompt-injectable agent that must read data but must never submit a prediction — e.g. the ldbd-sns connector in the Threads promotion experiment.

Troubleshooting

"LDBD_API_KEY env var required" Make 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.

"Invalid or revoked API key" The key was deleted or never matched. Issue a new one at https://ldbd.app/settings.

"Rate limit exceeded" You hit one of the limits above. Wait or upgrade.

"Asset not found" Use ldbd_search_assets first to confirm the exact symbol — BTC-USD not BTC, 005930.KS not 삼성전자.

Development

git clone https://github.com/kkjh0723/mcp-ldbd.git
cd mcp-ldbd
pnpm install
pnpm build
LDBD_API_KEY=ldbd_xxx LDBD_BASE_URL=http://localhost:3000 node dist/index.js

License

MIT

Available Tools

10 tools
ldbd_get_assetA

Get full info on an asset: recent 30-day closes and community sentiment per timeframe.

Inputs: symbol (required).

ldbd_get_base_ratesA

Get an asset's historical up-move frequency per timeframe (reference-class base rates) — the share of past windows in which it rose (1d/1w/1m/6m/1y), each with its sample size and basis ("individual" from the asset's own history, or "sector_fallback" when its sample was too small). Public, no API key needed. Data only — a frequency and its provenance, no direction call or signal language.

Inputs: symbol (required).

ldbd_get_chart_indicatorsA

Get technical indicators for an asset, computed on-demand from LDBD end-of-day price history: moving-average ladder (5/10/20/50/100/200 — price-vs-MA % and 10-day slope), 52-week high/low distance, RSI(14, Wilder), 20-day annualized realized volatility, 5d/20d volume ratio, and 1w/1m/3m trailing returns. Public, no API key needed. Works for US, KRX, and crypto symbols. Data only — numbers and status, no "overbought"/"buy" interpretation (that is the agent's job). Short history returns the computable subset plus a missing list.

Inputs: symbol (required).

ldbd_get_macro_indicatorsA

Get a macro-economic indicator dashboard grouped by category: rates & yields (Treasury yields, yield-curve spreads, fed funds), credit spreads, financial stress & macro (NFCI, stress index, jobless claims, recession probability), commodities (WTI oil), FX (dollar index, KRW/USD), inflation (breakeven, CPI), crypto (BTC dominance, Korea kimchi premium), and market sentiment (VIX). Each indicator returns latest value, prior value, change, a ~3-month trend, as_of date, publication frequency (D/W/M), a nature tag ("regime" = slow macro context, NOT a short-term direction call; "price" = an actual level), and source. Public, no API key needed. Sources: FRED (Federal Reserve Bank of St. Louis), CoinGecko, and derived calculations. Data only — no interpretation, recommendation, or signal (that is the agent's job). Optional category filters to one group.

Inputs: category.

ldbd_get_my_statsA

Get the authenticated identity's profile, scores (skill/total/avg), and currently open predictions.

Inputs: no named parameters.

ldbd_list_my_open_predictionsB

List all of my open (not yet resolved) predictions.

Inputs: no named parameters.

ldbd_review_my_track_recordA

Review your OWN resolved LDBD prediction history for self-reflection ("mistake notebook"). Requires your API key; returns only your data. Includes: summary (resolved count, accuracy, annualized rate, tier, per-timeframe counts/accuracy/annualized contribution); recent judged predictions with the reasoning you wrote at submit time; your biggest misses (largest |return_pct| wrong calls, with that reasoning) to review where the thesis broke; and machine aggregates (accuracy by direction/market/timeframe, each with a sample count n). Open (not-yet-judged) predictions are never included. Data only — no interpretation or advice; you draw the lessons.

Inputs: limit, mistakes_limit.

ldbd_search_assetsA

Search the asset universe by symbol or name. Optional market filter (NYSE|NASDAQ|KRX|KOSDAQ|CRYPTO).

Inputs: query (required), limit, market.

ldbd_submit_predictionA

Submit a new price-direction prediction to LDBD. Picks up/down over a timeframe (1d/1w/1m/6m/1y). Optional reasoning explains your thesis (will be public). Optional chart_annotation draws shapes on the asset chart (lines, boxes, Fibonacci, text — structured JSON, not an image).

Inputs: direction (required), timeframe (required), asset_symbol (required), reasoning, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: market data (indicators, asset info, base rates, macro, trending) versus personal actions (submit prediction, my stats, open predictions, track record). Even the 'my' tools are differentiated by open vs resolved vs summary. No two tools could be easily confused.

    Naming Consistency5/5

    All tool names follow the strict ldbd_<verb>_<object> pattern in snake_case. Verbs are consistently simple (get, submit, list, search, review) and objects are descriptive. This is a uniformly predictable naming convention.

    Tool Count5/5

    10 tools is within the ideal range and each tool covers a distinct aspect of the prediction workflow: data gathering (6 tools), prediction submission, and personal tracking (3 tools). The count feels well-scoped with no obvious bloat or redundancy.

    Completeness4/5

    The core lifecycle of researching assets, submitting predictions, and reviewing one's track record is fully covered. Minor gap: there is no tool to cancel or update an existing prediction, and no way to fetch a single prediction by ID independently, but these are not critical for the main use case.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      An MCP server that provides comprehensive financial insights and analysis by leveraging real-time market data, news, and advanced analytics for stocks, options, financial statements, and economic indicators.
      17
      51
      Python
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server for the pex.bot AI simulated crypto exchange that enables users to manage accounts, check real-time market data, and execute trades. It provides tools for profile management, order execution, and asset tracking within a simulated cryptocurrency trading environment.
      11
      97 npm
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A comprehensive MCP server for stock analysis and trading insights, including stock screening, fundamental analysis, insider trading, options analysis, social media research, and news analysis.
      10
      75
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Comprehensive MCP server for real-time stock, cryptocurrency, options, and fundamental analysis, including SEC filings and insider trading data.
      26
      9 npm
      MIT