Google's Gemini CLI: gemini.md, MCP, and a Real Next.js Bug

You install the new AI CLI. You ask it to write a hello-world. It does. You feel productive for about ninety seconds — then you're back to the same problem you had before: the agent doesn't know your repo, doesn't know your conventions, and can't reach the systems where the truth lives.
That's the actual test for every coding agent launch. Not autocomplete. Not a cute demo. Can it close a real bug in your project without you re-explaining the stack every session?
Gemini CLI only got interesting for me once I stopped treating it as a chatbot in a terminal and started treating it like a project-scoped agent: project rules, live tools, then a real Next.js bug as the proof.
In the video#
- 00:00 — Why another CLI agent is worth trying
- 00:46 — Install and first setup
- 01:21 — Capabilities and commands worth knowing
- 02:39 — Adding and configuring MCP servers
- 05:45 — Project prompts with
gemini.md - 06:21 — Live: fixing a real bug in a Next.js app
Resources:
- System prompt pattern: gist by Philipp Schmid
- Agent directory: agentdevs.io
The three layers that actually matter#
Most people evaluate a CLI agent by the model card. Wrong layer. The model is table stakes. What decides whether it helps you ship is everything around it:
- Model access — including Gemini 2.5 Pro with a large context window. Useful, not sufficient.
- Project instructions —
gemini.md. Same job asAGENTS.mdorCLAUDE.md: stable rules for this repo. Stack, commands, "don't do this," where the tests live. - Tools — MCP servers so the agent can reach docs, tickets, or local systems instead of guessing from training data.
Skip any one of those and you're back to paste-prompt theatre. A strong model with no project file still invents your conventions. A project file with no tools still hallucinates your APIs. Tools without a project file still wander.
What gemini.md is for#
Not a novel. Not a dump of every style preference you've ever had.
A short constitution for the repo: how you run it, what "done" means, which paths are sacred, which commands are allowed. The agent loads that every session so you don't retype it. If a rule only applies sometimes, it doesn't belong here — put situational playbooks elsewhere and keep the always-true stuff short.
MCP is the difference between guessing and looking#
Once MCP is wired, the agent can pull current context instead of performing confidence. That's the same reason Context7 and llms.txt matter: coding agents fail quietly when the ground truth moved after the training cutoff.
In the video I add MCP servers early on purpose. Without them, Gemini CLI is a smart autocomplete. With them, it can participate in a real debugging loop.
The only demo that counts#
I pointed it at an actual bug in a Next.js app — not a toy repo. Install, configure, give it project rules, give it tools, then ask it to fix something you'd otherwise babysit yourself.
If it can't close that loop, the launch blog doesn't matter.
What to do tomorrow#
- Install Gemini CLI and authenticate.
- Write a short
gemini.md— stack, commands, hard constraints. - Wire one MCP server you actually use (docs or repo search — not five toys).
- Hand it a bug you'd normally sit through yourself.
Four steps. One real issue. That's the evaluation. Everything else is marketing.
AI engineering, weekly.
Join developers getting practical AI engineering in their inbox.