MCP and databases, and it's viral

Jan 13, 2025

What is MCP and Why Everyone's Talking About It

Model Context Protocol, or MCP, is Anthropic's open standard that launched in November 2024 and flying high on rage. Technically, it's a simple API that enable RPC like communication between AI and external systems. Think of it as a universal connector that lets AI assistants like Claude, ChatGPT, Goose talk directly to your tools and external data sources. Before MCP, every AI company was building their own custom integrations. Want to connect to Google Drive? Custom integration. Need database access? Another custom integration. It was messy and didn't scale. MCP changed the game by creating one standard protocol. Now, build one MCP server and any AI assistant that supports MCP can use it. It's like how USB standardized device connections - you don't need a different cable for every device anymore. The developer community caught on fast. Within weeks of launch, hundreds of MCP servers appeared - for databases, file systems, APIs, even Git repositories. The protocol is open source, so anyone can build servers or integrate them into their applications. Why did it go viral? Because it solves a real pain point. Developers were tired of building the same integrations over and over. Companies wanted their AI assistants to access internal tools without custom development. MCP gave both groups what they needed. There is even directory of 17000+ MCP servers implementations. Let's dive deep with practical exmple ahow how complex task turned into ease with MCP.

An Example

Last week, our team needed to pull environmental data for a specific product from our database. Sounds simple? - Well, not quite.

The Challenge

We needed to find:

  • An item with EAN code 6411513699058
  • Only SERIES type items
  • Environmental profiles data with timescale 1 and unit in kg
  • Specific values: GWP total, circularity scores, and Ecosystem impact

For anyone who's worked with databases, you know this isn't a straightforward single query. Our database has multiple tables - items, env_profiles, env_data_calculations, and several connection tables. The relationships aren't always obvious, and some tables use UUIDs while others don't.

The Old Way

Traditionally, this would mean:

  1. Writing SQL queries to explore table structures
  2. Understanding the relationships between tables
  3. Dealing with data type mismatches
  4. Multiple attempts to get the right JOIN statements
  5. Finally extracting the data
  6. Then building a UI to visualize it

This process could easily take hours, if not days, especially if you're not intimately familiar with the database schema.

Enter MCP (Model Context Protocol)

With MCP, we connected Claude directly to our Supabase database. What happened next was remarkable.

We simply asked: "Can you check if there is any env profile table available for items ean_code 6411513699058 of items type only SERIES?"

Claude started exploring:

  • It listed the tables
  • Found the items table and located our product
  • Discovered the data type mismatch between tables
  • Identified the active_env_data_multiplier_group_id as the key
  • Navigated to env_data_calculations table
  • Retrieved all the environmental data we needed

All of this happened in a natural conversation. No need to know the exact table names or column structures beforehand.

From Data to Dashboard

The best part? Once Claude found the data, we asked it to create a simple UI. Within seconds, we had an interactive dashboard showing:

  • GWP breakdown by lifecycle stages
  • Environmental impact across 10 different categories
  • Circularity metrics with visual pie charts
  • All organized in clean, tabbed sections

The entire journey from "I need this data" to "here's your interactive dashboard" took minutes instead of hours.

What This Means

MCP isn't just about connecting AI to databases. It's about removing the friction between questions and answers. Our team members who aren't database experts can now:

  • Ask questions in plain English
  • Get insights from complex data structures
  • Visualize results immediately
  • Iterate quickly on their queries

The Real Superpower

The superpower of MCP isn't that it writes SQL queries for you. It's that it understands context, explores intelligently, adapts to what it finds, and presents results in useful ways. When Claude hit that UUID type mismatch error, it didn't give up. It tried different approaches, found the multiplier_group_id connection, and successfully retrieved the data. This kind of adaptive problem-solving is what makes MCP truly powerful.

How We Set It Up

Setting up the Supabase MCP Server with Claude was surprisingly straightforward. Here's what we did:

Step 1: Get Your Supabase Credentials

First, we gathered the necessary information from our Supabase project:

  • Project ID (found in your Supabase project settings)
  • Access token (generated from your Supabase account settings)

Step 2: Install the MCP Server

Installed the Supabase MCP server package. You can do this through Claude Desktop's settings or configure it manually in your MCP configuration file.

Step 3: Configure the Connection

Added the Supabase MCP server configuration with our credentials. The setup looks something like this in your Claude Desktop config:

{
  "mcpServers": {
    "supabase": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-supabase",
        "your-project-id",
        "your-access-token"
      ]
    }
  }
}

Step 4: Restart and Connect

After saving the configuration, we restarted Claude Desktop. That's it. Claude could now directly interact with our Supabase database. Here's simple video to explore how above steps resulted:

Security Note

Create a read-only access token specifically for this integration. This ensures Claude can query our data but can't modify anything in the database. Always follow the principle of least privilege when setting up these connections.

Looking Forward

We're just scratching the surface. With MCP, our environmental data that was locked away in complex database structures is now accessible to anyone on the team who needs it. No SQL knowledge required. No waiting for the data team to run reports.

Just ask, and get answers.

The setup took less than 10 minutes, but the value we're getting from it is immeasurable. That's the promise of MCP, and in our experience, it delivers.