Databridge Kit

io.github.CloudCorpRecordsPublished by GitHub account CloudCorpRecordsv0.1.0Updated Nov 7, 2026

Execute SQL and inspect tables, views, schemas and more on a configured database.

VerifiedSTDIODesktop onlyDatabasesDeveloper Tools

Overview

AI-generated overview

Local MCP server that runs SQL and inspects tables, views, schemas, triggers, indexes, sequences and routines in one configured PostgreSQL database.

What you can do
  • Run a single SQL statement against the configured PostgreSQL database and get rows back as JSON objects
  • List base tables, views and schemas in the configured database
  • List triggers, indexes, sequences and stored procedures (routines)
  • Also usable as a command-line tool with the same commands, printing rows as JSON
When to use it
Useful when an assistant needs to explore or query one PostgreSQL database, for example to learn an unfamiliar schema or run ad-hoc read queries. It is a general bridge, so it also suits cases where the assistant should be able to modify data.
Requirements
Runs locally over stdio via npx or the Docker image. Needs a PostgreSQL connection string, either as a command-line argument or in the DATABRIDGE_DATABASE_URL environment variable (plain DATABASE_URL also works). Live queries require the psql client on the PATH; without it or without a connection string the server starts but calls fail.
Before you install
The connection string contains database credentials and is passed on the command line or in an environment variable. Statement type is not restricted, so the assistant can write, alter or delete data as well as read it; point it only at databases where that is intended. Only one statement per call is accepted, and results come back as strings rendered by psql.

Installation

In SourceWeft

  1. Open Databridge Kit in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

databridge-kit

databridge-kit is a small bridge between an agent (or a terminal) and one configured PostgreSQL database. It can run a single SQL statement and answer the seven inspection questions that come up constantly while exploring an unfamiliar database: which tables, views, schemas, triggers, indexes, sequences and stored procedures exist.

The toolset mirrors the documented prebuilt Postgres toolset of a config-defined database toolbox: the tools are fixed, the database is whatever the connection string points at. There is no bundled database driver — statements run through the psql command-line client, so a machine that wants live answers needs psql on its PATH. Without it — or without a connection string — the server still starts and lists its tools; only the calls themselves report the problem.

Install

bash
npx @reneturcios/databridge-kit list-tables postgres://user@localhost:5432/mydb

Or run the container image:

bash
docker run -i ghcr.io/cloudcorprecords/databridge-kit

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.

CLI

bash
# Run one SQL statement; rows print as JSONdatabridge-kit execute-sql postgres://alice@localhost/shop "SELECT id, name FROM products ORDER BY id"
# Inspection commands; each prints its rows as JSONdatabridge-kit list-tables postgres://alice@localhost/shopdatabridge-kit list-views postgres://alice@localhost/shopdatabridge-kit list-schemas postgres://alice@localhost/shopdatabridge-kit list-triggers postgres://alice@localhost/shopdatabridge-kit list-indexes postgres://alice@localhost/shopdatabridge-kit list-sequences postgres://alice@localhost/shopdatabridge-kit list-stored-procedures postgres://alice@localhost/shop
# Start the MCP server (connection string optional, see below)databridge-kit mcp postgres://alice@localhost/shop
databridge-kit --version

Exit codes: 0 on success, 1 when the statement, the connection string, or psql itself fails (the error says which), 2 for usage errors.

The connection string is a normal PostgreSQL URL: postgres:// or postgresql://, with host, optional port (default 5432), database name from the path, and optional user and password in the userinfo. For the mcp command the string can be left off the command line and supplied through the DATABRIDGE_DATABASE_URL environment variable instead (plain DATABASE_URL works too).

How statements and inspections work

execute_sql accepts exactly one statement per call. Semicolons inside string literals and comments do not count as statement boundaries, but a second real statement is rejected before anything reaches the database. The statement type is not restricted — this is a general bridge, so a caller who can reach it can write as well as read; point it only at databases where that is intended.

Each inspection tool runs one fixed catalogue query:

ToolCatalogue read
list_tablesinformation_schema.tables (base tables)
list_viewsinformation_schema.views
list_schemasinformation_schema.schemata
list_triggersinformation_schema.triggers
list_indexespg_indexes
list_sequencesinformation_schema.sequences
list_stored_procedureinformation_schema.routines

Statements run as psql -v ON_ERROR_STOP=1 --csv -c <sql> and the CSV output is parsed into row objects. Values come back as the strings psql rendered.

MCP server

One bin serves both faces. The mcp subcommand starts a stdio MCP server:

bash
npx -y @reneturcios/databridge-kit mcp postgres://alice@localhost/shop

MCP client configuration:

json
{  "mcpServers": {    "databridge-kit": {      "command": "npx",      "args": ["-y", "@reneturcios/databridge-kit", "mcp"],      "env": { "DATABRIDGE_DATABASE_URL": "postgres://alice@localhost/shop" }    }  }}

Tools

ToolInputWhat it returns
execute_sqlsql (string, required) — one SQL statementThe result rows as a JSON array of objects keyed by column name.
list_tables—Rows describing the base tables in the configured source.
list_views—Rows describing the views in the configured source.
list_schemas—Rows describing the schemas in the configured source.
list_triggers—Rows describing the triggers in the configured source.
list_indexes—Rows describing the indexes in the configured source.
list_sequences—Rows describing the sequences in the configured source.
list_stored_procedure—Rows describing the stored procedures (routines) in the configured source.

A missing connection, a missing psql, a multi-statement execute_sql, and database errors all come back as tool errors — never as made-up rows.

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # node test runner over test/*.test.ts, no network, no live databasenpm run dev     # run the CLI from source via tsx

The core logic sits behind an injectable executor interface, which is what the test suite drives: connection-string parsing, the single-statement check, pass-through execution, error propagation, and the exact catalogue SQL behind every inspection tool are all covered with a fake executor.

License

MIT — see LICENSE.

Source: README.md at commit 303fded

Tools

8

execute_sql

Execute a SQL statement against the configured database source

Parameterssqlrequired

list_tables

List tables in the configured database source

Takes no parameters.

list_views

List views in the configured database source

Takes no parameters.

list_schemas

List schemas in the configured database source

Takes no parameters.

list_triggers

List triggers in the configured database source

Takes no parameters.

list_indexes

List indexes in the configured database source

Takes no parameters.

list_sequences

List sequences in the configured database source

Takes no parameters.

list_stored_procedure

List stored procedures in the configured database source

Takes no parameters.

Version history

1
  1. v0.1.0LatestOct 31, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts