Chapter 07 · Power tools

MCP & hooks

Out of the box, Claude sees your project folder. MCP connects it to the rest of your world (Slack, GitHub, databases). Hooks make things happen automatically at set moments, guaranteed.

MCP: plug Claude into your tools

MCP (Model Context Protocol) is a standard plug. Each "MCP server" you add gives Claude one new ability, and then you just talk normally:

Popular connections:

GitHub

"Summarize the open pull requests and flag anything risky."

Slack

"What did the team decide about the launch date in #general?"

Databases

"Which invoices from last quarter are still unpaid?" — answered from real data.

Playwright (browser)

"Open my dashboard, click through every tab, screenshot each one."

Add one in the terminal, manage them with /mcp:

connect a service
claude mcp add <name> <server address>

Each service's own docs give you the exact line to paste. Signing in happens in your browser, like any app.

Connected tools follow the same permission rules: Claude asks before it posts a Slack message or writes to a database, exactly like it asks before editing a file.

Hooks: "every time X, do Y", guaranteed

Instructions in CLAUDE.md are advice; Claude follows them, but a very long session might drift. A hook is different: it's a small automatic action wired to a moment, and it always runs. No forgetting possible.

  • After every file edit → tidy the file's formatting
  • When Claude finishes → pop a notification so you can stop watching
  • Before any file change in the photos folder → block it

The best part: you don't write hooks, you ask for them.

Hooks live in a settings file (.claude/settings.json); see what's configured with /hooks. Each hook names a moment (before a tool runs, after a file edit, when Claude finishes) and a command to run at it.

MCP or hook?

You want…That's
Claude to reach something new (an app, a service, data)MCP
Something to happen automatically at a set momentA hook
✳ Try it yourself
write a hook that notifies me whenever you finish and are
waiting for my input