MCP server: Fetch Postgres server logs
The PlanetScale MCP server has a new tool: planetscale_get_postgres_logs. It pulls server logs for a Postgres branch straight into your AI assistant, so you can dig into what your database was doing without leaving your editor.
Logs come back newest first, and you can narrow them down by log level (INFO, DEBUG, WARNING, ERROR), time range, server role (primary or replica), and pod name. The default window is the last hour. If you want something more specific, the query parameter takes a raw LogsQL filter, including pipe stages like error | stats count().
Ask questions like:
- "Show me any errors in the Postgres logs for my default branch over the last 6 hours"
- "What checkpoint activity happened on the primary this morning?"
- "Count the warnings in yesterday's logs by hour"