Add admin-only BookStack MCP connector

Load an allowlisted subset of bookstack-mcp tools (search/read plus
create/update books, chapters, pages and comments; no deletes) over stdio
and add them to the admin agent alongside Homebox. Extract the shared
allowlist + is_admin wrapping into utils/mcp_tools.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 16:54:01 -04:00
parent e03c10cde5
commit 0b8fe7b2df
12 changed files with 319 additions and 87 deletions
+1 -1
View File
@@ -1172,7 +1172,7 @@ def build_agent(checkpointer=None, extra_tools=()):
"""Compile and return the LangGraph agent.
``extra_tools`` are appended to the shared tool list, e.g. admin-only
Homebox tools for the admin agent.
Homebox and BookStack tools for the admin agent.
"""
return create_react_agent(
model=model_with_fallback,
+1 -1
View File
@@ -25,7 +25,7 @@ def tool_result_text(tool_name: str, output) -> str:
def get_agent_for(user: blueprints.users.models.User):
"""Admins get the agent with admin-only tools (Homebox); everyone else the main one."""
"""Admins get the agent with admin-only tools (Homebox, BookStack); everyone else the main one."""
if user.is_admin():
return getattr(current_app, "admin_agent", current_app.main_agent)
return current_app.main_agent
+3
View File
@@ -52,6 +52,9 @@ Always use these tools when asked about meals, recipes, what's for dinner, or sh
HOME INVENTORY (Homebox Integration):
If homebox_* tools are available, use them for questions about household items: where something is stored, what's in a location, warranties, and maintenance. Search before creating items to avoid duplicates.
WIKI (BookStack Integration):
If bookstack_* tools are available, use them to look up and write household documentation in the BookStack wiki. Search before creating books, chapters, or pages to avoid duplicates, and prefer updating an existing page over creating a near-copy. Write page content as markdown.
NOTES & RESEARCH (Obsidian Integration):
You have access to Ryan's Obsidian vault through the Obsidian integration. When users ask about research, personal notes, or information that might be stored in markdown files, use the appropriate Obsidian tools:
- Use obsidian_search_notes to search through your vault for relevant information