@solaraai/mcp-server-langfuse
v0.0.3
Published
A MCP Server for Langfuse Prompt Management
Downloads
2
Maintainers
Readme
@solaraai/mcp-server-langfuse
Model Context Protocol (MCP) server that exposes your Langfuse prompts as standard MCP prompts and CLI tools. Now installable in one line:
npx -y @solaraai/mcp-server-langfuse # requires LANGFUSE_* env varsFeatures
MCP Prompt capability
| Endpoint | Description |
| ------------------- | ----------------------------------------------------- |
| prompts/list | Paginated list of available prompts (production label) |
| prompts/get | Fetch + compile a single prompt (text or chat) |
CLI / Tool equivalents (for hosts that don’t implement prompt-capability)
| Tool name | Purpose |
| ---------------------- | ------------------------------------------------------------- |
| get-prompts | List prompts (same as prompts/list) |
| get-prompt | Fetch & compile one prompt |
| get-prompts-bulk | Fetch & compile multiple prompts in one call |
| edit-prompt | Create or update (new version) a prompt |
| publish-prompt | Tag a prompt version as production or any label |
| list-prompt-versions | Show all versions/labels/tags for a prompt |
| get-prompt-metadata | Fetch metadata for a version/label (no compilation) |
| search-prompts | Search by name / label / tag |
| validate-prompt | Linter for prompt templates (unclosed vars, chat JSON etc.) |
Quick start
# 1. Export your Langfuse keys (or add them to your MCP config)
export LANGFUSE_PUBLIC_KEY="pk-..."
export LANGFUSE_SECRET_KEY="sk-..."
export LANGFUSE_BASEURL="https://cloud.langfuse.com" # optional, defaults
# 2. Launch via npx
npx -y @solaraai/mcp-server-langfuseThe server runs on STDIO, so any MCP host that supports stdio transports (e.g.
Cursor, Claude Desktop) can spawn it with the same npx command.
Example host configuration (Cursor)
{
"mcpServers": {
"langfuse-prompts": {
"command": "npx",
"args": ["-y", "@solaraai/mcp-server-langfuse"],
"env": {
"LANGFUSE_PUBLIC_KEY": "pk-...",
"LANGFUSE_SECRET_KEY": "sk-...",
"LANGFUSE_BASEURL": "https://cloud.langfuse.com"
},
"transportType": "stdio"
}
}
}Development
git clone https://github.com/solaraai/mcp-server-langfuse
cd mcp-server-langfuse
npm install
npm run build # emits ./build/index.js
# Run locally
LANGFUSE_PUBLIC_KEY=... node ./build/index.js
# Or test via MCP inspector
npx @modelcontextprotocol/inspector npx -y @solaraai/mcp-server-langfusePublishing
Scoped packages default to private. We ship it public:
npm run deploy # builds & publishes with --access publicLimitations
- Only prompt versions with the
productionlabel are returned byprompts/listfor safety (usesearch-promptsor passlabelparam to query others). - Variable metadata (required/optional, description) isn’t available from the Langfuse API, so arguments are listed without rich docs.
Contributions welcome – open an issue or PR!
