Get the FREE Ultimate OpenClaw Setup Guide →

mcp -langfuse

Model Context Protocol (MCP) Server for Langfuse Prompt Management. This server allows you to access and manage your Langfuse prompts through the Model Context Protocol.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio langfuse-mcp-server-langfuse node <absolute-path>/build/index.js \
  --env LANGFUSE_BASEURL="https://cloud.langfuse.com" \
  --env LANGFUSE_PUBLIC_KEY="your-public-key" \
  --env LANGFUSE_SECRET_KEY="your-secret-key"

How to use

This MCP server exposes Langfuse prompts through the Model Context Protocol, allowing MCP clients to discover and retrieve prompts via MCP concepts. It implements the MCP Prompts interface for discovery (prompts/list) and retrieval (prompts/get), transforming Langfuse prompts (text and chat) into MCP prompt objects and compiling them with provided variables. For broader compatibility, the server also exposes two tooling endpoints (get-prompts and get-prompt) that replicate the same functionality so clients that don’t support the prompt capability can still enumerate and fetch prompts. To use it, run the server in a Node.js environment and configure your MCP client (e.g., Claude Desktop or Cursor) to point at the build/index.js entry, supplying your Langfuse API keys and base URL as environment variables. Once configured, you can list available prompts and fetch specific prompts by name, optionally providing arguments to be merged into the final prompt.

How to install

Prerequisites:

  • Node.js (LTS version) installed on your system
  • Access to Langfuse account and API keys (public key, secret key, and base URL)

Installation steps:

  1. Clone the MCP server repository or download the package.
  2. Install dependencies: npm install
  3. Build the server (if required by the project setup): npm run build
  4. Start the server (example): LANGFUSE_PUBLIC_KEY="your-public-key" LANGFUSE_SECRET_KEY="your-secret-key" LANGFUSE_BASEURL="https://cloud.langfuse.com" node <absolute-path>/build/index.js
  5. Verify the server is running by making a test request to the MCP endpoints or by using the MCP inspector as described in the repository README.

Additional notes

Notes and tips:

  • Ensure your Langfuse API keys are kept secure and not committed to version control. Use environment variables as shown in the examples.
  • The MCP prompts implementation may only expose prompts labeled as production in Langfuse, per current limitations.
  • Arguments for prompts are treated as optional in this version; descriptions may be unavailable due to Langfuse prompt specifications.
  • If you’re integrating with Claude Desktop or Cursor, you can configure the mcpServers section in the respective config files to point to the Node entry, including the required environment variables.
  • When troubleshooting, enable verbose logs and verify that the environment variables are correctly picked up by the runtime environment.

Related MCP Servers

Sponsor this space

Reach thousands of developers