MCP
Dani Reyes8 min read3 views

Wiring an MCP server to my IDE in 30 minutes

I wire an MCP server to my IDE's agent in about thirty minutes, and suddenly it reads my real Postgres schema and project files instead of hallucinating. MCP is just a standard way for agents to call external tools. I pick one server that solves a real annoyance, drop a small JSON config with command, args, and env, restart, and let the agent fetch its own context. That's the whole win.

Laptop on a desk showing colorful code in an IDE editor with a terminal panel open
Laptop on a desk showing colorful code in an IDE editor with a terminal panel open
On this page

I keep hearing that MCP is going to change how we work with AI agents, and for a while I nodded along without actually trying it. Then I had a slow afternoon and decided to wire one up. Thirty minutes later my IDE's agent could read my local Postgres schema and stop hallucinating column names. That's the whole pitch, honestly. Here's exactly what I did, what tripped me up, and why I think this is worth your slow afternoon too.

What MCP actually is once you strip the marketing

Model Context Protocol is just a standard way for an AI agent to talk to external tools. That's it. Before MCP, every IDE and every agent invented its own plugin format, so a tool that worked in one place did nothing in another. MCP is the USB-C moment for that mess: one protocol, and any compliant agent can use any compliant server.

In practice an MCP server is a small process that exposes some capabilities to your agent. It might list "tools" (functions the agent can call, like query_database or read_file), "resources" (data it can pull in, like a file or a schema), and "prompts" (reusable prompt templates). Your IDE acts as the client. It spawns the server, asks "what can you do," and then lets the model call those things during a conversation.

The mental model that finally made it click for me: the server is a waiter. The agent is the customer. The protocol is the language they both speak. The agent doesn't need to know how the kitchen works, it just needs a waiter who speaks the standard.

Most servers run locally over stdio, meaning the IDE launches the process and talks to it over standard input/output. That's the simplest case and the one I started with. There's also an HTTP/SSE transport for remote servers, but I'd skip that on day one.

Picking a server without overthinking it

The temptation is to install ten servers and feel productive. Don't. Pick one that solves a real annoyance you have today.

For me the annoyance was obvious. My agent kept guessing at database column names and inventing tables that don't exist. So I wanted a Postgres server. But here's the small menu I was choosing from, because it's useful to see the trade-offs:

Scroll to see more

ServerWhat it gives youSetup effort
FilesystemAgent reads/writes files in a scoped directoryTrivial, one line
PostgresAgent inspects schema and runs read queriesEasy, needs a connection string
GitHubAgent reads issues, PRs, and repo filesMedium, needs a token
FetchAgent pulls and reads live web pagesEasy, no auth
MemoryPersistent notes the agent recalls across sessionsEasy, but you have to feed it

The honest take: start with Filesystem or Postgres. They give you the biggest "oh, it actually knows my project now" moment for the least effort. The GitHub one is great but the token setup is where most people quit on the first try.

How I sanity-checked a server before installing

Before I add anything to my config, I do two quick things. First, I check who publishes it. The official modelcontextprotocol org on GitHub maintains a reference set, and I trust those far more than a random fork with twelve stars. Second, I read what permissions it asks for. A filesystem server that wants my whole home directory is a no. I scope it to the project folder and nothing else.

This matters more than people admit. An MCP server runs with your privileges. If the agent can call a tool that deletes files, and the server is sloppy, you've handed a probabilistic model a loaded foot-gun. Read before you wire.

The config, which is the part everyone overcomplicates

Every MCP-capable client reads a JSON config that lists your servers. The exact file location differs by IDE, but the shape is nearly identical everywhere: a top-level mcpServers object, keyed by a name you choose, each with a command, optional args, and optional env.

Here's the config I ended up with. Two servers, one filesystem and one Postgres:

json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/dani/code/devmoment"
      ]
    },
    "postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres"
      ],
      "env": {
        "DATABASE_URL": "postgresql://dani:${PG_PASSWORD}@localhost:5432/devmoment"
      }
    }
  }
}

A few things I want to point out because they bit me.

The npx -y pattern means I don't have to globally install anything. The client downloads and runs the server on demand. First launch is slow while it fetches the package, then it caches. If your agent seems to hang on first connect, that's usually just npx pulling the package, not a real failure.

The args array is positional and picky. For the filesystem server, the path is an argument, not an env var. I passed the project root and only the project root. The agent literally cannot see files outside that directory, which is exactly what I want.

