Skip to main content
Glama
README.md
# txdoctor-mcp

**Solana transaction failure diagnostics for AI agents.**

An MCP (Model Context Protocol) server that decodes Solana program errors —
including the cross-program collisions that no single project's docs explain:
code `0x1773` means one thing in Jupiter, another in Raydium CLMM, another in
Orca, and five more meanings elsewhere. This server returns **all** of them and
tells you how to identify which program raised yours.

Data source & web version: **[txdoctor.app](https://txdoctor.app)**

## Coverage

202 error entries across 12 programs:

| Program | Codes |
|---|---|
| Jupiter / Jupiter v4 | swap aggregation |
| Raydium CPMM / CLMM / AMM v4 | swap, liquidity, limit orders |
| Raydium LaunchLab | launchpad lifecycle: funding, graduation, vesting |
| Orca Whirlpools | concentrated liquidity |
| Meteora DLMM / Dynamic AMM | bin liquidity, launch pools |
| pump.fun | bonding curve, graduation |
| SPL Token / Token-2022 | token program errors |

Error definitions are compiled from each program's official source code and
IDLs — not guessed.

## Tools

### `lookup_error`
Look up a code by hex or decimal: `"0x1773"` or `"6003"`.
Returns every program's meaning, with likely causes, fixes and an example log
line for each — plus identification guidance when the code is contested.

### `decode_log`
Paste a transaction log. Extracts the failed program ID and error code, then
returns the exact meaning for that program, and the collision map when the
program is unknown.

### `list_programs`
List covered programs and code counts.

## Setup

### Claude Desktop

Add to `claude_desktop_config.json`:

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

### Any MCP client (stdio)

```bash
npx -y txdoctor-mcp
```

Zero dependencies. Node ≥ 18. Data is embedded and works fully offline.

## Example

```json
{ "tool": "lookup_error", "arguments": { "code": "0x1e" } }
```

→ `0x1e` (decimal 30) is claimed by 3 programs with 3 different meanings:
transfer fee exceeds maximum in SPL Token / Token-2022, exceeded slippage in
Raydium AMM v4 — with the log line and fixes for each.

## Web version

[txdoctor.app](https://txdoctor.app) has the full browsable catalogue, a
[cross-program collision index](https://txdoctor.app/cross-program-error-codes/),
and per-code pages like
[0x1773](https://txdoctor.app/code/0x1773/) (8 programs, 8 meanings).

## License

MIT

TDQS

A3.9/5.0

Scored across 3 tools

Disambiguation4/5

Each tool has a recognizable distinct role: list_programs is catalogue enumeration, decode_log is text/log-driven extraction, and lookup_error is direct code-driven lookup. The overlap between decode_log and lookup_error is real — both can end up returning meanings for an error code — but the input shapes (free text vs. a hex/decimal code) give an agent a clear selection rule.

Naming Consistency5/5

All three names follow a clean verb_noun snake_case pattern: decode_log, list_programs, lookup_error. The verb choice maps meaningfully to the operation (list for enumeration, lookup for keyed retrieval, decode for parsing).

Tool Count5/5

Three tightly scoped tools for a narrow diagnostic purpose, each covering a genuinely different entry point into the same catalogue. No redundant or filler tools; the surface matches the scope.

Completeness4/5

Core workflows — enumerate programs, decode a failed log, resolve a code — are all covered, including the cross-program collision case. Minor gaps: no lookup by program name or by error message/fuzzy text, and no batch decoding of multiple failure lines in one call.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues