AWS Builder Center
Connecting Kiro to External Tools with the Model Context Protocol (MCP)

Connecting Kiro to External Tools with the Model Context Protocol (MCP)

A practical introduction to configuring, using, and securing MCP servers in Kiro

Software Engineer||Youtuber||Mentor

Introduction

AI coding assistants are very good at writing and explaining the code in front of them. But real development work often depends on information that lives outside the open file: other files in the repository, issues and pull requests, or cloud service documentation.
The Model Context Protocol (MCP) addresses this gap. It gives Kiro a standardized way to communicate with external servers that expose tools, prompts, and resources. In this article, you will learn:
  • What MCP is and how it fits into Kiro
  • How to configure MCP servers with mcp.json
  • The difference between local and remote servers
  • Three common integrations: Filesystem, GitHub, and AWS Documentation
  • How MCP differs from Kiro Powers
  • Security best practices

What is MCP?

MCP is an open protocol that lets an AI application communicate with external servers to access specialized capabilities. The roles are:
ComponentRole
KiroThe AI application (MCP client)
MCPThe protocol that connects them
MCP serverThe provider of specific tools, prompts, or resources
1
2
3
4
5
6
7
KIRO
│
▼
MCP
┌───────┼────────┐
▼ ▼ ▼
GitHub Files AWS Docs
Rather than expecting the assistant to know everything, MCP lets it call on external capabilities when a task requires them.
Important: MCP does not mean unlimited access. Kiro can only use the capabilities a server exposes, within the permissions and configuration you provide.

Configuring MCP in Kiro

MCP servers are defined in a JSON configuration file named mcp.json. Kiro supports two levels:
ScopeLocationBest for
Workspace.kiro/settings/mcp.jsonServers specific to one project
User (global)~/.kiro/settings/mcp.jsonServers you use across projects
If both files exist, they are merged, and workspace settings take precedence. MCP servers can also be defined directly in a custom agent's configuration, which has the highest priority.
To open the configuration in the Kiro IDE: open the command palette and search for Kiro: Open workspace MCP config (JSON) or Kiro: Open user MCP config (JSON). You can also select the Open MCP Config icon in the Kiro panel. If MCP is not active, make sure MCP support is enabled in Settings.
Changes apply when you save the file. Servers reconnect automatically, and only the servers you changed are restarted.

A minimal configuration

1
2
3
4
5
6
7
8
9
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"],
"disabled": false
}
}
}
Each entry under mcpServers defines one server and tells Kiro how to connect to it.

Local vs. remote MCP servers

Kiro supports both connection types.

Local servers

Kiro launches a local server as a process using a command:
1
2
3
4
5
6
7
8
9
10
11
{
"mcpServers": {
"my-local-server": {
"command": "uvx",
"args": ["mcp-server-package"],
"env": {
"API_KEY": "${API_KEY}"
}
}
}
}

Remote servers

Kiro connects to a remote server over HTTPS, so there is nothing to install or run locally:
1
2
3
4
5
6
7
8
9
10
{
"mcpServers": {
"my-remote-server": {
"url": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer ${API_TOKEN}"
}
}
}
}
Remote servers that require OAuth are also supported. Kiro handles the browser-based sign-in flow for you.

Configuration properties

Local servers
PropertyRequiredDescription
commandYesThe command that starts the server
argsNoArguments passed to the command
envNoEnvironment variables for the server process
disabledNoDisables the server without deleting its configuration
autoApproveNoTools that run without a per-use approval prompt
disabledToolsNoTools to hide from the agent
Remote servers
PropertyRequiredDescription
urlYesHTTPS endpoint of the server (HTTP is allowed only for localhost)
headersNoHeaders sent when connecting
oauth / oauthScopesNoOAuth settings for servers that require authentication
disabled, autoApprove, disabledToolsNoSame behavior as for local servers
Two properties deserve extra care:
  • autoApprove lets listed tools run without asking each time. Reserve it for low-risk, read-only tools.
  • disabledTools keeps a server available while blocking specific tools, for example delete_file.

A realistic example

The example below combines three servers. Server configuration varies, so always check each server's own documentation before copying a configuration.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/project"
]
},
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"headers": {
"Authorization": "Bearer ${GITHUB_TOKEN}"
}
},
"aws-knowledge": {
"url": "https://knowledge-mcp.global.api.aws"
}
}
}
Note: Confirm the current package names, endpoints, and authentication requirements in each server's documentation and in Kiro's MCP server directory  before use.

Common integrations

Filesystem MCP

Grants Kiro access to specific directories exposed by the server. This is useful when the context an agent needs extends beyond the currently open file. Expose only the directories the workflow requires.

GitHub MCP

Depending on the server and your token permissions, a GitHub MCP server can provide access to repository files, commits, branches, issues, pull requests, and code search.
1
2
3
4
5
6
7
8
9
10
Kiro
↓
GitHub MCP
↓
Repository
├── Files
├── Commits
├── Branches
├── Issues
└── Pull Requests

AWS Documentation MCP

For AWS developers, this removes the need to leave the IDE to search documentation. Kiro can search and read AWS documentation directly and use it in the conversation. For example:
"How should I configure a VPC with public and private subnets using AWS CDK?"
Kiro can retrieve the relevant documentation through the connected tools and ground its answer in it.

Combining multiple sources

MCP is most valuable when a task spans several systems. Consider debugging an issue that involves your local code, a GitHub issue, and AWS service behavior. With the relevant servers connected, Kiro can draw on all three:
1
2
3
4
5
6
7
┌── Filesystem
│
├── GitHub
Question → Kiro ─┤
├── AWS Documentation
│
└── Other MCP Servers
The goal is not to connect as many servers as possible. It is to give the agent the right context and capabilities for the task.

MCP vs. Kiro Powers

The two are often confused, but they solve different problems:
Purpose
MCPA connection to external tools, data, and capabilities
PowerPackaged expertise, workflows, and capabilities for Kiro
MCP focuses on communication between Kiro and external servers. Powers package specialized knowledge and workflows. They complement each other but are not the same thing.

Security best practices

Because MCP can connect an AI agent to real tools and services, configuration deserves careful attention.
  1. Never hard-code secrets. Reference environment variables instead:
1
"env": { "GITHUB_TOKEN": "${GITHUB_TOKEN}" }
Kiro expands only environment variables you have explicitly approved. It prompts you when a configuration references one that is not yet approved.
2. Apply least privilege. Give each server only the permissions it needs, such as read-only tokens where possible.
3. Use autoApprove sparingly. Never auto-approve tools that can modify files or external systems just for convenience.
4. Restrict tools with disabledTools. Block dangerous operations while keeping the rest of the server usable.
5. Limit filesystem exposure. Expose only the directories your workflow requires.
6. Trust your sources. Review where an MCP server comes from and what its tools do before installing it. Kiro shows a confirmation dialog before adding a server from an install link.
7. Keep credentials out of version control. Do not commit mcp.json files that contain secrets.

Troubleshooting tips

  • Validate the JSON syntax (missing commas and brackets are common causes).
  • Confirm the server's command is available in your PATH.
  • Check that all referenced environment variables are set and approved.
  • In the IDE, open the Output tab in the Kiro panel and select Kiro - MCP Logs to see detailed errors.

Key takeaways

  • MCP gives Kiro a standardized way to reach external tools, data, and specialized knowledge.
  • mcp.json defines your servers, at workspace or user level, for local or remote connections.
  • You control what is connected, what is exposed, and which tools are approved.
  • The best question to ask is: "What context does my agent need to complete this task properly?"
Once you understand mcp.json, MCP becomes much less mysterious.

Learn more

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article