Function: mcp-stop-server
mcp-stop-server is a natively compiled function defined in mcp.el.
Signature
(mcp-stop-server NAME)
Documentation
Stop the MCP server with the given NAME.
If the server is running, it will be shutdown and its connection will be removed
from mcp-server-connections. If no server with the given NAME is found,
a message will be displayed indicating that the server is not running.
Source Code
;; Defined in /nix/store/5m747x13pb1ddrvbq9raj91c4q1h1kl0-emacs-packages-deps/share/emacs/site-lisp/elpa/mcp-20260615.940/mcp.el
;;;###autoload
(defun mcp-stop-server (name)
"Stop the MCP server with the given NAME.
If the server is running, it will be shutdown and its connection will be removed
from `mcp-server-connections'. If no server with the given NAME is found,
a message will be displayed indicating that the server is not running."
(if-let* ((connection (gethash name mcp-server-connections)))
(progn
(ignore-errors
(jsonrpc-shutdown connection))
(setf (mcp--status connection) 'stop))
(message "mcp %s server not started" name)))