Claude Code MCP Servers — Wiring Up Real Tools
What MCP is, how to add a server with claude mcp add, three transport types, and the first servers worth installing.
Articles tagged with #Claude Code
What MCP is, how to add a server with claude mcp add, three transport types, and the first servers worth installing.
A PreToolUse hook keeps rejecting Edit calls with no clear reason, including safe edits. Usually exit-code logic, stdin parsing, or matcher scope at fault.
MCP tool calls (filesystem, GitHub, custom) time out in Claude Code, but a direct curl to the server works. Usually transport, stdio framing, or response shape.
A long agent reply gets cut off mid-sentence under context pressure. Usually compaction, max_tokens cap, or runaway tool output eating the budget.
You edited ~/.claude/settings.json but Claude Code ignores hooks, permissions, or env on restart. Usually JSON syntax, wrong scope, or shadowed precedence.
You dropped a skill under ~/.claude/skills/ but /<name> says not found, or it never auto-fires. Usually a SKILL.md frontmatter, path, or trigger-description issue.
Your Task/Agent subagent completed cleanly, but the main session shows nothing or a wrong summary. Usually a final-message format, context-window, or thread-routing issue.
Claude Code refuses to run a command you whitelisted — the Bash sandbox rejects it as unsafe or unapproved. Diagnose permission scope, pattern match, and settings.json wiring.
Claude Code starts a session but ignores your project CLAUDE.md — conventions, commands, and instructions never reach the model. Diagnose path, scope, and merge precedence.
You resume a Claude Code session and it acts like a fresh start — forgetting the plan, the decisions, the half-finished refactor. Diagnose snapshot scope, compaction, and memory layers.
Your Claude Code statusline shows an error, stays blank, or freezes the prompt — the custom script is failing silently. Diagnose exit codes, output format, and timeout limits.
Every Bash, Edit, Read asks for permission again even after you allowed the same tool — settings.json scope wrong, allowlist pattern too narrow, or hook is re-asking.
Single task burns 200K+ tokens, hits the context ceiling mid-execution, and forces a summarize. Decompose the task, use sub-agents, or scope reads tighter.
Bash command runs forever, the agent waits forever — no timeout set means a hung process locks the whole session. Set timeouts, detect hangs, kill cleanly.
A complete reference for every Claude Code keyboard shortcut: session control, permission modes, input editing, history, IDE integration, and terminal compatibility.
A complete walkthrough of Claude Code skills: what they are, how to invoke them, how to write a SKILL.md, when to use hooks or subagents instead, and how to share with a team.
A complete reference to every built-in Claude Code slash command: session lifecycle, usage and cost, configuration, subagent / hook / MCP extensions, diagnostics, and IDE / git integrations.
`.env` or API key swept into a commit by `git add .`. Rotate first (always), then prevent: ban broad `git add`, install secret scanner, gitignore.
Finishes the task, also adds 5 "might be useful later" utility functions nobody calls. Bound scope in the prompt and in CLAUDE.md, delete on review.
Agent makes tests green by adding `.skip`, deleting assertions, or broadening matchers. Forbid test edits, scan diff for skip markers, treat test changes as a separate PR.
12 prompt templates to hand work between Claude Code subagents — research → plan → implement → review → ship — without losing context.
Architecture review prompts that surface real layering bugs, dependency cycles, and boundary leaks — not generic "consider DDD" advice.
Whole-repo audit prompts for Claude Code / Codex — architecture smells, dead code, security risks, dependency drift, test coverage gaps, in one structured pass.
Use Claude Code, Codex, or Cursor agents to pre-review your own PRs before sending them to humans.
What Claude Code is, how to install it, and how to ship your first refactor — the setup steps, prompt patterns, and common beginner mistakes.
Claude Code is a terminal agent — here is what it does and why developers love it.
CLAUDE.md isn't just a readme — it's your agent's memory. Here's what to put in it.
How to point Claude Code at a real project and get it productive in 30 minutes.
A reusable Claude Code prompt + workflow to run a real SEO audit on your content site.
Day-to-day Claude Code patterns that survive past week one — task sizing, commit cadence, CLAUDE.md upkeep, and how to keep agent output trustworthy long-term.
Connect Claude to a GitHub repo and use it as a research tool over your own code.
Code is reverted, but the agent left behind: stale `dist/`, an applied migration, dangling feature flags, mutated state in third-party tools. Roll back by domain, not by `git reset`.
You wanted execution; agent stopped every 30 seconds with "should I use TypeScript?" Define defaults in CLAUDE.md + an explicit "only ask for destructive ops" rule.
Agent suddenly forgets earlier answers, re-reads CLAUDE.md, contradicts the plan. Auto-summarization dropped the load-bearing details. Re-anchor or restart.
You fed a detailed audit and Claude Code did its own thing. The report is context, not a contract — convert to a numbered checklist, execute one item at a time.
Agent suggests "extract this into a microservice" when you're intentionally monolithic. Codify conventions in CLAUDE.md + do/don't examples from real files.
The diff is polished code — for the wrong feature. Force a restate-before-execute step; misalignment almost always happens at the plan stage, not the code stage.
You approved a 5-step plan; Claude did 7 steps, skipped one, and refactored adjacent code. Bind execution to the approved plan + post-step status updates.
Uncommitted edits gone after agent ran. Local-history recovery, then enforce "commit before agent" + dirty-state checks.
Claude Code editing the wrong files, duplicating existing functions, missing key files? It's almost never the model — it's missing project context. Seven ways to make Claude Code actually read your codebase.
You asked for a small change, got a 5-file diff. Set a hard editable-file list in the prompt + use `FOLLOWUPS.md` to capture adjacent issues without fixing them.
Halfway through a refactor, Claude Code says you hit a limit. Identify which limit (5-hour / weekly / per-model), save state, pick the right resumption path.
Agent did 60% then went silent — no error, no completion. Three flavors: context exhaustion, tool hang, silent abort. Each has its own diagnosis.
Agent repeats the same edit, oscillates between two states, or chases a flaky test forever. Six loop signatures and the one-prompt fix for each.
Modified a file you didn't intend — usually similar names, or it followed an import chain. Git-revert, then re-scope with allow/deny lists in the prompt.
Claude Code + Codex (or two parallel sessions) edit the same function differently and produce a conflict. Isolate scopes with worktrees; never let an agent resolve.
12 prompts to brief Claude Code (or Codex) on real engineering tasks — scoped features, surgical bug fixes, migrations, refactors, TDD, perf work, debugging, code review.
Claude Code is a terminal agent; Cursor is an in-editor copilot. Task fit, debug loop, and rollback cost differ. A decision sheet.
A realistic 2026 walkthrough of building an Astro content site with Claude Code — from repo setup to deploy — including what to delegate, what to keep, and where the model bites you.
Keep AI agents on-spec for multi-file website work with this CLAUDE.md template, 3-part prompt structure, and per-task constraint pattern.
Claude Code is Anthropic's command-line AI tool. This guide explains what it does, how it differs from ChatGPT and Cursor, and how to get productive in the first ten minutes.