/ Diretório / Playground / tda
● Comunidade irockel ⚡ Instantâneo

tda

por irockel · irockel/tda

Give Claude the power to read Java thread dumps — deadlocks, long-running threads, virtual-thread pinning, native-method blockers.

TDA (Thread Dump Analyzer) ships both a GUI and an MCP mode. In headless JAR mode, it exposes 6+ tools for parsing dump logs, summarizing state, detecting deadlocks, locating long-running threads, and analyzing virtual-thread carrier pinning.

Por que usar

Principais recursos

Demo ao vivo

Como fica na prática

tda.replay ▶ pronto
0/0

Instalar

Escolha seu cliente

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "tda": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/irockel/tda"
      ],
      "_inferred": true
    }
  }
}

Abra Claude Desktop → Settings → Developer → Edit Config. Reinicie após salvar.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "tda": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/irockel/tda"
      ],
      "_inferred": true
    }
  }
}

Cursor usa o mesmo esquema mcpServers que o Claude Desktop. Config de projeto vence a global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "tda": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/irockel/tda"
      ],
      "_inferred": true
    }
  }
}

Clique no ícone MCP Servers na barra lateral do Cline, depois "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "tda": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/irockel/tda"
      ],
      "_inferred": true
    }
  }
}

Mesmo formato do Claude Desktop. Reinicie o Windsurf para aplicar.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "tda",
      "command": "TODO",
      "args": [
        "See README: https://github.com/irockel/tda"
      ]
    }
  ]
}

O Continue usa um array de objetos de servidor em vez de um map.

~/.config/zed/settings.json
{
  "context_servers": {
    "tda": {
      "command": {
        "path": "TODO",
        "args": [
          "See README: https://github.com/irockel/tda"
        ]
      }
    }
  }
}

Adicione em context_servers. Zed recarrega automaticamente ao salvar.

claude mcp add tda -- TODO 'See README: https://github.com/irockel/tda'

Uma linha só. Verifique com claude mcp list. Remova com claude mcp remove.

Casos de uso

Usos do mundo real: tda

Diagnose a JVM hang from thread dumps with TDA

👤 Java backend engineers ⏱ ~20 min advanced

Quando usar: Production JVM went unresponsive; you have a series of kill -3 dumps.

Pré-requisitos
  • tda.jar downloaded — github.com/irockel/tda releases
  • Java 21+ installed — For Project Loom analysis features
Fluxo
  1. Parse the log
    parse_log on /tmp/threaddumps.log. Summarize: how many dumps, threads per dump.✓ Copiado
    → Dump overview
  2. Check for deadlocks
    check_deadlocks across all dumps. Which threads, which locks?✓ Copiado
    → Deadlock cycles if any
  3. Find long-running threads
    find_long_running threads persisting across all dumps. What are they doing?✓ Copiado
    → List with stack heads

Resultado: A specific thread + lock + code path responsible for the hang.

Armadilhas
  • Scripts printing to stdout corrupt the JSON-RPC stream — Use java -Djava.awt.headless=true -jar tda.jar --mcp without wrapping in any script that also prints

Hunt virtual-thread carrier pinning in a Loom app

👤 Teams adopting Project Loom ⏱ ~30 min advanced

Quando usar: Virtual threads aren't giving the concurrency you expected — suspect pinning.

Fluxo
  1. Capture dumps during load
    Collect thread dumps at peak load; parse_log them in TDA.✓ Copiado
    → Dumps loaded
  2. Analyze
    analyze_virtual_threads. Show carrier pinning hotspots and the Java code pinning them (typically synchronized blocks or native methods).✓ Copiado
    → Pinning list with source hints

Resultado: Targeted fixes (ReentrantLock instead of synchronized, etc.) backed by evidence.

Identify threads stuck in native methods

👤 Performance engineers on JNI-heavy apps ⏱ ~15 min advanced

Quando usar: Your app integrates with native libs and you suspect blocking native calls.

Fluxo
  1. List native-blocked threads
    get_native_threads for dump #3. Which native methods are they stuck in?✓ Copiado
    → Thread + native frame list

Resultado: Targeted review of specific JNI call sites.

Combinações

Combine com outros MCPs para 10× de alavancagem

Correlate thread-level findings with JVM metrics

TDA says lock X is contended — show JVM thread_blocked_seconds for the same window from Prometheus.✓ Copiado
tda + github

Turn findings into issues with code pointers

For the top 3 TDA findings, open a GitHub issue linking the suspect Java source lines.✓ Copiado

Ferramentas

O que este MCP expõe

FerramentaEntradasQuando chamarCusto
parse_log path: str First step, always local CPU
get_summary Overview before digging 0
check_deadlocks Hang diagnosis 0
find_long_running min_dumps?: int Persistent threads 0
analyze_virtual_threads Loom diagnostics 0
get_native_threads dump_index?: int JNI suspicion 0
get_zombie_threads Unresolved memory relocations 0
clear Reset before parsing a new log 0

Custo e limites

O que custa rodar

Cota de API
None
Tokens por chamada
Thread dumps are huge — 20k+ tokens per full dump. Summarize before dumping to chat
Monetário
Free
Dica
Use get_summary/find_long_running narrowing before asking for full stacks

Segurança

Permissões, segredos, alcance

Armazenamento de credenciais: None
Saída de dados: None — entirely local file parsing

Solução de problemas

Erros comuns e correções

MCP handshake corrupts

Run JAR exactly per README (headless + --mcp, no wrapper scripts printing to stdout)

parse_log fails on custom dump formats

Ensure dumps are standard HotSpot format; some APMs add prefixes TDA can't parse

Memory blows up on huge logs

Increase JVM heap for tda.jar: -Xmx4g or split the log into chunks

Alternativas

tda vs. outros

AlternativaQuando usarTroca
FastThread / other online analyzersYou're okay uploading dumps to a third partyData leaves your network
async-profiler + flame graphsYou have live control and want sampling profiler not dumpsDifferent artifact; needs agent attach

Mais

Recursos

📖 Leia o README oficial no GitHub

🐙 Ver issues abertas

🔍 Ver todos os 400+ servidores MCP e Skills