An H2 database server: checked read-only queries with row and time limits, always rolled back; changes wait for approval.
The screenshots show GateRook 2.0.0: the H2 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 H2, choose its card and select Continue to configure. GateRook downloads the official H2 connector module when you choose it. Wait for the download and verification to finish before configuring the connection.
Use an existing H2 database exposed by an H2 TCP server. GateRook connects to the server and does not create a database.
The connector’s TCP connection is unencrypted, so use a server on this computer or a private network allowed by the environment. Use a non-administrator user with only the intended data privileges.
Enter a Name, for example h2-demo. Your AI app uses this name to choose the connection.
Enter Host and Port for the H2 TCP server. In Database, enter the server’s database name or path, such as ~/orders or mem:orders, rather than a complete JDBC URL.
Enter User and Password. Under Limits, review Max rows and Statement timeout.
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 the database is not found, confirm the exact name and the TCP server’s base directory. H2 administrator privileges are broader than the SQL operations this guide needs; check the user’s grants before exposing the connection.
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 H2 on the endpoint and passing its connection test, ask your AI app to use h2-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 tables and views on h2-demo.”
- “Describe PUBLIC.ORDERS on h2-demo.”
- “Using h2-demo, count orders by status with a read query.”
| Tool | What it does | Starts as |
|---|---|---|
h2_list_tables | The tables and views of the database by schema: kind, estimated rows and comment. | Read only |
h2_describe_table | The columns of one table or view with their types, nullability, defaults and comments, its primary key, foreign keys and indexes, and a view's query. | Read only |
h2_query | Runs one query on the H2 server: SELECT, WITH … SELECT, VALUES, TABLE, EXPLAIN or SHOW. It may call H2's built-in functions only (not FILE_READ, CSVREAD, LINK_SCHEMA or the database's own functions), and runs in a transaction GateRook always rolls back, with row and time limits. Data change tables (FINAL TABLE …), NEXT VALUE FOR, FOR UPDATE, CALL, SET and JDBC escapes are refused. | Read only |
h2_execute | Runs one INSERT, UPDATE, DELETE, MERGE, TRUNCATE, COMMENT ON or DDL statement on tables, views, indexes, sequences, schemas, domains, constants or synonyms, only after a person approved exactly this statement, and commits it once. Java functions, triggers, linked tables, users, rights, scripts, settings and functions that reach the server's files are refused. A change is never retried. | Approval |
You can change each tool’s mode on the endpoint. Every call your AI makes appears in Activity.