gospy
Non-Invasive goroutine inspector
claude mcp add --transport stdio monsterxx03-gospy go install github.com/monsterxx03/gospy@latest \ --env GOSPY_ENABLE_MCP="true" \ --env GOSPY_DEFAULT_PORT="8974"
How to use
gospy is a Go-based process inspection tool that also exposes an MCP (Model Context Protocol) HTTP endpoint. Once installed, you can start a local MCP server by running the gospy binary with MCP enabled, which exposes endpoints for goroutine dumps, memory stats, and runtime information, as well as a dedicated MCP API endpoint. Use the included CLI to interact with a running Go process, for example by listing goroutines, viewing memory usage, or fetching runtime details for a given PID. The MCP interface allows programmatic access to the same capabilities, enabling external tooling to query runtime state via HTTP.
How to install
Prerequisites:
- Go 1.20+ installed on your system
- Linux or macOS (Apple Silicon supported)
- Root privileges if you need memory access for certain operations
Installation steps:
- Install the gospy binary using Go:
go install github.com/monsterxx03/gospy@latest
- Ensure the binary is in your PATH (the go install step places it in $(go env GOPATH)/bin, which should be on your PATH).
- Run the MCP-enabled server (example port 8974):
# Start the HTTP/MCP server with MCP enabled
sudo gospy serve --enable-mcp --port 8974
- Verify the server is running by visiting the MCP endpoint or the HTTP API:
curl http://localhost:8974/mcp
Notes:
- The tool requires root privileges to inspect certain process details (memory access).
- Build from source if needed by cloning the repository and running make as documented in the project.
Additional notes
Tips and caveats:
- The MCP server exposes endpoints such as GET /runtime?pid=<PID>, GET /goroutines?pid=<PID>, and GET /memstats?pid=<PID>, plus the /mcp endpoint for MCP interactions.
- Run the server with sudo when you need memory access for non-root processes.
- If the port is in use, choose another port with --port. Ensure firewalls allow access to the chosen port.
- The CLI commands (top, serve, summary) map to real-time process inspection; use --json to get machine-readable outputs.
- For automation, use the /mcp endpoint to integrate with external tooling that consumes MCP-formatted data.
Related MCP Servers
sandbox
A Model Context Protocol (MCP) server that enables LLMs to run ANY code safely in isolated Docker containers.
github-brain
An experimental GitHub MCP server with local database.
temporal
Empowering AI with Workflow Orchestration
mcp-tts
MCP Server for Text to Speech
tasker
An MCP server for Android's Tasker automation app.
chromedp
MCP server for browser automation using chromedp