Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>DB Metadata Extractor MCPNew to Visual Studio Code? Get it now.
DB Metadata Extractor MCP

DB Metadata Extractor MCP

Optisol business solutions

|
7 installs
| (0) | Free
Extract Database Schema Metadata with AI-Ready Precision — supports PostgreSQL, Snowflake, SQL Server, BigQuery, and Oracle.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

db-metadata-extractor-mcp

Extract Database Schema Metadata with AI-Ready Precision

Unlock your database structure for AI agents with comprehensive schema extraction across PostgreSQL, Snowflake, SQL Server, BigQuery, and Oracle databases.


Overview

db-metadata-extractor-mcp is an MCP server that transforms raw database schemas into AI-readable metadata. Whether you're building intelligent data tools, automating data discovery, or enabling AI agents to understand your data landscape, this server provides structured, actionable schema information.

Built for developers and data engineers who need AI assistants to interact intelligently with databases — without requiring direct database access.


Key Features

  • 🔍 Extract Schema Metadata — Automatically retrieve table structures, column definitions, indexes, constraints, and relationships from your database with a single command.

  • 🗄️ Multi-Database Support — Works seamlessly with PostgreSQL, Snowflake, SQL Server, BigQuery, and Oracle.

  • 🤖 AI-Ready Output — Returns structured JSON metadata optimized for LLM consumption, enabling AI agents to understand schemas without parsing logs.

  • 🐳 Flexible Deployment — Install via PyPI for Python environments or deploy as an isolated Docker container for enterprise deployments.

  • ⚡ Zero Configuration — Minimal setup: pass credentials and connection parameters, get metadata back. No complex configuration files required.


Supported Databases

Database Version Support
PostgreSQL 10+ ✅ Full
Snowflake Latest ✅ Full
SQL Server 2016+ ✅ Full
Google BigQuery Current ✅ Full
Oracle 12c+ ✅ Full

Installation

  1. Install the extension from the VS Code Marketplace.

  2. Ensure Python 3.8+ is installed on your system.

  3. Install the required Python package:

    pip install db-metadata-extractor-mcp
    
  4. (Optional) Configure a custom Python path via VS Code settings:

    • Open Settings → search for DB Metadata Extractor MCP
    • Set the pythonPath to your Python executable (e.g. C:\Python311\python.exe or /usr/bin/python3)

How to Use

The extension automatically registers the MCP server. Once installed, use it through any MCP-compatible AI assistant in VS Code.

Example 1: Extract Table Schema

Prompt:

I want to extract metadata from the Oracle database.

Credentials are:
{
  "host": "**.***.**",
  "port": 1521,
  "database_name": "DB_NAME",
  "username": "YOUR_DB_USER_NAME",
  "password": "*****"
}

Place the extracted JSON in the output folder.

Sample Response:

{
  "database": "my_analytics_db",
  "schema": "public",
  "tables": [
    {
      "name": "users",
      "columns": [
        { "name": "id",         "type": "integer",      "nullable": false, "constraints": ["PRIMARY KEY"] },
        { "name": "email",      "type": "varchar(255)", "nullable": false, "constraints": ["UNIQUE"] },
        { "name": "created_at", "type": "timestamp",    "nullable": false, "default": "CURRENT_TIMESTAMP" }
      ]
    },
    {
      "name": "orders",
      "columns": [
        { "name": "id",      "type": "integer", "nullable": false, "constraints": ["PRIMARY KEY"] },
        { "name": "user_id", "type": "integer", "nullable": false, "constraints": ["FOREIGN KEY"] }
      ]
    }
  ]
}

Example 2: Understand Relationships

Prompt:

I need to write a query that joins users with their orders.
Can you analyze the schema and tell me about the relationship between these tables?

Sample Response:

{
  "relationships": [
    {
      "source_table": "orders",
      "source_column": "user_id",
      "target_table": "users",
      "target_column": "id",
      "relationship_type": "MANY_TO_ONE",
      "join_query": "SELECT * FROM users u JOIN orders o ON u.id = o.user_id"
    }
  ]
}

Example 3: Extract Index Metadata

Prompt:

What indexes are available on my Snowflake warehouse and which columns do they cover?

Sample Response:

{
  "database": "analytics_warehouse",
  "indexes": [
    {
      "index_name": "idx_orders_user_id",
      "table_name": "orders",
      "columns": ["user_id"],
      "type": "B-TREE",
      "unique": false
    },
    {
      "index_name": "idx_users_email",
      "table_name": "users",
      "columns": ["email"],
      "type": "HASH",
      "unique": true
    }
  ]
}

Real-World Workflows

🧠 AI-Assisted SQL Query Generation

Your AI assistant uses the extracted schema to understand your database structure and generate accurate SQL queries — without guessing column names or relationships.

🔭 Data Exploration

Quickly explore unfamiliar databases by asking:

  • "What tables contain customer information?"
  • "Show me all tables related to transactions."

📄 Schema Documentation

Auto-generate data dictionaries:

  • "Create a markdown document describing all tables in my database including their purposes and column definitions."

✅ Data Quality Validation

Enable AI to identify schema issues:

  • "Are there any tables without primary keys?"
  • "Which tables have nullable foreign keys?"

Requirements

  • VS Code 1.98.0 or later
  • Python 3.8+
  • Database access credentials for the target database

Links

  • 📦 GitHub Repository: github.com/Optisol-Business/db-metadata-extractor-mcp
  • 🐍 PyPI Package: pypi.org/project/db-metadata-extractor-mcp

License

MIT


Tags: mcp-server • database • schema-extraction • postgresql • snowflake • bigquery • metadata • sql • ai-agent • data-engineering

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft