MCPSERV.CLUB
monsterxx03

Gospy

MCP Server

Inspect Go processes with a terminal UI and HTTP API

Stale(55)
93stars
2views
Updated 12 days ago

About

Gospy is a cross‑platform tool for inspecting running Go processes. It provides interactive terminal views, an HTTP API, and MCP server endpoints to view goroutine states, memory statistics, and runtime information.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Terminal UI Screenshot

Overview

Gospy is a lightweight, cross‑platform Model Context Protocol (MCP) server that turns any running Go process into a richly observable resource for AI assistants. By exposing goroutine states, memory statistics, and runtime information over a standard HTTP API—and wrapping those endpoints in MCP tools—developers can query live Go programs from within Claude or other AI agents without needing to attach debuggers or write custom instrumentation code.

The server solves a common pain point for Go developers: introspecting production workloads. In many cases, diagnosing latency or deadlocks requires deep knowledge of the Go runtime and manual use of or . Gospy abstracts these complexities behind simple, RESTful endpoints (, , ) and MCP tool definitions that an AI can invoke directly. This enables automated troubleshooting, continuous monitoring, and even dynamic performance tuning driven by natural‑language queries.

Key capabilities include:

  • Goroutine inspection – List every goroutine, including status, stack trace, and scheduling details. Useful for spotting blocked or long‑running goroutines.
  • Memory statistics – Retrieve heap, stack, and GC metrics in real time, allowing an AI to report on memory pressure or leaks.
  • Runtime metadata – Expose the Go version, build tags, and environment information that may influence behavior.
  • Process discovery – A built‑in tool lets an assistant locate a process by name before querying it.
  • Terminal UI – An interactive ‑style interface provides a visual fallback for developers who prefer manual inspection.

In practice, Gospy shines in scenarios such as:

  • Auto‑debugging: A production AI assistant can ask, “What goroutines are blocking in the payment service?” and receive a structured list without manual log parsing.
  • CI/CD monitoring: During integration tests, an AI can poll to ensure memory usage stays within thresholds before marking a build as successful.
  • Root cause analysis: By correlating GC pauses reported by Gospy with latency spikes, an assistant can suggest targeted code changes.

Integration is straightforward: after installing the MCP server with , AI clients automatically discover the endpoint and load the tool definitions. From there, a single API call can trigger a goroutine dump or memory snapshot, and the assistant can present the data in natural language or embed it in a structured report.

Gospy’s standout features are its minimal footprint (written entirely in Go, requiring only root privileges for memory access) and its dual API/terminal UI approach. Developers can choose the most convenient interface, while AI assistants gain a consistent, machine‑readable view of Go runtime internals. This combination makes Gospy an essential component for any AI‑driven observability pipeline targeting Go services.