PostGIS uses GateRook’s PostgreSQL connector. PostgreSQL with PostGIS. The read-only spatial functions agents may call are listed under Advanced; add more there.
The screenshots show GateRook 2.0.0: the PostGIS form, the endpoint selector, and this connector’s actual tool preview. The form and preview have not been saved. Select a screenshot to open it at full size.
1. Create a connection and enter the settings
In GateRook, open Connections, select Add connection, search for PostGIS, choose its card and select Continue to configure.
Use a PostgreSQL database where PostGIS is already enabled and where your database role can read the spatial tables you need.
GateRook’s PostGIS choice uses the PostgreSQL connector and starts with a list of spatial functions that reads may call.
Enter a Name, for example postgis-demo. Your AI app uses this name to choose the connection.
Choose PostGIS. Enter a Name, PostgreSQL Host and Port, then the database User and Password.
Review Functions reads may call: the preset includes functions such as st_asgeojson, st_astext, st_distance and st_srid. Add other functions only after checking that they cannot change data.
Select Load databases, then choose only the databases this connection should expose. If loading fails because the account cannot connect to postgres, set Discovery database to a database it can access and try again.
Choose Development, Staging or Production to match the service. Review the connector’s limit and access settings before continuing.

2. Test the connection and add it to an endpoint
Select Continue to test. GateRook checks the settings from your computer. Review the result and resolve any connection, certificate or permission error before continuing.
If a spatial query fails, check the extension and table schema, the function allowlist and the geometries’ SRIDs. A database connection alone does not establish that two geometries use compatible coordinates.
After the test passes, select Continue to add to an endpoint. Choose the endpoint your AI app uses, review its tool modes, then select Save connection. GateRook offers default as the starter endpoint.

3. Use the connection from your AI IDE
After saving PostGIS on the endpoint and passing its connection test, ask your AI app to use postgis-demo, or the name you chose. If its tools are missing, confirm the endpoint assignment and refresh the MCP connection or start a new chat.
The preview below shows this connector’s default tools before saving. The table explains what each tool can do; connection settings, credentials and endpoint policies can restrict access further.

Start with a small read request. Replace example resource names with existing resources your connection may access. Open Activity after the call to inspect its connection, tool, arguments, policy decision and result metadata.
Ask your AI, for example
- “List the spatial tables on my PostGIS connection.”
- “Show five geometries from the selected table as GeoJSON using ST_AsGeoJSON.”
- “Report the SRIDs present in the geometry column I select.”
| Tool | What it does | Starts as |
|---|---|---|
sql_list_schemas | List schemas, tables and views in the selected PostgreSQL database, within the connection and policy restrictions. | Read only |
sql_describe_table | Describe a table’s columns, types, keys and indexes where available. | Read only |
sql_query | Run one validated PostgreSQL read statement in a read-only transaction, then roll it back. Function allowlists, database permissions and output limits apply. | Read only |
sql_execute | Run supported data or schema changes with Approval by default. Database permissions and the environment policy determine which changes are allowed. | Approval |
You can change each tool’s mode on the endpoint. Every call your AI makes appears in Activity.