Skip to content

v0.22.2 — MCP server returns clear error for uninitialized projects

Choose a tag to compare

@turbyho turbyho released this 14 Jul 08:01
v0.22.2
dd6a647

Overview

Fixes the self-bootstrapping issue where the MCP server would crash or return cryptic errors when the project had not been initialized with 'fw-context init' or indexed with 'fw-context index'. All MCP tools now return a clear, actionable error message instructing the user to run the required CLI commands.

Fixes

  • Self-bootstrapping: MCP server no longer crashes on uninitialized projects. Server startup explicitly validates project initialization and index existence, setting a sentinel that all tool handlers check before attempting database access.
  • Clear error messages: All 33 tools return consistent, numbered instructions (fw-context init, fw-context index --build, restart) when the project is not ready.
File Change
src/fw_context_mcp/mcp/server.py Startup test for project_id + index DB existence before mcp.run()
src/fw_context_mcp/mcp/shared/context.py New sentinel mechanism (_set_server_init_error, _check_server_ready) checked in _db_path() and _resolve_context()

Breaking changes

None.