Semantic execution debugger for Solana. Reconstructs CPI trees, decodes failures (0x1771 → 'slippage exceeded'), profiles compute. MCP server for AI agents.
SaferSkills independently audited sortie (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
<div align="center">
<a href="./public/logo.svg"><img src="./public/logo.svg" width="120" alt="SORTIE" /></a>
Semantic execution debugger for Solana transactions.
Decode failures (0x1771 → "slippage tolerance exceeded"). Trace CPI trees. Profile compute. Let AI agents inspect transactions through MCP.
Live demo · Report bug · Request feature
</div>
When a Solana transaction fails on mainnet, the raw error is useless: InstructionE...: custom program error: 0x1771. SORTIE does the work you shouldn't have to:
code to a human-readable string. "Slippage tolerance exceeded on output token." Covers 12+ protocols (Jupiter, Raydium, Orca, Drift, Meteora, Kamino, Mango, Marinade, Sanctum, SPL Token, System, Associated Token).
relationships. Failed branches highlighted. Per-instruction status, compute, error. Drag to explore.
optimization hints when something eats >80% of the budget.
sampled from a public RPC. Refreshes every 15s. Click any to debug.
/api/mcp. Four tools: explain_failure, analyze_transaction, list_protocols, get_recent_failures. Works with Claude Code, Codex, any MCP-compatible client.
git clone https://github.com/srivtx/sortie.git
cd sortie
npm install
npm run dev
# → http://localhost:3000Open http://localhost:3000 for the live failure feed. Paste any Solana transaction signature (or click one in the feed) to debug it.
The MCP endpoint is at http://localhost:3000/api/mcp. Configure your AI agent:
{
"mcpServers": {
"sortie": {
"url": "http://localhost:3000/api/mcp",
"transport": "http"
}
}
}Four tools:
| Tool | What it does |
|---|---|
explain_failure | Decode a transaction error: program, instruction, error code, likely cause |
analyze_transaction | Full analysis: CPI tree, compute profile, step-by-step timeline |
list_protocols | List all supported protocols and their decoders |
get_recent_failures | Recent failures across the network (filter by program) |
A live playground is at /mcp-demo — try each tool from your browser.
sortie/
├── app/
│ ├── page.tsx # live failure feed (home)
│ ├── tx/[signature]/page.tsx # transaction detail (5 tabs: timeline / tree / profile / logs / raw)
│ ├── mcp-demo/page.tsx # MCP playground
│ └── api/
│ ├── mcp/route.ts # MCP JSON-RPC 2.0 server
│ ├── recent-failures/ # live failure sampler
│ └── transaction/[signature]/ # transaction fetcher
├── components/ # reusable UI primitives
│ ├── CpiFlow.tsx # React Flow CPI tree
│ ├── ExecutionTimeline.tsx # step-by-step walk
│ ├── ComputeProfiler.tsx # CU breakdown + hot spots
│ ├── FailureAnalysis.tsx # auto-categorized errors
│ ├── RecentFailures.tsx # live feed component
│ ├── CopyButton.tsx # one-click clipboard
│ └── ThemeToggle.tsx # light/dark
├── lib/
│ ├── ir/ # intermediate representation
│ │ ├── types.ts # ExecutionStep, Action, etc.
│ │ └── builder.ts # parse raw tx → IR
│ └── parser/ # Solana-specific parsers
│ ├── transaction.ts # main entry
│ ├── instructions.ts # instruction decoding
│ ├── errors.ts # error code → human readable
│ ├── logs.ts # program log parsing
│ ├── balances.ts # balance change extraction
│ └── protocols/ # per-program decoders
├── public/ # logo, favicon
└── tailwind.config.ts # design tokensPublic RPC → Solana transaction
↓
lib/parser/transaction.ts
↓
Intermediate Representation (IR): tree of ExecutionSteps
↓
Components render the IR:
CpiFlow → the call tree
ExecutionTimeline → chronological steps
ComputeProfiler → CU breakdown
FailureAnalysis → error categorizationThe IR is the key abstraction. Add a new program decoder → it automatically works in every view (live feed, timeline, CPI tree, failure decoder).
// lib/parser/protocols/my-program.ts
import { ProtocolDecoder } from './types';
export const myProgram: ProtocolDecoder = {
programId: 'MyProgram11111111111111111111111111111111',
decodeError: (code: number) => {
const errors: Record<number, string> = {
0: 'Success',
1: 'Insufficient liquidity',
2: 'Slippage exceeded',
};
return errors[code] ?? `Unknown error: 0x${code.toString(16)}`;
},
decodeInstruction: (data: Buffer) => ({
type: 'swap',
params: { /* parsed fields */ },
}),
};Register it in lib/parser/protocols/index.ts. It shows up in the live feed, the failure decoder, the timeline, and the MCP tool responses — everywhere.
light/dark theming)
control)
Open an issue or PR to add more. See CONTRIBUTING.md for the protocol-decoder spec.
npm install # install deps
npm run dev # dev server
npm run build # production build
npm start # serve production build
npm run lint # next lint
npx tsc --noEmit # type-check"strict": true in tsconfig.json. No anyin committed code.
'use client' when you needstate, effects, or browser APIs.
:root inapp/globals.css, exposed via tailwind.config.ts. Theme switching works without re-renders.
via fetch. Add Zustand/Redux only if you actually need it.
For production, switch to Helius/QuickNode.
Deploys to Vercel with zero config:
vercelOr any Next.js-compatible host. The MCP endpoint is a standard Next.js API route — works on Vercel, Netlify, Cloudflare Pages, your own Node server.
Environment variables: none required for the public RPC. If you want a private RPC:
# .env.local
SOLANA_RPC_URL=https://mainnet.helius-rpc.com/?api-key=YOUR_KEYThen update lib/parser/transaction.ts to use it.
public RPC limits)
analyze_transaction callSee CONTRIBUTING.md for the full guide on adding program decoders, reporting issues, and the PR process.
MIT — Copyright (c) 2026 srivtx
examples
to decode
<sub>Built for the Superteam Earn "Ship useful agent skills" bounty. Released under MIT.</sub>
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.