← Back to Index

Lesson 14

Multi-root Workspaces

What Multi-root Workspaces Are

A typical Kiro workspace has a single root folder - one project, one .kiro/ directory. A multi-root workspace brings multiple folders into a single IDE window. Each folder is an independent "root" with its own configuration.

You'd use this when working across related but separate projects simultaneously - for example:

How to Create One

Why It Matters for Kiro Configuration

Each root folder gets its own .kiro/ directory - its own steering, hooks, skills, agents, specs, and MCP config. This means:

my-workspace/
├── frontend/                    # Root 1
│   └── .kiro/
│       ├── steering/            # Angular-specific steering
│       ├── hooks/               # Frontend-specific hooks
│       ├── skills/              # Frontend skills
│       └── settings/mcp.json    # MCP servers for frontend work
│
├── backend/                     # Root 2
│   └── .kiro/
│       ├── steering/            # Node/Express steering
│       ├── hooks/               # Backend-specific hooks
│       └── settings/mcp.json    # Database MCP, different API servers
│
└── shared-lib/                  # Root 3
    └── .kiro/
        └── steering/            # Library-specific conventions

Each root is configured independently. When you're working in a frontend file, the frontend steering applies. When you switch to a backend file, the backend steering applies.

Scoping Rules

FeatureScoping in multi-root
SteeringEach folder's .kiro/steering/ applies to that folder only
MCP serversEach folder's .kiro/settings/mcp.json is independent. Later workspace folders override earlier ones if there's a name conflict.
HooksEach folder's .kiro/hooks/ applies to events in that folder
SkillsEach folder's .kiro/skills/ is available when working in that folder
SpecsEach folder's .kiro/specs/ belongs to that project
Global config~/.kiro/ applies across ALL folders (as always)
Ad

MCP Precedence in Multi-root

MCP configs are merged with this precedence (highest wins last):

MCP Config Precedence (highest wins last) ~/.kiro/settings/mcp.json User config (global) ↓ lowest priority overridden by frontend/.kiro/settings/mcp.json Workspace folder 1 overridden by backend/.kiro/settings/mcp.json Workspace folder 2 ↑ highest priority Priority

Later workspace folders override earlier ones. User-level config has the lowest precedence. Name servers uniquely to avoid collisions.

If your frontend and backend both define a server named "github" with different tokens, the later folder in the workspace order wins. Name servers uniquely to avoid collisions.

Practical tip: Put truly shared MCP servers (GitHub, Jira) in your global ~/.kiro/settings/mcp.json so they work regardless of which folder you're in. Only put folder-specific servers (database for backend, component docs for frontend) in the per-folder config.

When Multi-root Helps vs. When It Doesn't

Good use casesBetter as single-root
Frontend + backend in one windowA monorepo where all code shares conventions
App + shared library developmentA single Angular project
Projects that need different MCP servers or steeringProjects that share all configuration
Microservices with independent configsTightly coupled code that references across folders constantly

If everything in your workspace uses the same steering, same MCP, same hooks - multi-root adds complexity without benefit. Use it when the roots genuinely need different configuration.

Connection to What You Know

Your Tangible Win

You understand how multi-root workspaces scope Kiro's configuration per-folder, how MCP precedence works, and when multi-root adds value vs. unnecessary complexity. You can set up a frontend + backend workspace where each root has tailored steering, hooks, and MCP access.

Quiz

You have a frontend folder and a backend folder in a multi-root workspace. You're editing a backend file. Which steering applies?

Both frontend and backend steering combined
The backend folder's steering + global steering
Only global steering - multi-root disables per-folder steering

Where should shared MCP servers (GitHub, Jira) be configured in a multi-root workspace?

In every folder's mcp.json (duplicated)
In global ~/.kiro/settings/mcp.json - available regardless of active folder
In the first folder's mcp.json only