feat(mcp): tools/ package + fable_search

Establishes the tool pattern: each tool module exposes register(mcp),
register_all() aggregates them, build_mcp_server() calls register_all.

fable_search mirrors the existing fable-mcp contract (q/content_type/limit
in; {results, total} out) but calls services.embeddings.semantic_search_notes
directly instead of going over HTTP. User comes from mcp.current_user_id().

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-26 20:18:36 -04:00
parent 3579db2f06
commit fd0431dfb6
4 changed files with 163 additions and 1 deletions
+2 -1
View File
@@ -24,7 +24,8 @@ Hierarchy: Project -> Milestone -> Task/Note.
def build_mcp_server() -> FastMCP:
"""Build the FastMCP instance with all tools registered."""
mcp = FastMCP("fable", instructions=_INSTRUCTIONS.strip())
# Tools will be registered here in Phase 2/3.
from fabledassistant.mcp.tools import register_all
register_all(mcp)
return mcp