# mcp-server-langfuse

> MCP Server

This repository provides an MCP server for Langfuse Prompt Management, enabling access and management of prompts through the Model Context Protocol. It supports prompt listing, retrieval, and compilation with variables,

## Overview

- **Category:** AI
- **Language:** TypeScript
- **Stars:** 174
- **Forks:** 6
- **Owner:** langfuse
- **GitHub:** https://github.com/langfuse/mcp-server-langfuse
- **Homepage:** https://langfuse.com
- **Created:** 2025-02-15T11:58:06+00:00
- **Updated:** 2025-03-28T11:25:49+00:00
- **Source:** https://model-context-protocol.com/servers/mcp-server-langfuse-prompt-management

## Setup

## Setup

**Step 1: Build**

```bash
npm install
npm run build
```

**Step 2: Add the server to your MCP servers:**

**Claude Desktop**

Configure Claude for Desktop by editing `claude_desktop_config.json`

```json
{
  "mcpServers": {
    "langfuse": {
      "command": "node",
      "args": ["<absolute-path>/build/index.js"],
      "env": {
        "LANGFUSE_PUBLIC_KEY": "your-public-key",
        "LANGFUSE_SECRET_KEY": "your-secret-key",
        "LANGFUSE_BASEURL": "https://cloud.langfuse.com"
      }
    }
  }
}
```

Make sure to replace the environment variables with your actual Langfuse API keys; the server will now be available to use in Claude Desktop.

**Cursor**

Add new server to Cursor:

- Name: `Langfuse Prompts`
- Type: `command`
- Command:
  ```bash
  LANGFUSE_PUBLIC_KEY="your-public-key" LANGFUSE_SECRET_KEY="your-secret-key" LANGFUSE_BASEURL="https://cloud.langfuse.com" node absolute-path/build/index.js
  ```

## Tools

## Available Tools

		1. MCP Prompt (`prompts/list`): List all available prompts with optional cursor-based pagination, returning prompt names and their required arguments.
		2. MCP Prompt (`prompts/get`): Get a specific prompt, transforming Langfuse prompts into MCP prompt objects and compiling it with provided variables.
		3. Tools (`get-prompts`): List available prompts with an optional `cursor` parameter for pagination, returning a list of prompts with their arguments.
		4. Tools (`get-prompt`): Retrieve and compile a specific prompt, requiring a `name` parameter and an optional `arguments` parameter.
