Postgres MCP access versus a deployed app’s data grant
If your goal is to give an assistant unrestricted SQL access, that is not the workflow described here. SpringRoll’s agent tools help discover and request published data products. The deployed application receives a scoped grant and the source credential stays in SpringRoll.
A natural-language question does not authorize arbitrary SQL. The query plan is resolved against published fields and the app’s grant before the PostgreSQL adapter executes it.
Define the dashboard with sample records first
Use the Operations Dashboard example to agree the task and expected result. The public example uses fictional data; it is not a live database connection. For a synthetic orders dataset, choose region, total and status, and leave customer email outside the app’s requested fields.
Write one acceptance question, such as total orders by region, and compute its expected answer from the fixture. This gives the data owner a concrete request to review.
Publish the product and approve the app’s scope
Configure a PostgreSQL connection with a read-only database role. Publish the dataset and fields as a data product. The app owner requests fields, query limits and an expiry for the intended environment, and the data owner reviews the grant.
The PostgreSQL adapter compiles parameterized SQL from validated plans and runs reads inside a read-only transaction with a statement timeout. Published identifiers and field mappings come from the data product. Cross-dataset joins are not supported by this adapter.
The application uses its own authorized identity for the approved read. Keep the database URL and source password out of the app’s source, browser JavaScript and prompts.
Test the boundary before using company records
Run the accepted question against a disposable or approved test dataset. Try a field outside the grant and verify denial. Check the row limit, then revoke or expire the grant and verify that a new read fails.
Save the expected and observed results, app environment and grant reference. The example is a test plan, not a claim that a production database is connected. Revoking a grant blocks future reads; review any rows the app already cached or exported separately.
