mcp-debugging

A testing procedure for a Go service called muster. It explains how to rebuild and restart the service, inspect logs, and test its tools through a debugging interface.

In plain words
What is it for?
Verifying Go changes, confirming that tools are registered, calling changed functionality, and checking service logs before and after tests.
Why use it?
It reduces the chance of testing stale code or missing startup and runtime errors after a change.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/giantswarm/muster/mcp-debugging
Clone the repo
git clone --depth 1 https://github.com/giantswarm/muster

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,559 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01559
Opus 5 $0.00000 $0.00779
Sonnet 5 $0.00000 $0.00312
Haiku 4.5 $0.00000 $0.00156

Measured yesterday against content hash 0a8e03382697, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp-debugging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/mcp-debugging.mdc · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

  • Core Testing Loop

    • Whenever you change Go code and want to test the new functionality, you MUST follow these steps:

      1. Restart the Service: Run the development restart script to rebuild and restart the muster service with your changes.
        ./scripts/dev-restart.sh
        
      2. Initial Log Check: Verify that the service started correctly by checking the logs.
        journalctl --user -u muster.service --no-pager |tail -n 50
        

      Look for any startup errors or unexpected messages.

    • Test with mcp-debug:

      • Use the mcp-debug tools to interact with the running service and test your new functionality.
      • Start by listing the available tools to ensure your new features are registered.
        # Example: List all tools from the mcp-debug server
        mcp_mcp-debug_call_tool(name="core_mcpserver_list_tools", arguments={ "serverName": "mcp-debug" })
        
      • Then, call the specific tools related to your changes to validate their behavior.
        # Example: Call a specific tool
        mcp_mcp-debug_call_tool(name="your_new_tool", arguments={...})
        
    • Final Log Check:

      • Inspect the logs again to see the output and any errors generated during your testing.
        journalctl --user -u muster.service --no-pager |tail -n 50
        
    • Important Note

      • Always use --no-pager: When using journalctl or systemctl, you MUST include the --no-pager flag. Without it, the output will be piped to a pager program, and you will not receive a response in the terminal.
  • Debugging muster via mcp-debug

    • mcp-debug provides core debugging tools to test and explore the functionality of muster exposed in its aggregated MCP server.
    • Use mcp-debug tools as the primary debugging interface rather than manual inspection
  • mcp-debug Tools

    • mcp_mcp-debug_list_tools: list all the tools exposed by the aggregated mcp server
    • mcp_mcp-debug_describe_tool: describe a tool exposed by the aggregated mcp server
    • mcp_mcp-debugcall_tool: execute a tool exposed by the aggregated mcp server
  • Aggregated MCP server

    • The aggregated MCP server is exposed by muster. This is the main subject of development and debugging here.
    • The aggregated MCP server exposes tools via the model-context-protocol that you can explore via mcp-debug
    • The main functionality of muster is exposed through the tools that are prefixed with core_*
    • The aggregated MCP server can be compiled and restarted via ./scripts/dev-restart.sh
  • Debugging Examples

      1. Verify All Services Are Running: Start by checking the overall health of the system:
      mcp_mcp-debug_call_tool(name="core_service_list", arguments={})
      
      1. Check MCP Server Registration: Verify that all expected MCP servers are properly registered with the aggregator:
      mcp_mcp-debug_call_tool(name="core_mcpserver_list", arguments={})
      
      1. If a service shows as unhealthy:
      2. Check its detailed status: core_service_status
      3. Try restarting it: core_service_restart
      4. Check if its MCP client is attached in the service list
      1. Workflow validation fails:
      • Use core_workflow_validate to check syntax
      • Ensure tool names exist (check with mcp_mcp-debug_list_tools)
      • Verify argument schemas match the tool requirements
  • Important Notes

    • The tools with the prefix x_ are coming from the MCP servers that are managed by muster and then aggregated in its own MCP server. Please don't try to fix them. They are separate projects.
    • Tool names from individual MCP servers get prefixed like this x_kubernetes_* for the kubernetes MCP server and x_prometheus_* for the prometheus MCP server
  • Debugging Approach

    • Phase 1: System Health Verification
      mcp_mcp-debug_call_tool(name="core_mcpserver_list", arguments={})
      mcp_mcp-debug_call_tool(name="core_serviceclass_list", arguments={})
      mcp_mcp-debug_call_tool(name="core_workflow_list", arguments={})
      mcp_mcp-debug_call_tool(name="core_service_list", arguments={})
      
      Key Checks:
      • All MCP servers services show "health": "Healthy" and "state": "Running"
      • ServiceClasses show "available": true
      • No missingTools in ServiceClass definitions
    • ServiceClass-Specific Testing
      # Test specific ServiceClass availability
      mcp_mcp-debug_call_tool(name="core_serviceclass_available", arguments={"name": "<serviceclass-name>"})
      
      # Test instantiation with safe parameters
      mcp_mcp-debug_call_tool(name="core_service_create", arguments={
      "serviceClassName": "<name>",
      "label": "debug-test",
      "parameters": {...}
      })
      
    • Dependency Verification
      # Test underlying tools directly
      mcp_mcp-debug_call_tool(name="<required-tool>", arguments={...})
      
      # Verify connectivity to external systems
      
    • Service Recovery
      # Restart failed services
      mcp_mcp-debug_call_tool(name="core_service_restart", arguments={"label": "<service-name>"})
      
      # Check detailed status
      mcp_mcp-debug_call_tool(name="core_service_status", arguments={"label": "<service-name>"})
      
    • Service Instance Management
      # List and clean up test instances
      mcp_mcp-debug_call_tool(name="core_service_list", arguments={})
      mcp_mcp-debug_call_tool(name="core_service_delete", arguments={"instanceId": "debug-test"})
      

Read the full file on GitHub · 148 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 148 lines · 0 tokens per session scan A 0a8e03382697

Subscribe to this mod's changes

mcp-debugging is a cursor rule published in the GitHub repository giantswarm/muster (28 stars, last pushed 2d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,559 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.