Solvitor MCP Server for Solana IDL Decompilation
Extract IDL files and decompile closed-source Solana smart contracts with the Solvitor MCP server and its reverse-engineering tools for developers.
npx -y @Adeptus-Innovatio/solvitor-mcpOverview
Solvitor MCP Server is a Model Context Protocol (MCP) server designed to extract Interface Definition Language (IDL) files and decompile closed-source Solana smart contracts. It combines an on-chain bytecode extractor, binary analysis helpers, and a pluggable file storage backend to produce developer-friendly IDL artifacts that can be used for auditing, SDK generation, or context provisioning for LLM-driven developer tools.
The server is useful when you need to recover ABI-like metadata for Solana programs that don’t publish an IDL. By automating program bytecode retrieval, disassembly, pattern-based IDL reconstruction, and persistent storage of results, Solvitor helps teams accelerate reverse engineering and integrate decompiled artifacts into CI pipelines, code search, or model context layers.
Features
- Extract on-chain program bytecode (Solana BPF) and persist blobs to storage
- Reverse-engineer IDL artifacts from bytecode using heuristics and pattern matching
- Pluggable storage adapters: local filesystem, S3-compatible object stores, and MCP-compatible stores
- HTTP MCP-compatible API for uploading, querying, and retrieving artifacts
- CLI and Docker Compose examples for local and containerized deployment
- Optional metadata indexing for search and program discovery
- Designed to integrate with LLM workflows and SDK generators
Installation / Configuration
Below are typical steps to get the server running locally. Adjust commands for your environment and preferred package manager.
Clone the repository:
Install dependencies and run (Node/npm example):
# using npm
Run with Docker Compose (example):
# docker-compose.yml
version: "3.8"
services:
solvitor:
image: adeptus-innovatio/solvitor-mcp:latest
ports:
- "8080:8080"
environment:
- MCP_PORT=8080
- STORAGE_ADAPTER=local
- STORAGE_PATH=/data/artifacts
volumes:
- ./data:/data/artifacts
Example .env (environment-driven configuration):
MCP_PORT=8080
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
STORAGE_ADAPTER=local # or s3
STORAGE_PATH=/data/artifacts # local path
S3_BUCKET=solvitor-artifacts # when using s3
S3_ENDPOINT=https://s3.example.com
LOG_LEVEL=info
Common environment variables and meaning:
| Variable | Purpose |
|---|---|
| MCP_PORT | Port to bind the HTTP MCP server |
| SOLANA_RPC_URL | RPC endpoint for fetching program account data |
| STORAGE_ADAPTER | Storage backend: local or s3 |
| STORAGE_PATH | Local storage path for artifacts |
| S3_BUCKET, S3_ENDPOINT, S3_ACCESS_KEY, S3_SECRET_KEY | S3-compatible configuration |
Available Tools / Resources
The project exposes a set of resources for decompilation and storage:
- IDL Extractor: reads program account data and extracts embedded data blocks likely to contain IDL-like JSON.
- BPF Disassembler: disassembles Solana BPF bytecode into an assembly view for manual inspection.
- Pattern-Based IDL Reconstructor: applies heuristics to recover account layouts, instruction signatures, and discriminators.
- Metadata Indexer: indexes program metadata (programId, name, tags) for search.
- Storage Adapters: local filesystem and S3-compatible object store adapters included.
- HTTP MCP API: conforms to MCP-style endpoints to upload artifacts and query model-context files.
API examples (MCP-like endpoints):
# Upload a program blob
# Request decompilation for an on-chain program
Use Cases
Recovering IDL for integration:
- Scenario: A team needs to call a closed-source Solana program from a backend service.
- Flow: Use Solvitor to fetch the program bytecode by programId, run the IDL reconstructor, export a reconstructed IDL JSON, then generate client-side SDK bindings.
Auditing and security review:
- Scenario: Security engineers want readable instruction and account layouts for triage.
- Flow: Run the disassembler and pattern-based reconstructor, attach the resulting IDL and disassembly to a vulnerability report or SIEM.
Enriching LLM context for developer tooling:
- Scenario: An assistant answering code questions requires precise program signatures.
- Flow: Store decompiled IDLs in the MCP server, then fetch them as model context files for prompt augmentation before invoking an LLM.
CI integration:
- Scenario: A repository’s CI checks for presence of published IDLs for referenced programs.
- Flow: CI job triggers Solvitor to attempt extraction and failure or success updates a compliance report.
Tips and Next Steps
- Use a private RPC node if you plan high-volume bytecode retrieval to avoid rate limits.
- When using S3 storage, set proper lifecycle and access policies; artifacts can be large.
- Combine automatic reconstructions with manual review—heuristics may not cover all ABIs.
- Integrate the MCP endpoints with your model-serving infra to provide reliable context files for LLMs.
For implementation details, example scripts, and advanced configuration, consult the repository’s docs and examples in the project tree.