# Stuckgo

> Stuckgo is an MCP server for developer tools. Reads a Go goroutine dump and ranks what a stuck program is waiting on. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI
- **Repository:** https://github.com/gillmacedo/stuckgo
- **MCP Registry name:** io.github.GillMacedo/stuckgo
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-15

## About

A hung Go service can show thousands of goroutines, most of them harmless listeners and idle workers. Stuckgo groups identical stacks, sets aside the ones that are normally idle, and ranks the rest by how many goroutines are involved and how long they have waited. When many goroutines queue on a mutex it names a possible holder, and says plainly that this is not proven.

It works only from dump text, so it never connects to your service. Seventeen numbered rules (SG101 to SG117) cover things like nil-channel sends, a full database/sql pool, HTTP calls with no timeout, unfinished WaitGroups and stuck channel sends. Comparing two dumps taken some time apart is the stronger way to spot a leak.

The README is candid about limits: findings are leads, one dump cannot prove a leak, debug=1 dumps show less, and it was not yet used on a production incident. Dumps can hold file paths and values, and your MCP client passes tool results to its model. It also ships as a CLI with JSON output and a CI exit code.

## Features

- **Stack grouping:** Collapses identical goroutine stacks and sets aside normally idle ones.
- **Two-dump comparison:** Shows growing stacks and goroutine IDs that stay in place, a stronger leak signal.
- **Rule-based findings:** Seventeen rules from SG101 to SG117 with high, medium or low severity.
- **Possible lock holders:** Names goroutines that might hold a contended mutex, labelled as unproven.
- **Runs offline:** Reads dump text or a file and never connects to the program.
- **CLI with CI mode:** Add --json for JSON, or --fail-on high to exit 1 in CI.

## Good for

- Diagnose a hanging Go service from a pprof dump
- Check for a goroutine leak using two dumps ten minutes apart
- Find out why a service ran out of database connections
- Spot outgoing HTTP calls that never time out

## Install

### Claude Code (Terminal)

```sh
claude mcp add stuckgo -- npx -y stuckgo
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "stuckgo": {
      "command": "npx",
      "args": [
        "-y",
        "stuckgo"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "stuckgo": {
      "command": "npx",
      "args": [
        "-y",
        "stuckgo"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "stuckgo": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "stuckgo"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "stuckgo": {
      "command": "npx",
      "args": [
        "-y",
        "stuckgo"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "stuckgo": {
      "command": "npx",
      "args": [
        "-y",
        "stuckgo"
      ]
    }
  }
}
```

## Tools

- `go_goroutine_review`: Reviews one goroutine dump, from text or a file.
- `go_goroutine_compare`: Compares two dumps of the same program.

## FAQ

### How do I get a dump?

Import net/http/pprof and fetch /debug/pprof/goroutine?debug=2. Sending kill -QUIT also prints one but ends the process.

### Can one dump prove a leak?

Not unless it is Go's own leak profile. Compare two dumps instead.

### Does Stuckgo connect to my service?

No. It works from the dump text alone.

### How does Stuckgo differ from panicparse?

Per the README, panicparse and goroutine-inspect help a person read a dump, while stuckgo gives an agent ranked findings and can compare two dumps.

### How do I add Stuckgo to Claude Code?

Run this command in your terminal: claude mcp add stuckgo -- npx -y stuckgo

### What are the best alternatives to Stuckgo?

The closest alternatives to Stuckgo are gograph, Stack Guardian, goflag, Linux MCP and Debuganything.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [gograph](https://ai-powered.com/mcp/gograph): gograph is an open-source MCP server for developer tools.
- [Stack Guardian](https://ai-powered.com/mcp/stack-guardian): Stack Guardian is an MCP server for developer tools.
- [goflag](https://ai-powered.com/mcp/goflag): goflag is an MCP server for marketing and seo.
- [Linux MCP](https://ai-powered.com/mcp/linux-mcp): Linux MCP is an open-source MCP server for cloud and infrastructure.
- [Debuganything](https://ai-powered.com/mcp/debuganything): Debuganything is an open-source MCP server for developer tools.
- [Betterloop](https://ai-powered.com/mcp/betterloop): Betterloop is an MCP server for developer tools.
- [Multigres](https://ai-powered.com/mcp/multigres): Multigres is an open-source MCP server for databases.
- [Stackhal](https://ai-powered.com/mcp/stackhal): Stackhal is a free MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/stuckgo
