-
Notifications
You must be signed in to change notification settings - Fork 70
Description
Summary
The Nightwatch MCP server currently exposes tools for managing issues (list_issues, get_issue, update_issue, add_issue_comment), along with application and environment metadata.
However, there is currently no way to query application logs through MCP, even though Nightwatch already captures structured logs generated through Laravel’s logging system.
Exposing logs via MCP would allow AI tools and developer assistants to access one of the most fundamental debugging primitives: application logs.
Current Limitation
While Nightwatch collects application logs generated through Laravel's logging system, those logs are currently only accessible through the Nightwatch dashboard.
The MCP server does not provide a way to query logs programmatically, which prevents AI assistants and developer tools from accessing this information during debugging workflows.
Why This Matters
The MCP server effectively turns Nightwatch into a structured observability interface for AI development tools.
For this interface to be complete, AI assistants should be able to access the same primitives developers rely on when debugging production systems:
- Exceptions
- Executions / requests
- Application logs
Nightwatch MCP already exposes exceptions and application metadata, but without logs an AI assistant cannot reconstruct the full execution context of an issue or behavior.
Exposing logs would allow AI tools to perform more effective debugging, monitoring, and investigation directly from the development environment.
Example AI Workflows
Investigating a production error
User:
Why is the checkout endpoint returning 500 in production?
Possible AI workflow:
list_issuesget_issuequery_logsfor related messages
The AI can correlate exceptions with surrounding application logs.
Checking system health
User:
Show me error logs from the last 24 hours
Investigating application behavior
User:
Show logs containing "payment retry"
Debugging a scheduled task
User:
What happened during the last subscription renewal job?
The AI can inspect logs associated with the job execution.
Proposed Tool
Tool: query_logs
Parameters:
application_id(required): Application UUIDenvironment_id(optional): Filter by environmentlevel(optional): Filter by log level (debug,info,warning,error,critical)message(optional): Text search within log messagesexecution_id(optional): Filter logs associated with a specific request, job, command, or scheduled task executionfrom(optional): Start datetime for the time rangeto(optional): End datetime for the time rangelimit(optional): Number of log entries to return (default: 50)
Expected Impact
Adding log querying to the Nightwatch MCP server would:
- Enable complete AI-assisted debugging workflows
- Remove the need to context-switch to the Nightwatch dashboard
- Allow AI tools to correlate exceptions, executions, and logs
- Improve production observability for AI-driven development environments
I'd be happy to help test this capability or provide feedback on the API design if needed.