TraceLens MCP Server - Query your observability data through AI tools
npm install @tracelens/mcp-serverModel Context Protocol server for TraceLens observability platform. Query your application's performance data, dependency graphs, and security insights directly through AI tools like Kiro CLI, Claude Code, and Cursor.
``bash`
npm install -g @tracelens/mcp-server
Add to your .kiro/settings/mcp.json:
`json`
{
"mcpServers": {
"tracelens": {
"command": "tracelens-mcp",
"args": [
"--endpoint", "http://localhost:3001",
"--project", "my-app"
]
}
}
}
Add to your claude_desktop_config.json:
`json`
{
"mcpServers": {
"tracelens": {
"command": "tracelens-mcp",
"args": [
"--endpoint", "http://localhost:3001",
"--project", "my-app"
]
}
}
}
Parameters:
- timeRange (string): Time range to analyze (1h, 24h, 7d) - default: "1h"threshold
- (number): Minimum duration threshold in milliseconds - default: 100
Parameters:
- operation (string, optional): Specific operation to analyze
Parameters:
- severity (string): Minimum severity level (low, medium, high, critical)
Parameters:
- operation (string, optional): Operation name to filter bystatus
- (string, optional): Trace status filter (success, error)minDuration
- (number, optional): Minimum duration in millisecondslimit
- (number): Maximum number of traces to return - default: 10
Parameters:
- includeMetrics (boolean): Include detailed performance metrics - default: true
`bash`
kiro-cli "What are the current performance bottlenecks in my app?"
kiro-cli "Show me the dependency graph for the user authentication flow"
kiro-cli "What security vulnerabilities are actually being used at runtime?"
kiro-cli "Find all slow database queries from the last hour"
`
What's causing my API to be slow? Use TraceLens to analyze the bottlenecks.
Show me the critical path for my checkout process.
Are there any high-severity security issues I should fix immediately?
`
- --endpoint : TraceLens API endpoint (default: http://localhost:3001)--api-key
- : TraceLens API key (optional)--project
- : Project ID to query (default: "default")
- TRACELENS_ENDPOINT: API endpointTRACELENS_API_KEY
- : API keyTRACELENS_PROJECT_ID
- : Project ID
`bashInstall dependencies
npm install
MIT - see LICENSE file for details.