Enabling the endpoint v7

The AIDB package installs the edb-endpoints binary into the Postgres bindir. To enable the endpoint:

  1. Make sure aidb is in shared_preload_libraries — AIDB's other background workers already require it, so if AIDB is installed and running, this is likely already set. See Configuring AIDB if it isn't.

  2. In postgresql.conf, turn the endpoint on:

    edb.endpoints_mcp_enabled = on
  3. If the database you want to serve isn't postgres, also set edb.endpoints_mcp_database to the name of the database where you ran CREATE EXTENSION aidb — a plain database name, not a connection string:

    edb.endpoints_mcp_database = 'my_aidb_db'

    The endpoint connects to this database for every call. It serves only one database per Postgres instance at a time. Pointing edb.endpoints_mcp_database at a different database and reloading switches which one is served, it doesn't add a second one. Serving more than one database at once needs a separate Postgres instance, each running its own endpoint.

  4. Restart Postgres. edb.endpoints_mcp_enabled is a postmaster parameter, so a reload isn't enough.

  5. Check that the endpoint is up. By default it listens on 127.0.0.1:8765:

    curl -fsS http://127.0.0.1:8765/health
    curl -fsS http://127.0.0.1:8765/ready

    Both return HTTP 200.

Every other parameter has a working default. See Configuring the endpoint for the full list.

Once the endpoint is up, see Provisioning example for an end-to-end walkthrough that provisions agent roles and calls the endpoint from a client.