Claude Code Hooks and MCP Integration Explained
A practical guide to Claude Code hooks and MCP server integrations for engineering leads at 10-20 person software teams looking to automate dev steps.
TL;DR: A practical guide to Claude Code hooks and MCP server integrations for engineering leads at 10-20 person software teams looking to automate dev steps.
If your engineering team spends time manually triggering linters, switching between tools to check ticket status, or re-running formatters after every AI edit, Claude Code's hooks system and MCP integrations address exactly that problem. For a growing software team of 10 to 20 developers with limited DevOps capacity, these two features can eliminate entire categories of context-switching without requiring a dedicated platform engineer. This article explains what both systems are, how they connect, and where to start.
The hooks system and MCP (Model Context Protocol) support arrived in Claude Code as part of its agent-mode architecture. Together, they let Claude Code trigger shell commands at defined points in its workflow and call external tools beyond its default capabilities.
What Hooks Are and Why They Exist
Hooks are shell commands that run automatically at specific points in Claude Code's execution cycle: before a tool is called, after a tool completes, or when a session starts or stops. They are configured in Claude Code's settings.json file and run in the background without requiring manual intervention.
The primary use case is enforcement. Claude Code may edit files, run tests, or make sequential changes across a codebase. Hooks ensure that each action lands in a consistent state. A hook can run Prettier before Claude Code edits a JavaScript file, ensuring the diff stays clean. Another hook can trigger your test suite after Claude Code modifies a module, catching regressions before the next step in a chain of agent actions.
Four hook types are available:
PreToolUse: runs before Claude Code calls a tool (for example, before writing to a file)PostToolUse: runs after a tool completes (for example, after a file is written)Stop: runs when a Claude Code session endsNotification: fires when Claude Code sends a user-facing message
For a mid-sized company developer team without a full CI pipeline for every local workflow, hooks provide a lightweight enforcement layer that lives inside the tool rather than in a separate system.
Configuring Hooks in settings.json
Hook configuration lives in .claude/settings.json at the project root. A basic hook entry looks like this:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write",
"hooks": [
{
"type": "command",
"command": "npx prettier --write $CLAUDE_TOOL_INPUT_FILE_PATH"
}
]
}
]
}
}
The matcher field targets specific tool types. Write catches file write operations. You can also match on Edit, Bash, or leave the matcher empty to catch all tool calls.
Common practical patterns for a technical team lead to consider:
- Auto-format on write (Prettier, Black, gofmt depending on stack)
- Run relevant unit tests after file edits in a test directory
- Log agent actions to a local file for audit review
- Trigger a build step after changes to a configuration file
These are not complex automations. They are guardrails that make Claude Code's output predictable and consistent across a team, which matters when five developers are using the same agent configuration on a shared codebase.
What MCP Servers Do in Claude Code's Context
MCP (Model Context Protocol) is a standard that lets Claude Code call external tools and data sources as if they were native capabilities. An MCP server exposes a set of functions. Claude Code can call those functions during an agent session to retrieve data, trigger actions, or interact with external systems.
This is distinct from building a custom integration. MCP servers are pre-built and configured, not developed from scratch by your team. The configuration again lives in settings.json, under an mcpServers key.
Three MCP integrations worth evaluating for a 15-person team:
Jira MCP server. Claude Code can read ticket details directly during a session. Instead of copying a ticket description into a prompt, Claude Code fetches it on demand. This removes a manual step that happens dozens of times per day across a team.
GitHub MCP server. Claude Code can check PR status, read comments, list open issues, and retrieve file contents from branches. For a team doing code review inside Claude Code sessions, this means the agent has full context without the developer leaving the terminal.
File system and database MCP servers. These extend Claude Code's reach to local databases, internal documentation, or structured logs. A technical manager running a diagnosis workflow can give Claude Code access to a read-only database connection and let it pull relevant records during the session.
What This Means for a 15-Person Team with Limited DevOps Capacity
The combination of hooks and MCP integrations shifts Claude Code from a code-generation tool to a configurable workflow layer. For a growing software team that cannot afford a dedicated platform engineer, this matters in two specific ways.
First, hooks enforce standards without requiring developers to remember them. Formatting, linting, and test triggers become part of the agent's execution cycle rather than a separate discipline step.
Second, MCP integrations reduce the number of systems a developer needs to hold open during a session. Jira, GitHub, and internal documentation become queryable from inside Claude Code rather than requiring tab-switching and copy-paste.
Neither feature requires infrastructure changes. Both are configured in a JSON file that ships with the project. For an engineering lead looking to standardise AI tooling across a small team, this is the lowest-friction path to consistent, auditable Claude Code usage.
Want to evaluate how hooks and MCP fit your team's specific dev workflow? The AI Readiness Assessment covers tooling configuration as part of the standard review.
FAQ
Do hooks run on every developer's machine or only in CI?
Hooks run locally on each developer's machine as part of their Claude Code session. They are not CI pipeline steps. If you want consistent enforcement across the team, commit the .claude/settings.json file to the repository so every developer inherits the same hook configuration.
Are MCP servers safe to use with a private codebase?
Safety depends on which MCP server you configure and what permissions you grant it. MCP servers you configure locally (such as a GitHub server using your own token) operate within the same trust boundary as your existing tooling. Review each server's documentation for data handling before enabling it. For European teams with GDPR obligations, confirm that any cloud-backed MCP server does not send codebase contents to third-party endpoints without a data processing agreement.
How long does it take to set up hooks and MCP for a team?
Basic hook configuration (auto-format, test trigger) takes under an hour for an engineering lead who is already familiar with Claude Code. MCP server configuration adds 30 to 60 minutes per server depending on authentication requirements. The GitHub and Jira MCP servers have documented setup guides and require only an API token to get started.
Further Reading
- CLAUDE.md Configuration Guide for Engineering Teams: How to configure Claude Code's behaviour at the project and team level using CLAUDE.md files.
- Claude Code Agent Mode and Autonomous Workflows: What agent mode enables for multi-step autonomous tasks and how to structure workflows for a small team.
- The MCP Marketplace: What's Available and What's Worth Using: A survey of available MCP servers and which categories deliver the most value for developer teams.
- MCP vs Custom API Integrations: When to Build vs Configure: Decision criteria for choosing between an MCP server and a custom integration for your workflow.

