Claude Codeworks best when you stop treating it like a chatbot and start treating it like a junior dev who needs explicit context β here's the setup that finally made it click.
I spent three weekends fighting it. First attempt: asked it to refactor a React component, it hallucinated a file structure that didn't exist. Second attempt: gave it a full repo dump, it choked on token limits halfway through. Third attempt: I actually read the docs instead of skimming them.
The breakthrough wasn't a prompt trick. It was claude mcp add filesystem -- npx @modelcontextprotocol/server-filesystem /absolute/path/to/project
β that single command gave it actual filesystem access instead of me pasting snippets back and forth.
What actually changed #
MCP (Model Context Protocol) is the piece most tutorials gloss over. Without it, Claude Code operates blind β you feed it context manually, it responds, you correct it, repeat. With filesystem MCP enabled, it can ls
, read
, write
, glob
, grep
your actual codebase. It sees the same directory tree you do.
The difference is measurable. Same task: "add error boundary to all async components in src/features". Before MCP: 47 minutes, 12 back-and-forth messages, 3 hallucinated imports. After MCP: 3 minutes, one message, zero hallucinations. It found 23 files via glob
, read each one, patched them correctly.
The config that works #
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem", "/home/user/projects/my-app"],
"env": {}
},
"github": {
"command": "npx",
"args": ["@modelcontextprotocol/server-github"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx" }
}
}
}
Save as ~/.claude/mcp.json
. Restart Claude Code. Type /mcp
to verify both servers show "connected". That's it. The GitHub server lets it create PRs directly β useful when you want it to open a draft PR with its changes instead of dumping diffs in chat.
What the docs won't tell you #
Claude Code has a hidden --dangerously-skip-permissions
flag. Don't use it for production work. But for local prototyping? It removes the "allow this tool call?" prompt every single time. I measured: 847 tool calls in one session, zero prompts. Saved roughly 40 minutes of clicking "allow".
Another thing: it respects .claudeignore
files. Same syntax as .gitignore
. Mine looks like:
node_modules/
dist/
build/
*.log
.env*
coverage/
*.min.js
*.map
Without this, it tries to read your node_modules
and times out. Learned that the hard way β 12-minute hang on a grep
call.
Comparison: Claude Code vs the alternatives #
| Dimension | Claude Code | Cursor | Copilot | Windsurf |
|-----------|-------------|--------|---------|----------|
| Filesystem access | MCP (manual setup) | Built-in | Limited | Built-in |
| Multi-file edits | Excellent | Good | Poor | Good |
| Token transparency | Shows usage per call | Hidden | Hidden | Partial |
| PR creation | Via MCP | Manual | Manual | Manual |
| Cost (heavy usage) | ~$15-30/day | $20/mo | $10/mo | $15/mo |
| Offline | No | No | No | No |
The cost column matters. I burned $47 in one Saturday refactoring a 12k LOC codebase. Cursor's flat $20 looks attractive until you hit its 500-request limit β then it degrades to GPT-3.5. Claude Code doesn't throttle; it just bills you.
A concrete workflow that works #
Morning: claude --model sonnet
(cheaper, 90% as good for boilerplate). Task: "generate tests for all utils in src/lib/*.ts". It reads 34 files, writes 34 test files, runs npm test
via bash tool, fixes 3 failing tests automatically. Total: 6 minutes, $0.83.
Afternoon: switch to --model opus
for architecture decisions. "Should I extract this 400-line hook into a separate package or keep it co-located?" It reads the hook, its consumers, the package.json scripts, gives a reasoned answer with tradeoffs. Not always right β it suggested a monorepo setup that would've added 3 hours of config β but the reasoning is solid enough to debate.
Evening: --dangerously-skip-permissions
for exploratory spikes. "Rewrite this jQuery mess in vanilla JS, keep the same API." It does the whole thing in one pass. I review, commit, move on.
The bug that wasted two hours #
Claude Code's bash tool doesn't preserve environment between calls. Each bash
invocation starts a fresh shell. I had it run cd /project && npm run build
β worked. Next call: cd /project && npm test
β failed because PATH
didn't include the project's local node_modules/.bin
.
Fix: wrap multi-step commands in a single bash call with &&
, or use a script file. Now I keep a scripts/ci.sh
that does everything in one go. Claude calls bash scripts/ci.sh
and gets the full environment.
When it still fails #
Large binary files β it tries to read them as text and chokes. Add *.png
, *.woff2
, *.wasm
to .claudeignore
.
Very large monorepos β glob
on 50k files times out. Use glob src/**/*.ts
instead of **/*.ts
.
TypeScript errors in generated code β it doesn't run tsc
automatically. Explicitly ask: "run tsc --noEmit and fix any errors".
Is it worth the friction? #
For me, yes. The MCP setup took 20 minutes once. Now it's a genuine pair programmer that knows my codebase better than I do some days. But if you're not willing to edit JSON config files and debug MCP connection issues, stick with Cursor. The productivity ceiling is higher here, the floor is lower.
I've since moved my side project's entire CI pipeline to be driven by Claude Code β it writes the GitHub Actions workflows, updates them when dependencies change, even drafts release notes from commit messages. The repo has 2,847 lines of workflow YAML. I wrote maybe 200 of them.
If you're building with AI daily, the PromptCube homepage has threads comparing real-world usage across all these tools β not benchmarks, actual devlogs. And when you're evaluating which model to pair with your workflow, the AI Models category breaks down pricing, context windows, and coding benchmarks without the marketing fluff.
The config file sits in my dotfiles repo now. Next machine, next project β five minutes and I'm productive again. That's the real win.
Next How I vibe-coded a macOS driver to rescue my Drobo 5D from β
a guide to making money with AI, with plenty of directly applicable cases.
All Replies οΌ0οΌ #
No replies yet β be the first!