Skip to content

Assistant: let admins plug in MCP servers, app APIs and a knowledge base #389

Closed

Description

@mchestr

Problem

The admin assistant can call only the external service tools in lib/chatbot/tools/ (Plex, Tautulli, Overseerr, Sonarr, Radarr, media marking). It cannot query this app's own data, for example users, invites, subscriptions, Rewind status, queues, LLM usage or settings. It also has no source of operator knowledge, so it cannot diagnose common problems well. To add a capability, a developer must write a tool and an executor in code.

Goal

Make it easy to plug MCP servers and APIs into the assistant, so that it can look up information and debug common problems.

Scope

  1. Add read-only tools for the app's admin data. Reuse the lib/data/* loaders so that each tool keeps its assertAdmin() check.
  2. Add an admin setting to register MCP servers (URL, transport, auth header). Store secrets in ENCRYPTED_FIELDS.
  3. Expose each MCP server's tools to the assistant. Let the admin turn each tool on or off.
  4. Add a knowledge base source. The first target is the mchestr/knowledgebase repo. Also consider a memini MCP server.
  5. Add tools for common debug tasks: service health checks, failed queue jobs, recent errors, a user's Plex access and subscription state.
  6. Review the current tools and the system prompt (lib/chatbot/prompts/). Confirm that each integration works and that the prompt lists all tools.

Notes

  • The chat assistant still uses callChatLLM (lib/llm/chat.ts, OpenAI only). Moving it onto the lib/llm/registry.ts model registry and the Vercel AI SDK makes MCP tool support simpler.
  • WARNING: An MCP server or an API can return text that contains instructions. Treat all tool output as data. Keep write tools behind a confirmation step, and audit-log each call with @/lib/security/audit-log.
  • Keep Discord out of scope until the admin path works. DISCORD_SAFE_TOOLS must not get admin tools.

Acceptance

  • The assistant answers "which invites expire this week?" and "why did user X's Rewind fail?" from app data.
  • An admin adds an MCP server in settings, and the assistant uses its tools without a code change.
  • The assistant cites the knowledge base when it answers an operator question.

Activity

  1. added
    enhancement
    admin-ui
    on Oct 23, 2026
  2. added 20 commits that reference this issue on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    admin-uienhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions