{"id":"7dd33046-e5df-4782-b4cd-603968d32532","slug":"gospy","kind":"mcp","name":"gospy","summary":"Non-Invasive goroutine inspector","owner":"monsterxx03","repoUrl":"https://github.com/monsterxx03/gospy","license":"MIT","licenseTier":"permissive","trust":"community","stars":97,"match":null,"fewStars":false,"format":"mcp","createdAt":"2019-08-30T04:10:17.000Z","addedAt":"2026-10-14T03:45:04.957Z","logoUrl":"https://avatars.githubusercontent.com/u/813489?u=07229cbca1064c5c28147b8e92847f3a9a843007&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["cloud-infra"],"tags":["golang","goroutine","aider","profiling"],"runtime":"go","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-25T15:43:08.864Z","sample":false,"url":"https://conduits.dev/tools/gospy","language":"Go","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# Go Process Inspector\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/monsterxx03/gospy)](https://goreportcard.com/report/github.com/monsterxx03/gospy)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=gospy&config=eyJ1cmwiOiJodHRwOi8vbG9jYWxob3N0Ojg5NzQvbWNwIn0%3D)\n\nA tool for inspecting and analyzing running Go processes, including goroutine states, memory statistics, and binary information.\n\n## Features\n\n- View detailed goroutine information (status, scheduling info)\n- Analyze process memory statistics\n- Cross-platform support (Linux and macOS)\n- Terminal UI for interactive inspection\n- HTTP API for programmatic access\n- mcp server\n\n## Installation\n\n```bash\ngo install github.com/monsterxx03/gospy@latest\n```\n\n## Usage\n\n### CLI Interface\n\n```bash\n# Interactive terminal UI\nsudo gospy top --pid <pid>\n\n# HTTP API server\nsudo gospy serve --port 8974\n\n# Get process summary\nsudo gospy summary --pid <pid>\n\n# Get process summary in JSON format\nsudo gospy summary --pid <pid> --json\n```\n\n#### Summary Command Options\n- `--pid/-p` - Target process ID (required)\n- `--bin/-b` - Path to binary file (optional)\n- `--json/-j` - Output results in JSON format\n\n### API Endpoints\n\n- `GET /goroutines?pid=<pid>` - List all goroutines\n- `GET /memstats?pid=<pid>` - Get memory statistics\n- `GET /runtime?pid=<pid>` - Get runtime version info\n\n### MCP Server\n\nThe MCP server provides an http (streamableHTTP) endpoint. To enable:\n\n```bash\n>>> sudo gospy serve --enable-mcp --port 8974\n\nStarting API server on port 8974\nEndpoints:\n  GET /runtime?pid=<PID>     - Get runtime info\n  GET /goroutines?pid=<PID> - Get goroutines list\n  GET /memstats?pid=<PID>   - Get memory stats\n  GET /mcp   - MCP http endpoint\n\n```\n\nAvailable MCP tools:\n- `goroutines` - Dump goroutines for a go process\n- `gomemstats` - Dump memory stats for a go process\n- `goruntime`  - Dump runtime info for a go process\n- `pgrep`      - Find pid from process name\n\nConfig in cursor\n\n![](screenshots/mcp-config.png)\n\n\n### Terminal UI Controls\n\n- `q` - Quit\n- `r` - Refresh data\n- `s` - Suspend/Resume top view\n- `/` - Search/filter goroutines\n\n### Terminal UI Screenshot\n\n![Terminal UI Screenshot](screenshots/top.gif)\n\n## Building from Source\n\n```bash\ngit clone https://github.com/monsterxx03/gospy.git\ncd gospy\nmake\n```\n\n## Requirements\n\n- Go 1.20+\n- Linux or macOS (Apple Silicon only)\n- Root privileges (required for memory access)\n\n## Root Privileges\n\ngospy requires root privileges to:\n- Read process memory (/proc/<pid>/mem on Linux)\n- Access Mach APIs on macOS\n\nRun with sudo:\n```bash\nsudo gospy top --pid <pid>\n```\n\nFor development/debugging, you may want to:\n1. Build the binary first: `make`\n2. Run with sudo: `sudo ./gospy [command]`\n\n## Credits\n\nVersion 0.7.0 was completely rewritten from scratch with [aider](https://aider.chat), which wrote >90% of the code. Additional assistance from:\n- [DeepSeek](https://deepseek.com) (R1 + V3 models) - AI coding assistant\n\nTotal AI compute cost: ~$2 USD\n\n## License\n\nMIT - See [LICENSE](LICENSE) file for details.\n"}