Setup
1. Copy the plugin
2. Register in librechat.yaml
3. Set environment variables
4. Restart LibreChat
All MCP tool calls from LibreChat agents are now traced in LangSight.What you see
How it works
The plugin hooks into LibreChat’s MCP clientcallTool() method before agents use it. It records timing, wraps the original call, and POSTs a span to POST /api/traces/spans as a fire-and-forget task.
Fail-open: if LangSight is unreachable, the plugin logs a debug message and the tool call proceeds normally.
Requirements
- Node.js 18+ (uses native
fetch) - LibreChat with plugin support
langsight serverunning