Notion
PerSQL mirrors your Notion databases into SQL tables you can query, join, and aggregate — the things Notion’s own views can’t express.
Add the integration
Section titled “Add the integration”-
Go to notion.persql.com/install/start, authorize the workspace, and connect it to your PerSQL workspace.
-
Pick which Notion databases to mirror. Each becomes a SQL table in a workspace database in your workspace, kept current as pages change.
Query the mirror
Section titled “Query the mirror”import { PerSQL } from "@persql/sdk";
const db = new PerSQL({ token: process.env.PERSQL_TOKEN }) .database(process.env.PERSQL_DATABASE);
const { data } = await db.query(` SELECT status, count(*) AS n FROM tasks GROUP BY status`);Point an agent at the Notion MCP to manage the mirror:
https://notion.persql.com/mcpAuthenticate with a PerSQL bearer token. notion_discover_databases and
notion_register_database pick what to mirror; workspace_recipe returns the
sync snippet and workspace_list shows connected workspaces.