Function: mcp-get-roots

mcp-get-roots is a natively compiled function defined in mcp.el.

Signature

(mcp-get-roots NAME)

Documentation

Get the current roots for MCP server NAME.

Returns a list of roots (strings or plists).

Source Code

;; Defined in /nix/store/5m747x13pb1ddrvbq9raj91c4q1h1kl0-emacs-packages-deps/share/emacs/site-lisp/elpa/mcp-20260615.940/mcp.el
(defun mcp-get-roots (name)
  "Get the current roots for MCP server NAME.

Returns a list of roots (strings or plists)."
  (when-let* ((connection (gethash name mcp-server-connections)))
    (condition-case nil
        (mcp--roots connection)
      (error nil))))