Skip to content

MCP vs Hooks in Kiro

Kiro has two extension mechanisms that are often confused: MCP and Hooks. They solve different problems and work in completely different ways.

MCPHooks
PurposeConnect Kiro to external data and toolsAutomate actions when events happen
DirectionKiro pulls data inKiro pushes actions out
Triggered byKiro’s AI deciding it needs informationFile events, test results, git events
RunsDuring a conversation/requestAutomatically in the background
ExampleRead a Jira ticket before writing codeRun linter automatically when you save a file

MCP gives Kiro access to external information sources. It’s about what Kiro can read and know.

When you ask Kiro to do something, it decides whether it needs more context from an external system. If you say “implement issue #42”, Kiro calls the GitHub MCP server to fetch the issue. If you say “write a query for the orders table”, Kiro calls the SQL Server MCP server to read the schema.

You: "Fix bug in issue #42"
Kiro decides: "I need to read that issue"
Kiro calls GitHub MCP → fetches issue #42
Kiro has context → generates code fix

MCP is about context — giving Kiro the information it needs.

  • You want Kiro to reference project management tickets (Jira, GitHub Issues, GitLab Issues)
  • You want Kiro to understand your live database schema without manual pasting
  • You want Kiro to read documentation from Confluence or a wiki
  • You want Kiro to check cloud resource state (AWS, Azure)

Hooks — Automated Event-Triggered Actions

Section titled “Hooks — Automated Event-Triggered Actions”

Hooks trigger Kiro to automatically perform actions when events occur in your workspace. They’re about what Kiro does without you asking.

You save a file
File save hook fires
Kiro automatically runs: "Fix any lint errors in the saved file"
Kiro edits the file and fixes the issues

Hooks are defined in .kiro/hooks/ as YAML files — each hook specifies an event trigger and what Kiro should do.

Hooks are about automation — making Kiro act without you prompting it.

  • Auto-fix linting errors whenever you save
  • Automatically update documentation when a function changes
  • Run tests automatically when you modify a service file
  • Generate a PR description when you open a pull request
  • Update type definitions when you change an interface

Hooks live in .kiro/hooks/ as YAML files:

.kiro/hooks/auto-lint.yaml
name: Auto-fix lint on save
trigger:
event: file_saved
filePattern: "**/*.{ts,tsx,js,jsx}"
action:
prompt: |
The file {{file}} was just saved.
Run ESLint on it and fix any lint errors automatically.
Do not change any logic — only fix lint issues.
.kiro/hooks/test-on-change.yaml
name: Run tests when service changes
trigger:
event: file_saved
filePattern: "src/services/**/*.ts"
action:
prompt: |
A service file was changed: {{file}}.
Run the related tests and if any fail, fix the implementation to make them pass.
Show me the test results.
.kiro/hooks/pr-description.yaml
name: Generate PR description
trigger:
event: pull_request_opened
action:
prompt: |
A pull request was opened for this branch.
Read the diff and write a clear PR description with:
- What changed and why
- How to test it
- Any breaking changes
EventFires when
file_savedA file is saved in the editor
file_createdA new file is created
file_deletedA file is deleted
test_failedA test run produces failures
pull_request_openedA PR/MR is opened
code_mergedCode is merged to a branch
build_failedA build step fails

MCP and Hooks work well in combination. A hook can trigger Kiro to run a task, and during that task Kiro uses MCP to get the context it needs:

.kiro/hooks/link-to-ticket.yaml
name: Verify implementation matches ticket
trigger:
event: pull_request_opened
action:
prompt: |
A PR was opened. Check the branch name for a Jira ticket key (e.g. PROJ-123).
If found, read that Jira ticket and verify that the changes in this PR
address all the acceptance criteria. Report any gaps.

In this example:

  1. Hook triggers on PR opened
  2. Kiro identifies the ticket key from the branch name
  3. Atlassian MCP fetches the Jira ticket
  4. Kiro compares the diff against acceptance criteria

MCP example:

User types: "Write a SQL query to get monthly sales by region"
└── Kiro calls SQL Server MCP, reads schema
└── Kiro writes accurate query with real column names

Hook example:

User saves a file (no typing required)
└── Hook fires automatically
└── Kiro runs linter and fixes issues
└── File is clean before you even switch windows

  • Use MCP when Kiro needs to look something up — external data, tickets, databases, documentation
  • Use Hooks when you want Kiro to do something automatically — without you having to ask — whenever a specific event happens