---
title: "List available databases"
method: GET
path: "/api/databases"
tags: ["Databases"]
---

# List available databases

`GET /api/databases`

Returns the list of configured database connections and the currently selected database.

## Response `200`

A list of available databases.

- ListDatabasesResponse — Response containing the list of databases and the currently selected database.
  - `current` string, required — The name of the currently selected database.
  - `databases` DatabaseInfo[], required — The available database connections.
    - `allow_writes` boolean, required — Whether write operations are permitted on this connection.
    - `database` string, required — The database name.
    - `host` string, required — The database server hostname.
    - `name` string, required — The logical name of the database connection.
    - `port` integer, required — The database server port.
    - `sslmode` string, required — The SSL mode for the connection.
    - `user` string, required — The database user.

## Other responses

- `401` — Missing or invalid authentication token.
- `403` — Insufficient permissions.

---

[API](https://skmtc.dev/pgedge/apis/pgedge-postgres-mcp-server-api.md) · [All operations](https://skmtc.dev/pgedge/apis/pgedge-postgres-mcp-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pgedge/pgedge-postgres-mcp-server-api/revisions/6084bab46b1e/schema)
