Skip to content

CodeGraph MCP tools fail with "CodeGraph not initialized" when projectPath is omitted, even though index exists #196

@zhangyu1197

Description

@zhangyu1197

Problem

When using CodeGraph MCP tools without specifying the projectPath parameter, the tools fail with the error:
Error: Tool execution failed: CodeGraph not initialized for this project. Run 'codegraph init' first.
However, the CodeGraph index does exist in the project directory at .codegraph/codegraph.db (49.46 MB), and codegraph status command works correctly.

Environment

  • Project Directory: /Users/20250310/IdeaProjects/test1
  • Working Directory: Same as project directory
  • CodeGraph Index: Exists at .codegraph/codegraph.db
  • Index Status: Valid (1,152 files, 15,420 nodes, 26,260 edges)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions