Yes, and on schema discovery it’s the easiest conversion in this series — easier than GraphQL introspection, easier than parsing a WSDL. Every mainstream database can list its own tables, columns, and foreign keys on request. What’s different, and harder, is that a database isn’t an API at all. SOAP, gRPC, and a CLI tool all ship a fixed set of operations someone already decided to expose. A database just has a query language and whatever the connecting credential is allowed to touch — which means the real work of this conversion isn’t translation, it’s deciding what counts as a tool in the first place.

Why a database doesn’t fit the rest of this series

Every other conversion here starts from a document that already lists the operations: an OpenAPI spec, a WSDL file, a GraphQL schema, a gRPC reflection response. That document is the boundary — it says what the API author decided was safe to call. A database has no equivalent boundary built in. Any syntactically valid query the connected role can run is “legal” as far as the engine is concerned, whether it reads one row or joins across the whole schema. Converting a database into an MCP server means drawing that boundary yourself, because nothing upstream drew it for you.

Two shapes a database MCP server can take

Nearly every project in this space picks one of two designs:

  • One general-purpose query tool. A single run_query(sql) tool that passes whatever the model writes straight to the database. Fastest to build, and it hands the model the same interface a person would get at a SQL terminal — no narrower.
  • Schema-introspected, scoped tools. The server reads information_schema (or the engine’s equivalent catalog) at startup and generates specific tools from it — list_tables, get_schema(table), run_select(table, filters) — closer to the generated-tool-per-operation pattern covered in turning an API into an MCP server. It’s more work, and it’s the version that can actually be scoped to what a task needs instead of what the engine allows.

What already exists for this conversion

We haven’t run any of these through our own scanner, so treat this as a starting point to evaluate against your own database, not a recommendation. Most published projects are hand-configured servers rather than true generators: point one at a connection string and it exposes schema introspection plus a query tool for Postgres, MySQL, SQLite, SQL Server, or some combination, depending on the project. A smaller number go further — Calame, for one, builds several scoped MCP servers from a single database (one per access group), with column-level masking and query limits baked in, rather than one server with one wide-open query tool. That scoped-by-default shape is closer to what a schema-introspected server should look like than the common single-tool version is.

Two database MCP servers already sit in gate’s own directory, and neither was generated this way — both are vendor-built: Neon and Supabase. Both are Postgres underneath, both require OAuth rather than a bare connection string, and both are a useful reference point for what a database MCP server looks like when the vendor who runs the database built the scoping themselves instead of leaving it to a generator.

The risk this series hasn’t had yet: no API layer to hide behind

With REST, GraphQL, or gRPC, there’s always a vendor-defined interface standing between the model and the data — the API author already decided what’s queryable before any MCP server existed. A raw run_query(sql) tool removes that decision point entirely. If the tool builds its SQL by string-concatenating the model’s argument instead of using a parameterized query, the failure mode is the same shape covered in command injection in MCP tools — an argument escaping its intended slot and running as code — except here the “command” is SQL, and what it reaches is every table the connected credential can see, not just the fields one endpoint meant to expose.

Read-only by default, then annotate

The strongest fix isn’t in the tool code at all: connect with a database role that only has SELECT grants, so a write is impossible at the engine level no matter what the tool lets through. That’s a harder guarantee than a tool annotation, which is why it should come first — see MCP tool annotations explained for what a readOnlyHint does and doesn’t promise on its own. And before connecting a generic query tool with a role that can write, ask whether the task actually needs that, in the spirit of excessive agency in MCP: a tool that can do more than the job requires is a liability even on the days it’s used correctly.

The credential is a connection string, not an OAuth token

Unlike most servers in gate’s catalog, a hand-built database MCP server usually skips OAuth entirely — see adding OAuth to an MCP server for what that flow would normally add — and just takes a connection string with a username and password baked in in its place. That string tends to live exactly where MCP secret exposure describes: a plaintext config file or environment block next to every other server’s key. The difference is scope. A leaked API key usually reaches one vendor’s surface. A leaked database connection string reaches whatever the role behind it can see — which is one more reason the read-only role above should be the default, not an upgrade.

Where gate fits: gate’s MCP Builder generates tool definitions from an API’s documentation or OpenAPI spec, the path covered in turning an API into an MCP server — it doesn’t connect to a database and introspect a schema directly. Neon and Supabase show up in gate’s directory as already-built Postgres MCP servers you can connect through a gateway instead. Whichever path you take for a database of your own, once the resulting server exists you can put it behind gate: it’s scanned for prompt injection before it goes live, the query tool sits behind its own allow / ask / block rule like any other, and every call lands in a plain-language log. See /mcp-gateway for the full picture.

The bottom line

A database can become an MCP server, and schema introspection makes discovery easier than almost anything else in this series. What doesn’t get easier: a database has no built-in boundary on what’s safe to query, so the tool design — one wide SQL tool versus several scoped ones — and the credential behind it — a role that can write versus one that can only read — are decisions a generator can’t make for you. Make the read-only role the default, scope the tools to what the task actually needs, and treat the connection string with the same care as any other secret a model could end up repeating back.