Gospy

v1.0.0Developer Toolsstable

Non-Invasive goroutine inspector

aidergolanggoroutinemcp-serverprofiling
Share:
96
Stars
0
Downloads
0
Weekly
0/5

What is Gospy?

Gospy is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to non-invasive goroutine inspector

Non-Invasive goroutine inspector

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Non-Invasive goroutine inspector

Use Cases

Inspect goroutines non-invasively in Go applications. Profile and analyze concurrent program behavior.
monsterxx03

Maintainer

LicenseMIT
Languagego
Versionv1.0.0
UpdatedMar 31, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y gospy

Manual Installation

npx -y gospy

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Gospy

Gospy is a non-invasive Go process inspector that lets AI assistants interrogate live Go programs without attaching a debugger or modifying the target binary. It exposes goroutine states, memory statistics, and runtime version information through an HTTP API and an MCP endpoint, making it ideal for diagnosing concurrency issues, memory pressure, and goroutine leaks in production Go services.

Prerequisites

  • Go 1.20 or later installed on the machine running the target process
  • Root/sudo privileges (required to read process memory on Linux /proc and macOS Mach APIs)
  • Linux or macOS (Apple Silicon) — Windows is not supported
  • An MCP client such as Claude Desktop, Cursor, or Cline
  • The target Go binary must be running; gospy inspects live processes by PID
1

Install gospy

Install the gospy binary using the Go toolchain. This places the gospy binary in your $GOPATH/bin, which should be on your PATH.

go install github.com/monsterxx03/gospy@latest
2

Start the HTTP + MCP server

Run gospy in server mode with the --enable-mcp flag. Root privileges are required to access process memory. The server listens on the specified port and exposes both REST endpoints and the MCP streamable-HTTP endpoint at /mcp.

sudo gospy serve --enable-mcp --port 8974
3

Verify the server is running

Confirm the API is live by querying a running Go process. Replace 12345 with the actual PID of your Go application.

curl "http://localhost:8974/goroutines?pid=12345"
4

Configure your MCP client

Add gospy to your MCP client configuration. Because gospy uses streamable HTTP (not stdio), point the client at the /mcp endpoint on the running server.

{
  "mcpServers": {
    "gospy": {
      "url": "http://localhost:8974/mcp"
    }
  }
}
5

Use the interactive terminal UI (optional)

For human-interactive goroutine inspection you can also use the built-in terminal UI. Press q to quit, r to refresh, s to suspend/resume, and / to search goroutines.

sudo gospy top --pid 12345

Gospy Examples

Client configuration

Add gospy to Claude Desktop or Cursor by pointing at the running MCP HTTP endpoint. Start gospy serve first, then add this block.

{
  "mcpServers": {
    "gospy": {
      "url": "http://localhost:8974/mcp"
    }
  }
}

Prompts to try

Once gospy is connected, ask your AI assistant questions about a live Go process.

- "List all goroutines for PID 12345 and identify any that are blocked"
- "Show memory statistics for the Go service running as PID 12345"
- "What Go runtime version is the process with PID 12345 using?"
- "Find the PID of the process named 'myservice' and dump its goroutines"
- "Are there any goroutines in a deadlock state in PID 12345?"

Troubleshooting Gospy

Permission denied when starting gospy serve

gospy must be run with sudo because it reads process memory directly. Run: sudo gospy serve --enable-mcp --port 8974

MCP client cannot connect to the gospy endpoint

Ensure gospy serve is already running before starting your MCP client. gospy uses streamable HTTP, not stdio, so the server process must be up independently. Confirm with: curl http://localhost:8974/mcp

goroutines tool returns empty results or an error about the PID

Verify the target process is still running (ps aux | grep <name>) and that you are passing the correct numeric PID. The target must be a Go binary — gospy cannot inspect non-Go processes.

Frequently Asked Questions about Gospy

What is Gospy?

Gospy is a Model Context Protocol (MCP) server that non-invasive goroutine inspector It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Gospy?

Install via npm with the command: npx -y gospy. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Gospy?

Gospy works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Gospy free to use?

Yes, Gospy is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "gospy": { "command": "npx", "args": ["-y", "gospy"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Gospy?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides