Langfuse MCP

v0.14.0
io.github.avivsinai/langfuse-mcp Checked 10 hours ago Published 1 month ago

Langfuse MCP server for accessing and analyzing telemetry data via natural language

Values you need

VariableWhat it is
LANGFUSE_PUBLIC_KEYrequired secret Langfuse public API key
LANGFUSE_SECRET_KEYrequired secret Langfuse secret API key
LANGFUSE_HOSToptional Langfuse API base URL (Cloud or self-hosted) Default: https://cloud.langfuse.com
LANGFUSE_MCP_READ_ONLYoptional Set true to disable write tools Default: false

PyPI (uvx) verified

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add langfuse-mcp -e 'LANGFUSE_PUBLIC_KEY=<LANGFUSE_PUBLIC_KEY>' -e 'LANGFUSE_SECRET_KEY=<LANGFUSE_SECRET_KEY>' -- uvx langfuse-mcp==0.14.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "langfuse-mcp": {
      "args": [
        "langfuse-mcp==0.14.0"
      ],
      "command": "uvx",
      "env": {
        "LANGFUSE_PUBLIC_KEY": "<LANGFUSE_PUBLIC_KEY>",
        "LANGFUSE_SECRET_KEY": "<LANGFUSE_SECRET_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "langfuse-mcp": {
      "args": [
        "langfuse-mcp==0.14.0"
      ],
      "command": "uvx",
      "env": {
        "LANGFUSE_PUBLIC_KEY": "<LANGFUSE_PUBLIC_KEY>",
        "LANGFUSE_SECRET_KEY": "<LANGFUSE_SECRET_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "LANGFUSE_PUBLIC_KEY",
      "id": "langfuse-public-key",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "LANGFUSE_SECRET_KEY",
      "id": "langfuse-secret-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "langfuse-mcp": {
      "args": [
        "langfuse-mcp==0.14.0"
      ],
      "command": "uvx",
      "env": {
        "LANGFUSE_PUBLIC_KEY": "${input:langfuse-public-key}",
        "LANGFUSE_SECRET_KEY": "${input:langfuse-secret-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.langfuse-mcp]
command = "uvx"
args = ["langfuse-mcp==0.14.0"]
env = { "LANGFUSE_PUBLIC_KEY" = "<LANGFUSE_PUBLIC_KEY>", "LANGFUSE_SECRET_KEY" = "<LANGFUSE_SECRET_KEY>" }

For AI agents

  1. Ask the user for: LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: list_annotation_queues, create_annotation_queue, get_annotation_queue, list_annotation_queue_items, get_annotation_queue_item, create_annotation_queue_item, update_annotation_queue_item, delete_annotation_queue_item, ….
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json