""" DSS MCP Server Plugins This directory contains dynamically loaded plugins for the DSS MCP server. Plugin Contract: - Each plugin is a .py file in this directory - Must export TOOLS: List[types.Tool] with MCP tool definitions - Must have a handler class with execute_tool(name, arguments) method - Optional: export PLUGIN_METADATA dict with name, version, author Example Plugin Structure: from mcp import types PLUGIN_METADATA = { "name": "My Plugin", "version": "1.0.0", "author": "DSS Team" } TOOLS = [ types.Tool(name="my_tool", description="...", inputSchema={...}) ] class PluginTools: async def execute_tool(self, name, arguments): if name == "my_tool": return {"result": "success"} Developer Workflow: 1. Copy _template.py to new_plugin.py 2. Edit TOOLS list and PluginTools class 3. (Optional) Create requirements.txt if plugin needs dependencies 4. Run: ../install_plugin_deps.sh (if dependencies added) 5. Restart MCP server: supervisorctl restart dss-mcp 6. Plugin tools are immediately available to all clients Dependency Management: - If your plugin needs Python packages, create a requirements.txt file - Place it in the same directory as your plugin (e.g., plugins/my_plugin/requirements.txt) - Run ../install_plugin_deps.sh to install all plugin dependencies - Use --check flag to see which plugins have dependencies without installing Example plugin with dependencies: plugins/ ├── my_plugin/ │ ├── __init__.py │ ├── tool.py (exports TOOLS and PluginTools) │ └── requirements.txt (jinja2>=3.1.2, httpx>=0.25.0) └── _template.py See _template.py for a complete example. """ __all__ = [] # Plugins are auto-discovered, not explicitly exported