AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

logs-nextjs

PostHog logs for Next.js

Original source
posthog
License
MIT
Pinned revision
cac7c80a9e5b73484d18eda1bffb47297c938e0c

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

Ask your assistant

Use Agentic Memory skills to read posthog--logs-nextjs at revision cac7c80a9e5b73484d18eda1bffb47297c938e0c, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 8

references/debug-logs-mcp.md

Debug Logs with MCP - Docs

The PostHog MCP server gives AI agents direct access to your Logs. Ask your agent to search, filter, and analyze log data without leaving your code editor.

With MCP, your agents can:

  • Search and filter logs – Query by severity level, service name, date range, and free text.
  • Discover log attributes – List available attributes and their values to build targeted queries.
  • Debug in context – Investigate production issues without switching tools.
  • Correlate with traces – Use trace IDs and span IDs from log entries to follow request flows across services.

This works in any MCP client – Cursor, Windsurf, Claude Code, and others.

Example prompts

Try these prompts with your MCP-enabled agent:

  • Show me all error logs from the last hour.
  • What services are logging errors? Search for error logs from the payments service.
  • Find logs related to trace ID abc123.
  • What log attributes are available? Show me the values for the service.name attribute.
  • Show me warning and error logs from the last 24 hours, excluding debug noise.

Logs tools

The MCP server provides three tools for working with logs:

| Tool | Description | | --- | --- | | logs-query | Search and query logs with filters for severity levels (trace, debug, info, warn, error, fatal), service names, date ranges, and free text. Supports pagination for large result sets. | | logs-list-attributes | List available log attributes in your project to discover what you can filter on. Supports filtering by attribute type (log or resource). | | logs-list-attribute-values | Get possible values for a specific log attribute. Find service names, log levels, or other attribute values before querying. |

A typical workflow:

  1. Call logs-list-attributes to discover available filter attributes.
  2. Call logs-list-attribute-values to find specific values (e.g., which service names exist).
  3. Call logs-query to search logs with the right filters.

Get started

See the MCP server documentation for setup instructions.

Community questions

Ask a question

Was this page useful?

HelpfulCould be better