- Revert default transport to streamable-http (not a breaking change) - Extract AVAILABLE_APPS constant to server/__init__.py (DRY) - Wrap get_stdio_mcp ValueError in click.ClickException for clean errors - Fix test_stdio.py: call _reload_config() so dynaconf sees env changes - Use lazy %-style logging in stdio.py - Add private API comments in test assertions - Derive --enable-app CLI choices from AVAILABLE_APPS - README: show explicit --transport stdio in uvx examples Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
46 lines
1.6 KiB
Python
46 lines
1.6 KiB
Python
from typing import Callable
|
|
|
|
from .calendar import configure_calendar_tools
|
|
from .collectives import configure_collectives_tools
|
|
from .contacts import configure_contacts_tools
|
|
from .cookbook import configure_cookbook_tools
|
|
from .deck import configure_deck_tools
|
|
from .news import configure_news_tools
|
|
from .notes import configure_notes_tools
|
|
from .semantic import configure_semantic_tools
|
|
from .sharing import configure_sharing_tools
|
|
from .tables import configure_tables_tools
|
|
from .webdav import configure_webdav_tools
|
|
|
|
# Canonical mapping of app name → tool registration function.
|
|
# Used by app.py (HTTP), stdio.py (stdio), and cli.py (--enable-app choices).
|
|
# Semantic search is excluded here because it is a cross-app feature gated
|
|
# by VECTOR_SYNC_ENABLED, not an individual Nextcloud app.
|
|
AVAILABLE_APPS: dict[str, Callable] = {
|
|
"notes": configure_notes_tools,
|
|
"tables": configure_tables_tools,
|
|
"webdav": configure_webdav_tools,
|
|
"sharing": configure_sharing_tools,
|
|
"calendar": configure_calendar_tools,
|
|
"collectives": configure_collectives_tools,
|
|
"contacts": configure_contacts_tools,
|
|
"cookbook": configure_cookbook_tools,
|
|
"deck": configure_deck_tools,
|
|
"news": configure_news_tools,
|
|
}
|
|
|
|
__all__ = [
|
|
"AVAILABLE_APPS",
|
|
"configure_calendar_tools",
|
|
"configure_collectives_tools",
|
|
"configure_contacts_tools",
|
|
"configure_cookbook_tools",
|
|
"configure_deck_tools",
|
|
"configure_news_tools",
|
|
"configure_notes_tools",
|
|
"configure_semantic_tools",
|
|
"configure_sharing_tools",
|
|
"configure_tables_tools",
|
|
"configure_webdav_tools",
|
|
]
|