Skip to content

MCP server relative paths in args resolve from Kiro install directory instead of workspace root #6525

@foxcoding

Description

@foxcoding

Before opening, please confirm:

Operating System

win32

Kiro Version

0.11.34

Bug Description

Version: Kiro v0.11.34, Windows

Description: When a workspace-level
mcp.json
uses relative paths in the args array for an MCP server command, Kiro resolves them from its own install directory (C:\Users\xxxx\AppData\Local\Programs\Kiro) instead of the workspace root folder.

Expected behavior: Relative paths in args should resolve from the workspace root, consistent with how VS Code-based MCP configs work.

Actual behavior: Paths resolve from Kiro's install directory.

Steps to reproduce:

Create a folder with this structure:
my-workspace/
├── .kiro/settings/mcp.json
└── python/my_mcp_server.py
In mcp.json, configure a server with a relative path:
{
"mcpServers": {
"my-server": {
"command": "python",
"args": ["python/my_mcp_server.py"]
}
}
}
Open my-workspace/ directly in Kiro as a workspace folder
MCP server fails to start
Error:

[warning] [my-server] Log from MCP Server: python: can't open file
'C:\Users\xxxx\AppData\Local\Programs\Kiro\python\my_mcp_server.py':
[Errno 2] No such file or directory
Notes:

The same relative path configuration works correctly in an existing workspace that was originally created/opened in Kiro (not copied from a template)
This may be related to workspace initialization timing — MCP servers may launch before the workspace root is fully resolved
Workaround: Use absolute paths in mcp.json args
Impact: Prevents creating portable/template workspaces with bundled MCP server scripts. Users must manually update paths after copying a workspace template to a new location.

Steps to Reproduce

Create a folder with this structure:
my-workspace/
├── .kiro/settings/mcp.json
└── python/my_mcp_server.py
In mcp.json, configure a server with a relative path:
{
"mcpServers": {
"my-server": {
"command": "python",
"args": ["python/my_mcp_server.py"]
}
}
}
Open my-workspace/ directly in Kiro as a workspace folder
MCP server fails to start
Error:

Expected Behavior

Expected behavior: Relative paths in args should resolve from the workspace root, consistent with how VS Code-based MCP configs work.

Actual behavior: Paths resolve from Kiro's install directory.

Conversation ID

db365337-2d40-4ffe-904f-764c1645a728
db365337-2d40-4ffe-904f-764c1645a728
db365337-2d40-4ffe-904f-764c1645a728
db365337-2d40-4ffe-904f-764c1645a728
db365337-2d40-4ffe-904f-764c1645a728

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions