Skip to content

Improve error message when MCP server has no indexes#6

Merged
igor0 merged 2 commits intomainfrom
minor-fix
Jan 15, 2026
Merged

Improve error message when MCP server has no indexes#6
igor0 merged 2 commits intomainfrom
minor-fix

Conversation

@igor0
Copy link
Copy Markdown
Contributor

@igor0 igor0 commented Jan 15, 2026

Clarify that the MCP server requires at least one index to operate and provide the command to create an index. Applied to both stdio and http subcommands.

Clarify that the MCP server requires at least one index to operate
and provide the command to create an index. Applied to both stdio
and http subcommands.
@igor0 igor0 requested a review from richhankins January 15, 2026 21:00
@augment-app-staging
Copy link
Copy Markdown

🤖 Augment PR Summary

Summary: Improves the MCP server startup error when no local indexes exist by clarifying an index is required.
Changes: Updates both mcp stdio and mcp http to print a clearer multi-line message and exit early when the default store has zero indexes.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augment-app-staging augment-app-staging bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/bin/cmd-mcp.ts Outdated
console.error("No indexes found. Create an index first with 'context-connectors index'");
console.error("Error: No indexes found.");
console.error("The MCP server requires at least one index to operate.");
console.error("Create an index first: context-connectors index <path>");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggested command context-connectors index <path> doesn’t appear to match the CLI’s actual index syntax (it takes a <source> subcommand like github|gitlab|bitbucket|website plus options), so this message may mislead users when they hit the “no indexes” case.

Other Locations
  • src/bin/cmd-mcp.ts:91

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link
Copy Markdown
Contributor

@richhankins richhankins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

- Use 'ctxc' instead of 'context-connectors' (the actual binary name)
- Point users to 'ctxc index --help' instead of incorrect command syntax
@igor0 igor0 merged commit 46670d8 into main Jan 15, 2026
@igor0 igor0 deleted the minor-fix branch January 15, 2026 21:49
Copy link
Copy Markdown

@benperlmutter benperlmutter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posted by mistake while troubleshooting; please ignore.

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.

3 participants