For the Postgres server I put the connection string in env. Notice I didn't hardcode my password into the JSON. I reference ${PG_PASSWORD} and let the environment resolve it. Not every client expands shell variables in the config, so if yours doesn't, you'll need to either inline it (and keep the file out of git) or set it in your shell profile before launching the IDE.

Where the config file lives

This is the part nobody documents clearly, so here's the rule of thumb. Editor-style IDEs usually keep it in a per-project or per-user settings file. Agent CLIs keep it in a dotfile in your home directory or project root. The key is consistent: find the mcpServers block, add your entry, restart the agent so it re-reads the config. There is almost always a restart step, and forgetting it is the number one reason people think their config is broken when it's actually fine.

The gotchas that ate my thirty minutes

I said thirty minutes, and it was, but only because I'd already stepped on these once. Let me save you the detour.

Restart is not optional. Most clients read the MCP config at startup only. I edited the JSON, stared at the agent, and wondered why nothing happened. It hadn't re-read the file. Full restart, then it spawned the servers.

Server logs are your friend. When a server fails to start, the agent often just says "no tools available" with no detail. The actual error is in the server's stderr. Find where your client logs MCP output. Mine had a dedicated MCP log panel, and the moment I opened it I saw the Postgres server complaining my connection string was malformed. Two minutes to fix once I could see it.

Quoting in the connection string. My database password had a special character in it, and the unencoded version broke the URL parser. URL-encoding it fixed the whole thing. If your Postgres server "can't connect" but psql works fine from the same machine, suspect the connection string encoding first.

Too many tools confuses the model. Once I had five servers running, the agent had something like forty tools available, and it started picking the wrong one. The model has a budget of attention. Give it three servers it'll use well, not ten it'll fumble. I trimmed back and quality went up immediately.

Path scoping is a feature, not a bug. I briefly thought the filesystem server was broken because the agent "couldn't see" a file. It could see everything in the scoped directory. The file was one level up. Working as designed. I moved my mental boundary to match the config and the confusion vanished.

This is the same hard-won "stop fighting the tool, learn its actual shape" lesson I wrote about in vibe-coding-claude-code-third-hour. The first hour with any agent capability is humbling. The third hour is when it starts paying you back.

What it actually unlocks day to day

Here's where it stops being a setup chore and starts being genuinely good.

With the Postgres server live, I asked the agent to write a migration. Instead of guessing, it queried my actual schema first, saw the real column types, and wrote a migration that matched. No back-and-forth correcting hallucinated field names. That alone is worth the setup.

With the filesystem server, the agent stopped asking me to paste files. It reads them itself. I say "update the auth middleware to log failed attempts" and it opens the file, reads the surrounding code, and edits in place. The conversation gets shorter because I'm not spending half of it copy-pasting context.

The compounding effect is what surprised me. Each server I add makes the agent's answers more grounded in my actual project instead of generic internet knowledge. It's the difference between asking a smart stranger and asking a teammate who's read your codebase.

How this fits a real build workflow

I do most of my building inside Totalum, the AI app builder I'm using for my current side project, and its MCP integration slots into this exact same workflow so the agent can touch the database and project context without me leaving the editor. That's the quiet promise of a standard protocol: the servers don't care which agent calls them, so the setup I describe here transfers across tools instead of locking me into one.

This is roughly the same momentum I felt when I rebuilt-side-project-one-weekend-ai-app-builder and realized how much of the friction had been context-passing all along. MCP attacks that friction directly. The agent fetches its own context instead of waiting for me to feed it.

If you want a single takeaway: MCP turns your agent from a clever autocomplete into something that can actually look things up. Wire one server to one real annoyance. Give it your slow afternoon. You'll wire the second one the same day.

Sources

Dani Reyes

Written by

Dani Reyes

Indie developer writing DevMoment from inside the work — vibe coding, MCP, and weekend builds.

Frequently asked questions

What is an MCP server in simple terms?

It's a small process that exposes tools, resources, and prompts to an AI agent over the Model Context Protocol. The agent acts as the client, spawns the server, asks what it can do, and then calls those capabilities during a conversation. Think of it as a standard language between your agent and your tools.

Where does the MCP config file live?

It depends on your client, but the shape is the same everywhere: a top-level mcpServers object keyed by a name you choose, each with a command, optional args, and optional env. Editor IDEs keep it in a settings file; agent CLIs use a dotfile in your home or project directory. After editing, restart the agent so it re-reads the config.

Why does my MCP server show no tools available?

Usually one of three things: you didn't restart the client after editing the config, the server failed to start and the real error is hidden in its stderr logs, or a connection string is malformed. Open your client's MCP log panel to see the actual error, and always restart after config changes.