Skip to main content

Monitoring and Logs

Comprehensive monitoring and logging are essential for maintaining secure and reliable MCP server deployments. Helmet provides real-time visibility into all server operations.

Accessing Server Logs

From the Servers Dashboard

  1. Navigate to the Servers section
  2. Find your deployed server
  3. Click on the server row or menu actions
  4. Select "View Logs"

Log Stream Interface

The log viewer provides:

  • Real-time log streaming
  • Historical log browsing
  • Search and filtering
  • Export capabilities

Understanding Log Entries

Log Structure

Each log entry contains:

  • Timestamp: When the event occurred
  • Event Type: Category of log entry
  • Direction: Request flow (client->server or server->client)
  • Method: MCP method being called
  • Session ID: Unique identifier for the session
  • Metadata: Additional context and details

Event Types

Session Events

  • session_start: New client connection established
  • session_end: Client disconnection
  • proxy_close: Proxy shutdown

Request/Response Logs

  • request: Incoming client requests
  • response: Server responses
  • error: Failed operations

System Events

  • initialization: Server startup
  • configuration: Settings changes
  • performance: Metrics and statistics

Log Entry Details

Request Logs

Request entries show:

{
"event": "request",
"method": "tools/call",
"params": {
"name": "query_database",
"arguments": {
"query": "SELECT * FROM users"
}
},
"timestamp": "2024-06-04T10:15:32Z"
}

Response Logs

Response entries include:

{
"event": "response",
"result": {
"rows": 42,
"execution_time": "125ms"
},
"error": null,
"timestamp": "2024-06-04T10:15:33Z"
}

Error Logs

Error entries contain:

{
"event": "error",
"error": {
"code": -32001,
"message": "Tool access denied by policy",
"data": {
"type": "policy_block",
"policy_id": "sec-001"
}
}
}

Monitoring Features

Coming Soon!

Troubleshooting

Use logs to diagnose:

  • Connection failures
  • Authentication issues
  • Tool execution errors
  • Performance problems
  • Policy violations

Security Monitoring

Watch for security events:

  • Failed authentication attempts
  • Policy blocks
  • Unusual access patterns
  • Suspicious tool usage
  • Data access anomalies

Troubleshooting with Logs

Common Scenarios

High Error Rates

  1. Filter by error events
  2. Identify error patterns
  3. Check error messages
  4. Review recent changes
  5. Implement fixes

Performance Issues

  1. Analyze response times
  2. Check resource metrics
  3. Identify slow tools
  4. Review query patterns
  5. Optimize bottlenecks

Security Incidents

  1. Search for policy blocks
  2. Review access patterns
  3. Check authentication logs
  4. Identify anomalies
  5. Take corrective action