Skip to content

MCP server fails to start: broken import path after src/ reorganization #465

@carlos-alm

Description

@carlos-alm

Bug

The MCP server fails to start every time Claude Code launches because src/cli/commands/mcp.js imports from a non-existent path.

Line 10:

const { startMCPServer } = await import('../../mcp.js');

src/mcp.js no longer exists — it was moved to src/mcp/index.js during the directory reorganization in commit 62d87f5 (refactor: move remaining flat src/ files into subdirectories #458).

Expected

const { startMCPServer } = await import('../../mcp/index.js');

Impact

  • MCP server cannot start at all — codegraph mcp throws ERR_MODULE_NOT_FOUND
  • Claude Code MCP integration fails on every launch
  • Affects both single-repo and multi-repo modes

Fix

One-line change in src/cli/commands/mcp.js line 10: update the import path from '../../mcp.js' to '../../mcp/index.js'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions