RAG-powered MCP server for Solana runtime and SIMDs
Project description
solana-mcp
RAG-powered MCP server for Solana runtime, SIMDs, and validator client source code.
What It Does
Indexes and searches across:
- Agave - Reference Rust validator (Anza)
- Jito-Agave - MEV-enabled fork (~70% of mainnet stake)
- Jito Programs - On-chain tip distribution and MEV programs
- Firedancer - Jump's C implementation (~22% with Frankendancer)
- SIMDs - Solana Improvement Documents
- Alpenglow - Future consensus protocol (not yet live)
Quick Start
# Install
pip install -e .
# Full build (download repos + compile + index)
solana-mcp build
# Or step by step
solana-mcp download # Clone repositories
solana-mcp compile # Extract code to JSON
solana-mcp index # Build vector embeddings
CLI Commands
# Build pipeline
solana-mcp build # Full pipeline
solana-mcp download # Clone repos (agave, jito-solana, firedancer, SIMDs, alpenglow)
solana-mcp compile # Parse Rust/C code into JSON
solana-mcp index # Build LanceDB vector index
# Search
solana-mcp search "stake delegation"
solana-mcp search "tower bft" --type rust
solana-mcp search "leader schedule" --limit 10
# Lookup
solana-mcp constant LAMPORTS_PER_SOL
solana-mcp function process_vote
# Status
solana-mcp status # Show what's downloaded/compiled/indexed
MCP Tools
When running as an MCP server, these tools are available:
| Tool | Purpose |
|---|---|
sol_search |
Semantic search across all indexed content |
sol_search_simd |
Search SIMDs specifically |
sol_grep_constant |
Fast constant lookup |
sol_analyze_function |
Get function source code |
sol_get_current_version |
Current mainnet version (v2.1) |
sol_list_versions |
Version history with features |
sol_get_consensus_status |
TowerBFT (current) vs Alpenglow (future) |
sol_list_feature_gates |
Feature gate activations |
sol_list_clients |
Validator client implementations |
sol_get_client |
Details on specific client |
sol_get_client_diversity |
Stake distribution across clients |
sol_expert_guidance |
Curated guidance on topics |
Validator Clients
Solana validator clients indexed:
| Client | Language | Notes |
|---|---|---|
| Jito-Agave | Rust | MEV-enabled fork |
| Frankendancer | C+Rust | Firedancer networking + Agave runtime |
| Agave | Rust | Reference implementation (Anza) |
| Firedancer | C | Full independent implementation (Jump) |
For current client diversity statistics, see validators.app.
Project Structure
src/solana_mcp/
├── server.py # MCP server with all tools
├── cli.py # CLI commands
├── versions.py # Version/client/consensus tracking
├── indexer/
│ ├── downloader.py # Git clone with sparse checkout
│ ├── compiler.py # Rust + C parsing (tree-sitter)
│ ├── chunker.py # Code/markdown chunking
│ └── embedder.py # Embeddings + LanceDB
└── expert/
└── guidance.py # Curated expert knowledge
Data Location
~/.solana-mcp/
├── agave/ # Reference client source
├── jito-solana/ # MEV fork source
├── jito-programs/ # On-chain MEV programs
├── firedancer/ # Jump's C implementation
├── solana-improvement-documents/
├── alpenglow/ # Future consensus
├── compiled/ # Extracted JSON
│ ├── agave/
│ ├── jito-solana/
│ ├── jito-programs/
│ └── firedancer/
└── lancedb/ # Vector index
Expert Guidance Topics
The sol_expert_guidance tool provides curated knowledge on:
Staking & Consensus:
staking- Delegation, warmup/cooldown, rewardsvoting- Vote accounts, TowerBFT votingslashing- Current lack of slashing, future planstowerbft- Current consensus mechanismconsensus- PoH + TowerBFT relationshipalpenglow- Future consensus (~150ms finality)poh- Proof of History (ordering, not consensus)
Runtime & Architecture:
accounts- Account model, rent, ownershipsvm- Solana Virtual Machineturbine- Block propagationleader_schedule- Slot assignmentepochs- 432,000 slots, ~2-3 days
MEV (Jito):
mev- MEV on Solana overviewjito- Jito infrastructure and architecturebundles- Atomic transaction bundlestips- Tip distribution to validators/stakers
Solana vs Ethereum
| Aspect | Ethereum | Solana |
|---|---|---|
| Spec format | Markdown + Python | Rust implementation |
| Slashing | Yes (3 penalties) | No (indirect penalties only) |
| Finality | ~13 min | ~12.8s → 150ms (Alpenglow) |
| Consensus | Casper FFG | TowerBFT → Alpenglow |
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Lint
ruff check src/
Differences from Official Solana MCP
The official mcp.solana.com is documentation-focused.
This implementation:
- Indexes actual source code from multiple clients
- Parses Rust and C with tree-sitter
- Tracks client diversity and stake distribution
- Includes expert guidance from protocol research
- Provides constant/function lookup with full source
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sol_mcp-0.2.0.tar.gz.
File metadata
- Download URL: sol_mcp-0.2.0.tar.gz
- Upload date:
- Size: 55.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1743ece7c6efc35552e5c69f5a4d99fd034f7249813f93b575e85f3a712d31dc
|
|
| MD5 |
4d8b605d82efee9a9028670443dd1de7
|
|
| BLAKE2b-256 |
4735a0934cf5459bdbd6a2aa952ed8ad23f5e923ee166b89984489486141720d
|
Provenance
The following attestation bundles were made for sol_mcp-0.2.0.tar.gz:
Publisher:
release.yml on b17z/solana-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sol_mcp-0.2.0.tar.gz -
Subject digest:
1743ece7c6efc35552e5c69f5a4d99fd034f7249813f93b575e85f3a712d31dc - Sigstore transparency entry: 908330044
- Sigstore integration time:
-
Permalink:
b17z/solana-mcp@664c4558c6413a5c5e585fa415a922747be7749e -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/b17z
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@664c4558c6413a5c5e585fa415a922747be7749e -
Trigger Event:
push
-
Statement type:
File details
Details for the file sol_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sol_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 52.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3384f7d66ad53138803b2e5af01b1dab3a47f2f53d12073475772dd77766ccae
|
|
| MD5 |
d8e0c04ac16db47cc30588ba868ad5d4
|
|
| BLAKE2b-256 |
965dbd1da956b0d9c2a89c516106bc897af103f79886f3fed8be6891e76956f7
|
Provenance
The following attestation bundles were made for sol_mcp-0.2.0-py3-none-any.whl:
Publisher:
release.yml on b17z/solana-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sol_mcp-0.2.0-py3-none-any.whl -
Subject digest:
3384f7d66ad53138803b2e5af01b1dab3a47f2f53d12073475772dd77766ccae - Sigstore transparency entry: 908330047
- Sigstore integration time:
-
Permalink:
b17z/solana-mcp@664c4558c6413a5c5e585fa415a922747be7749e -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/b17z
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@664c4558c6413a5c5e585fa415a922747be7749e -
Trigger Event:
push
-
Statement type: