server-watch
MCP server from BrennerSpear/server-watch-mcp
claude mcp add --transport stdio brennerspear-server-watch-mcp server-watch-mcp
How to use
server-watch-mcp is a Node.js-based CLI wrapper that lets you monitor and capture output from any running command and expose it as an MCP server. It runs your chosen command as a child process, captures stdout and stderr in real time, and stores the most recent logs in a circular buffer. You can connect clients to the HTTP-based MCP server to retrieve logs and use Claude Code’s tools to query or filter the logs. The server provides two built-in tools: get_logs, which retrieves recent logs with optional stream-type filtering, and search_logs, which allows case-insensitive substring search across the stored logs. To use it, start the MCP server with your desired command wrapped, and then connect Claude Code (or any MCP client) to the provided HTTP endpoint to begin querying logs and monitoring output.
How to install
Prerequisites:
- Node.js and npm (or pnpm) installed on your system
Installation steps:
- Install the MCP server globally (or locally in your project):
npm install -g server-watch-mcp
or with pnpm
pnpm add -g server-watch-mcp - Verify installation by running the command: server-watch-mcp --help
- (Optional) If you want to install as a dev dependency in a project: pnpm add -D server-watch-mcp
Notes:
- The MCP server runs an HTTP server by default on port 6280, unless you override with the SERVER_WATCH_MCP_PORT environment variable.
- Ensure any command you wrap is accessible and can run in your shell environment (e.g., npm run dev, npm run build:watch, python app.py, etc.).
Additional notes
Environment variables and configuration tips:
- SERVER_WATCH_MCP_PORT: Override the default port 6280. Example: SERVER_WATCH_MCP_PORT=6281 server-watch-mcp npm run dev
- Logs are stored in-memory with a circular buffer of the last 5000 entries. If your process emits a high volume of logs, consider increasing memory or filtering output at the source to keep within the buffer.
- The MCP tools (get_logs and search_logs) can be invoked by connected clients; in Claude Code, you can issue prompts like: 'Show me the last 50 logs from stderr' or 'Search for any errors in the logs'.
- The server will continue running even if the wrapped command exits, allowing you to monitor restart scenarios or subsequent runs without restarting the MCP server.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud