Skip to content

fix: MCP migrator ignores servers using 'transport' field (VS Code extension format)#7860

Open
OzMan21 wants to merge 1 commit intoKilo-Org:mainfrom
OzMan21:fix/mcp-migrator-transport-field
Open

fix: MCP migrator ignores servers using 'transport' field (VS Code extension format)#7860
OzMan21 wants to merge 1 commit intoKilo-Org:mainfrom
OzMan21:fix/mcp-migrator-transport-field

Conversation

@OzMan21
Copy link
Copy Markdown

@OzMan21 OzMan21 commented Mar 29, 2026

Problem

The VS Code extension writes MCP server configs with transport field (e.g., "transport": "sse"), but the CLI's mcp-migrator.ts only checks for the type field. This field name mismatch causes all SSE/HTTP transport servers to be silently skipped with:

WARN  service=kilocode.mcp-migrator name=cipher-direct local MCP server missing command, skipping

This means MCP servers configured via the VS Code extension UI are never loaded by the CLI.

Root Cause

In packages/opencode/src/kilocode/mcp-migrator.ts:

function isRemote(server: KilocodeMcpServer): boolean {
  return !!server.type && REMOTE_TYPES.has(server.type)
}

Only checks server.type, but the VS Code extension writes server.transport.

Fix

  • Added getTransportType() helper that checks both type and transport fields (with type taking precedence)
  • Updated isRemote() to use getTransportType()
  • Added transport field to KilocodeMcpServer interface
  • Added 6 regression tests

Config files affected

Any MCP config written by the VS Code extension UI uses transport instead of type, including:

  • Global mcp_settings.json
  • Project-level .kilocode/mcp.json

…tension format)

The VS Code extension writes MCP server configs with 'transport' field
(e.g., 'transport': 'sse'), but the CLI's mcp-migrator only checks for
'type' field. This causes all SSE/HTTP transport servers to be silently
skipped with 'local MCP server missing command, skipping' warnings.

Changes:
- Add getTransportType() helper that checks both 'type' and 'transport'
- Update isRemote() to use getTransportType()
- Add 'transport' field to KilocodeMcpServer interface
- Add regression tests for 'transport' field handling

Fixes the issue where MCP servers configured via the VS Code extension
UI (which writes 'transport') are not loaded by the CLI.
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot bot commented Mar 29, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/opencode/src/kilocode/mcp-migrator.ts
  • packages/opencode/test/kilocode/mcp-migrator.test.ts

Reviewed by gpt-5.4-20260305 · 436,857 tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant