Skip to main content

Monitor and manage MCP servers

Monitoring

ToolHive provides visibility into the status of your MCP servers. You can check the status of running servers and view their logs using the ToolHive CLI.

List running servers

To see all currently running MCP servers:

thv list

This shows the server name, status, transport method, port, and URL.

To include stopped servers in the list:

thv list --all

View server logs

To view the logs of a running or stopped MCP server, use the thv logs command. You can optionally follow the logs with the --follow option, which shows the most recent log entries and updates in real time.

thv logs <server-name> [--follow]

Logs are stored in the ToolHive application directory. The path depends on your platform:

  • macOS: ~/Library/Application Support/toolhive/logs/<server-name>.log
  • Linux: ~/.local/share/toolhive/logs/<server-name>.log

The specific log file path is displayed when you start a server with thv run.

Lifecycle management

MCP servers can be started, stopped, restarted, and removed using the ToolHive CLI. The commands are similar to Docker commands, but they're designed to work with the ToolHive CLI and MCP servers.

Stop a server

To stop a running MCP server:

thv stop <server-name>

This stops the server and the associated proxy process but keeps the container for future use.

Restart a server

To restart a stopped MCP server:

thv restart <server-name>

Remove a server

To remove a stopped MCP server:

thv rm <server-name>

This removes the container and cleans up the MCP server's entry in your configured clients.

note

If you use docker rm to remove an MCP container that ToolHive created, it won't clean up the MCP server's entry in your configured clients. Use thv rm to make sure the entry is removed.

Stop and remove in one command

To stop and remove a running MCP server in a single command:

thv rm -f <server-name>