Multi-Agent Monitoring LangFuse MCP Server
About
A Model Context Protocol (MCP) server for comprehensive monitoring and observability of multi-agent systems using Langfuse.
Details
- Author
- hardikloglogn
- Categories
- Productivity, Infrastructure, AI, Other
Jump to
Setup
Install Multi-Agent Monitoring LangFuse MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/hardikloglogn/langfuse-mcp-python
Follow the installation instructions in the repository README, then restart your MCP client.
Multi-Agent Monitoring LangFuse MCP Server
A Model Context Protocol (MCP) server for comprehensive monitoring and observability of multi-agent systems using Langfuse.
A Model Context Protocol (MCP) server for comprehensive monitoring and observability of systems using Langfuse.
- Monitorall your agents in real-time
- Trackperformance metrics (latency, cost, token usage)
- Debugfailed executions with detailed traces
- Analyzeagent performance across time periods
- Comparedifferent agent versions via metadata filters
- Managecosts and set budget alerts
- Visualizeagent workflows
- Python 3.11 or higher
- A Langfuse account (sign up here)
- agents instrumented with Langfuse
# Install via pip pip install -r requirements.txt # Or install from source git clone https://github.com/yourusername/langfuse-mcp-python.git cd langfuse-mcp-python pip install -e .
Create a.envfile with your Langfuse credentials:
cp .env.example .env # Edit .env and add your credentials
LANGFUSE_PUBLIC_KEY=pk-lf-xxxxx LANGFUSE_SECRET_KEY=sk-lf-xxxxx LANGFUSE_HOST=https://cloud.langfuse.com
If you want a Streamable HTTP URL that works across all tools, run the server with the Streamable HTTP transport:
python -m langfuse_mcp_python --transport streamable-http --host 127.0.0.1 --port 8000 --path /mcp
python -m langfuse_mcp_python --transport sse --host 127.0.0.1 --port 8000
You can then connect any Streamable HTTP-compatible MCP client to:
If you are using Claude Desktop or Cursor, keep the defaultstdiotransport in their configs.
{ "mcpServers": { "langfuse-monitor": { "command": "uvx", "args": ["--python", "3.11", "langfuse-mcp-python"], "env": { "LANGFUSE_PUBLIC_KEY": "pk-lf-xxxxx", "LANGFUSE_SECRET_KEY": "sk-lf-xxxxx", "LANGFUSE_HOST": "https://cloud.langfuse.com" } } } }
{ "mcpServers": { "langfuse-monitor": { "command": "python", "args": ["-m", "langfuse_mcp_python"], "env": { "LANGFUSE_PUBLIC_KEY": "pk-lf-xxxxx", "LANGFUSE_SECRET_KEY": "sk-lf-xxxxx" } } } }
Make sure your agents send traces to Langfuse:
from langfuse.langchain import CallbackHandler from langgraph.graph import StateGraph # Create Langfuse callback handler langfuse_handler = CallbackHandler( public_key="pk-lf-xxxxx", secret_key="sk-lf-xxxxx", host="https://cloud.langfuse.com" ) # Create your agent workflow = StateGraph(AgentState) workflow.add_node("planner", planner_node) workflow.add_node("executor", executor_node) app = workflow.compile() # Run with Langfuse monitoring result = app.invoke( {"input": "user query"}, config={ "callbacks": [langfuse_handler], "metadata": { "agent_name": "my_planner_agent", "version": "v1.0" } } )
- src/langfuse_mcp_python/server.pyCLI entrypoint and stdio transport
- src/langfuse_mcp_python/http_server.pyStreamable HTTP and SSE transport
- src/langfuse_mcp_python/utils/tool_registry.pyTool setup and registration
- src/langfuse_mcp_python/tools/Tool implementations and specs
- src/langfuse_mcp_python/integrations/langfuse_client.pyLangfuse API client
- src/langfuse_mcp_python/core/base_tool.pyShared cache and metrics
- watch_agentsMonitor active agents
- get_traceFetch a trace by ID
- analyze_performanceAggregate performance over time
- get_metricsAggregate metrics (latency, cost, tokens)
- get_scoresFetch scores
- submit_scoreCreate a score
- get_score_configsList score configurations
- get_promptsList prompts
- create_promptCreate a prompt
- delete_promptDelete a prompt
- get_datasetsList datasets
- create_datasetCreate a dataset
- create_dataset_itemAdd an item to a dataset
- get_modelsList models
- create_modelCreate a model
- delete_modelDelete a model
- get_commentsList comments
- add_commentAdd a comment
- get_annotation_queuesList annotation queues
- create_annotation_queueCreate a queue
- get_queue_itemsList queue items
- resolve_queue_itemResolve a queue item
- get_blob_storage_integrationsList integrations
- upsert_blob_storage_integrationCreate or update an integration
- get_blob_storage_integration_statusFetch integration status
- delete_blob_storage_integrationDelete an integration
- get_llm_connectionsList connections
- upsert_llm_connectionCreate or update a connection
- get_projectsList projects
- create_projectCreate a project
- update_projectUpdate a project
- delete_projectDelete a project
Show me all active agents from the last hour
Active Agent Monitoring (last_1h) Total Traces Found: 15 Showing: Top 10 traces 1. research_agent (Trace: trace-abc12...) - Status: completed - Session: session-xyz - Started: 2026-03-19T10:25:00Z - Latency: 1250ms - Tokens: 3420 - Cost: $0.0234
Watch only my research_agent and planner_agent from the last 24 hours
Analyze performance of my planner_agent over the last 24 hours
Show cost breakdown by agent for the last week
MCP Client (Claude, Cursor, etc.) -> Langfuse MCP Server (stdio/HTTP) -> Langfuse API -> Langfuse Platform -> Your Langfuse Agents
- Never commit credentials- Use environment variables
- Rotate API keysregularly
- Use read-only keyswhere possible
- Enable rate limitingin production
- Mask sensitive datain traces
- Check active agents:watch_agents
- Review performance:analyze_performance
- Check costs:get_metrics
- Investigate failures:get_trace
- Establish baseline:analyze_performancefor current version metadata
- Deploy new version with different metadata
- Compare versions by runninganalyze_performancewith version filters
- Make data-driven deployment decisions
- Track costs:get_metricsgrouped by agent
- Identify expensive agents
- Optimize high-cost operations
- Track savings over time
- Check environment variables are set correctly
- Verify Langfuse API keys are valid
- Ensure Python 3.11+ is installed
- Check logs:tail -f ~/.mcp/logs/langfuse-monitor.log
- Verify agents are instrumented with Langfuse
- Checklangfuse_handleris passed to agent invocations
- Ensure metadata includesagent_name
- Verify time window is appropriate
- Reduce number of traces fetched (use filters)
- Enable caching:CACHE_ENABLED=true
- Use "minimal" depth for trace details
- Consider batch processing for large datasets
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Submit a pull request
MIT License - see LICENSE file for details
- Langfuse- Open-source LLM observability
- LangGraph- Agent framework
- Model Context Protocol- MCP specification
- Core monitoring tools
- Performance analysis
- Cost tracking
- Debugging utilities
- Real-time streaming updates
- Custom alert system
- Predictive analytics
- A/B testing support
- Multi-project support
- Export to data warehouses
Version: 1.0.0
Last Updated: March 23, 2026
Status: Production Ready
Paid remote MCP for AI agent run monitoring, failure detection, tool-call incident replay, SLA receipts, and client status exports.
Behavioral trust scoring for 14,820+ MCP servers. Check reliability, latency, and success rates before tool calls.
MCP server for Langfuse — query traces, debug errors, analyze sessions and prompts from any AI agent
Structural observability for AI conversations. Detects loops, stuck states, and convergence patterns across 17 channels without analyzing content.
Monitor team productivity, usage, and spending for AI assistants using the Cursor Admin API.
Guck is a tiny, MCP-first telemetry store for agentic debugging
Connect to Netdata MCP using Claude desktop
AI-powered wellbeing insights with real-time benchmarks and alerts.
Expose data observability, lineage, test results & incidents to AI agents via MCP
Provides access to OpenTelemetry traces and metrics through Logfire.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.

