# db-metadata-extractor-mcp [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/Optisol-Business/db-metadata-extractor-mcp  
**GitHub Stars:** 0  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/db-metadata-extractor-mcp

## Description
Extract database schema metadata from PostgreSQL, Snowflake, SQL Server, BigQuery, Oracle.

## Tools
Capabilities this server exposes over MCP:

- **extract_metadata** — Extracts complete schema metadata from a database.
- **query_metadata** — Query previously extracted metadata.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "db-metadata-extractor-mcp": {
    "command": "uvx",
    "args": ["db-metadata-extractor-mcp"]
  }
}
```

## Documentation

## What db-metadata-extractor-mcp MCP server does

The db-metadata-extractor-mcp MCP server connects to PostgreSQL, Snowflake, SQL Server, BigQuery, and Oracle databases to collect structural information. The extraction includes schemas, tables, columns, primary keys, indexes, and constraints. Results are written to a local directory as JSON, so the captured metadata does not require a cloud storage service.

This is useful when an AI agent needs to inspect a database layout, find tables containing a particular field, or work from a saved schema snapshot. It can extract an entire database or limit the operation to a named schema or selected tables.

## How it works

The server exposes two MCP tools. `extract_metadata` accepts the database type and output path, along with connection and scope parameters appropriate to the selected system. PostgreSQL and SQL Server connections can use host, port, database, username, and password values. Snowflake uses account, warehouse, role, and database settings. BigQuery uses a project ID and a base64-encoded service account JSON key. Oracle is supported as a database type, with the required connection details supplied to the tool.

After extraction, the tool returns the saved file path and summary counts such as the number of tables and columns. `query_metadata` reads one of these JSON files and returns matching table results. It supports substring filters for table and column names, plus page and page-size arguments for larger schemas. The db-metadata-extractor-mcp MCP server therefore separates collection from later lookup: extraction creates the local dataset, and queries reuse it.

## Setup and configuration

Install the package from PyPI with `pip install db-metadata-extractor-mcp`, or clone the repository and install it in editable mode with `pip install -e .`. Python 3.8 or newer is required. Database-specific dependencies include `psycopg2-binary` for PostgreSQL, `snowflake-connector-python` for Snowflake, `pyodbc` and `pymssql` for SQL Server, `google-cloud-bigquery` for BigQuery, and `oracledb` for Oracle.

Run `db-metadata-extractor-mcp` to start the server in stdio mode. The documented Claude Desktop configuration starts that command with no arguments. For an HTTP connection, use `--transport streamable-http` and provide a port such as `3000`.

## Tools and capabilities

- `extract_metadata`: Collects schema details and saves them as a local JSON file.
- `query_metadata`: Searches an extracted JSON file by table-name or column-name substring.
- Database selection for PostgreSQL, Snowflake, SQL Server, BigQuery, and Oracle.
- Optional schema and table selection to reduce the extraction scope.
- Pagination for browsing query results from large schemas.
- Local output with source details, extraction time, schemas, tables, columns, and indexes.

## Limitations and notes

The server needs valid database credentials, network access, and sufficient permissions. The documented minimum permissions include `SELECT` on tables, `USAGE` on schemas, and `CONNECT` on databases.

Output is stored on the local filesystem at the path supplied to `extract_metadata`. The tool requires a writable destination, and later queries must reference the resulting JSON file.

_Full upstream README: https://allmcps.com/mcp/db-metadata-extractor-mcp/readme_

