Claude Langfuse Plugin
A Claude Code plugin that turns Claude into an expert at
Langfuse — instrumentation, setup, evaluation, monitoring, and self-hosting —
for Langfuse Cloud and self-hosted deployments, across the Python and JS/TS SDKs and 50+ framework
integrations.
It bundles 5 skills, 6 commands, 3 agents, 1 safety hook, and both Langfuse MCP servers, designed
on one principle: distill durable judgment, fetch the facts live. The plugin carries the
decisions and workflows (which eval method when, how to size a deployment, how to read an
experiment); it fetches exact, version-sensitive code from the live Langfuse docs at runtime so it
never goes stale.
Features
Skills (auto-activate when relevant)
| Skill | What it owns |
|---|
langfuse (vendored, official) | Instrumentation code, the langfuse-cli, live-docs access, prompt migration, judge calibration, CI/CD experiment gates, error analysis, SDK upgrades |
langfuse-setup | Adoption decisions (Cloud vs self-host, region), onboarding sequence, first-trace verification, production-readiness checklist |
langfuse-evaluation | Eval strategy — methods, scores model, datasets/experiments, LLM-as-a-judge, code evaluators, human annotation, RAG/agent/multi-turn/external-pipeline evals, experiment interpretation |
langfuse-monitoring | Dashboards, the Metrics API, score analytics, alerting (Spend-Alerts vs app cost) |
langfuse-deployment | Self-hosting: architecture & sizing, scaling, backups/upgrades/migrations, security & SSO |
Commands (you invoke explicitly)
| Command | Does |
|---|
/lf-setup | Guides onboarding — deployment choice, keys, first trace, prod-readiness |
/lf-eval | Designs/sets up an evaluation — method, scores, datasets/experiments, online/offline |
/lf-monitor | Builds or queries monitoring — dashboards, metrics, alerting |
/lf-deploy | Plans/operates a self-hosted deployment — sizing, scaling, backups, security |
/lf-trace-review | Reviews traces to find, classify, and quantify failure modes |
/lf-health-check | Checks a connection/project: auth, ingestion, recent activity |
Agents (autonomous, delegated tasks)
| Agent | Does | Access |
|---|
eval-designer | Explores your codebase and produces a concrete, app-specific evaluation plan | read + reasoning |
setup-doctor | Diagnoses why a setup isn't working (traces missing, auth, region mismatch, flush) | read-only |
trace-reviewer | Builds a quantified failure taxonomy from your traces and proposes fixes + regression cases | read-only |
Hook
A non-blocking PostToolUse check that warns if you accidentally hardcode a Langfuse secret key
(sk-lf-…) in an edited file. High-signal, never blocks your edit.
MCP servers (.mcp.json)
langfuse-docs — public docs search/retrieval (no auth). 3 tools.
langfuse-data-platform — authenticated access to your project's prompts, traces,
observations, scores, datasets, evaluators, metrics, and getHealth. 61 tools.
Installation
1. Prerequisites
- Claude Code installed.
- A Langfuse project (Cloud sign-up at
cloud.langfuse.com, or self-hosted) and a
project API key pair (pk-lf-… / sk-lf-…) from Project Settings → API Keys.
2. Install the plugin
Local (development / trying it out):
git clone https://github.com/jbaham2/claude-langfuse-plugin
claude --plugin-dir /path/to/claude-langfuse-plugin
Via a marketplace (shareable install):
/plugin marketplace add jbaham2/claude-langfuse-plugin
/plugin install claude-langfuse-plugin
(Exact marketplace commands can vary by Claude Code version — see the Claude Code plugin docs.)
3. Set credentials (never paste keys into chat)
Copy the template and fill it in:
cp skills/langfuse-setup/assets/.env.example .env
Set in your shell or .env:
export LANGFUSE_PUBLIC_KEY="pk-lf-..."
export LANGFUSE_SECRET_KEY="sk-lf-..."
export LANGFUSE_BASE_URL="https://cloud.langfuse.com" # your region or self-host URL
export LANGFUSE_HOST="$LANGFUSE_BASE_URL" # some tools read HOST instead
4. Enable the data-platform MCP
The authenticated MCP uses Basic Auth. Generate the token and export it before launching Claude
Code (the value is interpolated into .mcp.json at load):
export LANGFUSE_MCP_AUTH="$(printf '%s:%s' "$LANGFUSE_PUBLIC_KEY" "$LANGFUSE_SECRET_KEY" | base64)"
Set the right region endpoint in .mcp.json (the url of langfuse-data-platform):