Lazy Level 9000 - Use MCP with your vibe coding IDE
Too lazy to write SQL? Me too. Too lazy to copy and paste AI generated SQL? Me too. read on.
Yes! Maybe you fell asleep during your Uni classes. But someone was paying attention, enough attention, at least, to imbibe Son of Anton with enough SQL knowledge to do your homework for you.
Why are we here?
Son of Anton and I collaborate through Windsurf, an agentic IDE. I’ve been mucking around with it for a few months now, and can highly recommend it.
While working on I Am the Cloud, your favourite tech newsletter, I had the need to inspect the database. My laziness reached new heights:
I couldn’t be bothered to write some SQL
I couldn’t be bothered even to ask Cascade (the agent you speak with in Windsurf) to write the SQL for me
… because I couldn’t be bothered to copy-and-paste it and also couldn’t be bothered logging into the DB every time
What could I be bothered with, you ask? Oh …
I could definitely be bothered spending 30 minutes researching postgres clients, downloading them, installing them, adding in the credentials and connection string … (I settled on TablePlus, seems good!)
I finally decided to try out MCP, because then in my ULTIMATE LAZINESS OF DOOM could simply ask Windsurf questions like “did you actually scrape anything from thatnewsite.com in the last 24 hours?”, and then fully expect it to run off to the database itself, write the SQL it needs, and get my laziness-dopamine-hit that I’ve been craving all day.
Hey wait a sec … can you please subscribe? I’ll LIKE YOU!
Or are you already a subscriber? Consider SHARING my considerably impressive prose. Son of Anton didn’t even write any of this. No really. Pick one!
Wait MCP what?
So you’ve been curled up in your mancave, collecting cables that you really shouldn’t be collecting, and missed out on the whole MCP thing. It’s ok, you’re not alone.
MCP stands for Model Context Protocol. Introduced by Anthropic. Sounds fancy, doesn’t it? It’s not REALLY that fancy. Unlike the abominable number of cheap LinkedIn posts with Excalidraw-derived pictures trying to explain it to you, some of which have animations , I’ll try to do it one sentence. Let’s see how we go:
“MCP is a pluggable way to give an LLM access to external systems.”
Is that it? Yep, pretty much! Well, of course there is a little more nuance to it. In essence it’s just a piece of code that provides a standard API to the LLM, declares “tools” for the LLM, and then when the LLM calls those tools, it will do stuff.
That code is relatively simple, it maps tool calls from the LLM to actions against something else. In our case, that’s gonna be SQL calls to a postgres database.
“Installing an MCP server”
I know, it sounds all big and fancy and intimidating, potentially time sucking. But in reality, nope. It went like this. Don’t worry, I’ll show you how I did it so you can skip all the head scratching:
Google for “postgres MCP server” - found this repo.
Read the instructions, puzzled for a bit.
Opened the MCP config for Windsurf
Pasted in the thing. Cursed a bit, got the JSON wrong.
Clicked around in the UI for awhile and argued with Cascade (it told me it didn’t know what I was talking about, was quite hilarious)
Convinced Cascade that it did indeed have a new tool
Got a hello world working and it was BRILLIANT. I cackled maniacally.
Note for the security freaks: yes, you are literally letting something install itself on your machine and goodness knows what debauchery you can find in their code.
Photographic Proof
First, you need to find out where to configure MCP in Windsurf. It’s here, in a tiny little configure button within Cascade (you’ll also find it at the bottom if you’re within a project/folder):
That should pop up a file for you to edit, congrats - that’s the MCP config file for Windsurf. Then you just paste in the MCP config. In my case, I went for the npx (node) version, as so far I’ve had more luck with that:
Do you like the way I mixed up colours, sizes, and arrow types? I knew you’d like it.
After refreshing, you should see the server you added glowing with an unholy green light as you can see in my screenshots.
Using the MCP server, and THE ARGUMENT
Great!
MCP SERVER INSTALLED ✅
MAKE DEMANDS FOR SQL QUERIES ❌
Not gonna lie. This made me LOL like ALOL - Actual Laugh Out Loud.
Watch this:
Excellent. Looking good. So I figure, now it’s time to check out our database:
What?? Ugh … argument about to start:
OK so, everything seems valid, but still no go. When such a situation occurs, I like to apply the definition of insanity, just keep doing the same thing over and over again:
Never one to give up, I persisted, sharing the documentation for the MCP server. Seriously … still need to do everything!
I love the general politeness, but it’s interesting to me that it thought things through even within the same response. First saying “NOPE”, and then finally understanding, and apologizing. Which model you ask? This was Gemini 2.5 pro from Google (a reasoning model).
The actual fun part - it worked!
After all of that, I finally got to the cool part. Is it still cool to say cool? Nobody knows. My 10 year old would likely give you unequivocal commentary on that, tho.
Oh gosh, Substack is telling me off for the size of this post, too many images. So you’ll get text from now on.
ALL IS READY 🚀 or 🧨
Next I asked Cascade to hello world against our database. It ran an SQL query:
{
"sql": "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' ORDER BY table_name;"
}
and got some output:
[
{
"table_name": "feed_items"
},
{
"table_name": "issue_items"
},
{
"table_name": "newsletter_issues"
}
]
“Excellent! The query was successful.
It appears you have the following tables in the public schema of your newsletter database:
feed_items
issue_items
newsletter_issues
The connection via the MCP server configured in /Users/anton/.codeium/windsurf/mcp_config.json
is working correctly, and I can run read-only SQL queries.
What would you like to query or check next in the database? For example, I could count the number of rows in one of these tables.”
Hey that’s not bad!
Now I was getting excited, like NERD excited. Time to try the final thing I set out to do wayyyy back when I refused to write any SQL:
Me: “right. now i want you to find if there are any feed items that come from the next platform”
Lazy 😴 lack of capitilization and all.
Cascade: “Okay, I can query the feed_items table to find items from "The Next Platform". First, I need to see the exact column names in the feed_items table to know which column holds the source information (it might be source, url, feed_url, etc.).
Let's get the schema information for the feed_items table.”
…
Cascade: “Okay, I can query the feed_items table to find items from "The Next Platform". First, I need to see the exact column names in the feed_items table to know which column holds the source information (it might be source, url, feed_url, etc.).
… runs some SQL
“Let's get the schema information for the feed_items table.”
… runs some SQL
“Okay, the schema shows a url column (type text) which likely holds the article's specific URL. We also see a source column, but that might just contain 'rss'. The most reliable way to find items from "The Next Platform" is to check if their URL comes from the nextplatform.com domain.
I'll run a query to select the id, title, url, and published_at for items where the url contains 'nextplatform.com'.”
… runs some SQL …
Success!?
🤯 - whoa. It worked!
“Okay, the query found several feed items originating from nextplatform.com:
ID 29: "The Separate But Equal AI Realms Of China And The US" (Published: 2025-04-23)
…
more results …”
LAZY POWER LEVEL OVER 9000!!!
And there you have it—an epic tale of laziness triumphing through technological overkill. What started as a refusal to type out even a line of SQL ended with Cascade dutifully fetching exactly what I needed, thanks to MCP and Windsurf’s integration.
What’s the takeaway?
Well, apart from the obvious joy of automating away mundane tasks (which, let’s face it, is half the fun of tech), it’s a great demonstration of where AI tooling is headed. We’re entering a phase where “just ask the system” becomes the norm rather than the exception.
Is it efficient to spend 30 minutes avoiding a two-minute task? Maybe not. But is it satisfying? Absolutely.
Next time you’re staring down a tiny bit of effort you’d rather automate into oblivion, consider diving into MCP yourself. You might just find yourself cackling maniacally in your own mancave, SQL-free at last.
Until next time, stay lazy—and keep coding!
HEY! DID YOU LIKE THIS ARTICLE? I’ll send more to you. All you need to do is subscribe, down there, yes, below, there … (please push like too, it’s not so much to ask, is it?)