sol-mcp 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sol_mcp-0.2.0.dist-info/METADATA +218 -0
- sol_mcp-0.2.0.dist-info/RECORD +20 -0
- sol_mcp-0.2.0.dist-info/WHEEL +4 -0
- sol_mcp-0.2.0.dist-info/entry_points.txt +3 -0
- solana_mcp/__init__.py +3 -0
- solana_mcp/cli.py +527 -0
- solana_mcp/config.py +324 -0
- solana_mcp/expert/__init__.py +5 -0
- solana_mcp/expert/guidance.py +452 -0
- solana_mcp/indexer/__init__.py +8 -0
- solana_mcp/indexer/chunker.py +457 -0
- solana_mcp/indexer/compiler.py +1101 -0
- solana_mcp/indexer/downloader.py +304 -0
- solana_mcp/indexer/embedder.py +755 -0
- solana_mcp/indexer/manifest.py +411 -0
- solana_mcp/logging.py +85 -0
- solana_mcp/models.py +62 -0
- solana_mcp/server.py +746 -0
- solana_mcp/tools/__init__.py +1 -0
- solana_mcp/versions.py +391 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sol-mcp
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: RAG-powered MCP server for Solana runtime and SIMDs
|
|
5
|
+
Project-URL: Homepage, https://github.com/be-nvy/solana-mcp
|
|
6
|
+
Project-URL: Documentation, https://github.com/be-nvy/solana-mcp#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/be-nvy/solana-mcp.git
|
|
8
|
+
Project-URL: Issues, https://github.com/be-nvy/solana-mcp/issues
|
|
9
|
+
Author: be.nvy
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
Keywords: blockchain,mcp,rag,runtime,search,simd,solana
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Requires-Dist: click>=8.0.0
|
|
22
|
+
Requires-Dist: gitpython>=3.1.0
|
|
23
|
+
Requires-Dist: lancedb>=0.4.0
|
|
24
|
+
Requires-Dist: mcp>=1.0.0
|
|
25
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
26
|
+
Requires-Dist: rich>=13.0.0
|
|
27
|
+
Requires-Dist: sentence-transformers>=2.2.0
|
|
28
|
+
Requires-Dist: tree-sitter-c>=0.20.0
|
|
29
|
+
Requires-Dist: tree-sitter-rust>=0.20.0
|
|
30
|
+
Requires-Dist: tree-sitter>=0.20.0
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
36
|
+
Provides-Extra: voyage
|
|
37
|
+
Requires-Dist: voyageai>=0.2.0; extra == 'voyage'
|
|
38
|
+
Description-Content-Type: text/markdown
|
|
39
|
+
|
|
40
|
+
# solana-mcp
|
|
41
|
+
|
|
42
|
+
RAG-powered MCP server for Solana runtime, SIMDs, and validator client source code.
|
|
43
|
+
|
|
44
|
+
## What It Does
|
|
45
|
+
|
|
46
|
+
Indexes and searches across:
|
|
47
|
+
- **Agave** - Reference Rust validator (Anza)
|
|
48
|
+
- **Jito-Agave** - MEV-enabled fork (~70% of mainnet stake)
|
|
49
|
+
- **Jito Programs** - On-chain tip distribution and MEV programs
|
|
50
|
+
- **Firedancer** - Jump's C implementation (~22% with Frankendancer)
|
|
51
|
+
- **SIMDs** - Solana Improvement Documents
|
|
52
|
+
- **Alpenglow** - Future consensus protocol (not yet live)
|
|
53
|
+
|
|
54
|
+
## Quick Start
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Install
|
|
58
|
+
pip install -e .
|
|
59
|
+
|
|
60
|
+
# Full build (download repos + compile + index)
|
|
61
|
+
solana-mcp build
|
|
62
|
+
|
|
63
|
+
# Or step by step
|
|
64
|
+
solana-mcp download # Clone repositories
|
|
65
|
+
solana-mcp compile # Extract code to JSON
|
|
66
|
+
solana-mcp index # Build vector embeddings
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## CLI Commands
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Build pipeline
|
|
73
|
+
solana-mcp build # Full pipeline
|
|
74
|
+
solana-mcp download # Clone repos (agave, jito-solana, firedancer, SIMDs, alpenglow)
|
|
75
|
+
solana-mcp compile # Parse Rust/C code into JSON
|
|
76
|
+
solana-mcp index # Build LanceDB vector index
|
|
77
|
+
|
|
78
|
+
# Search
|
|
79
|
+
solana-mcp search "stake delegation"
|
|
80
|
+
solana-mcp search "tower bft" --type rust
|
|
81
|
+
solana-mcp search "leader schedule" --limit 10
|
|
82
|
+
|
|
83
|
+
# Lookup
|
|
84
|
+
solana-mcp constant LAMPORTS_PER_SOL
|
|
85
|
+
solana-mcp function process_vote
|
|
86
|
+
|
|
87
|
+
# Status
|
|
88
|
+
solana-mcp status # Show what's downloaded/compiled/indexed
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## MCP Tools
|
|
92
|
+
|
|
93
|
+
When running as an MCP server, these tools are available:
|
|
94
|
+
|
|
95
|
+
| Tool | Purpose |
|
|
96
|
+
|------|---------|
|
|
97
|
+
| `sol_search` | Semantic search across all indexed content |
|
|
98
|
+
| `sol_search_simd` | Search SIMDs specifically |
|
|
99
|
+
| `sol_grep_constant` | Fast constant lookup |
|
|
100
|
+
| `sol_analyze_function` | Get function source code |
|
|
101
|
+
| `sol_get_current_version` | Current mainnet version (v2.1) |
|
|
102
|
+
| `sol_list_versions` | Version history with features |
|
|
103
|
+
| `sol_get_consensus_status` | TowerBFT (current) vs Alpenglow (future) |
|
|
104
|
+
| `sol_list_feature_gates` | Feature gate activations |
|
|
105
|
+
| `sol_list_clients` | Validator client implementations |
|
|
106
|
+
| `sol_get_client` | Details on specific client |
|
|
107
|
+
| `sol_get_client_diversity` | Stake distribution across clients |
|
|
108
|
+
| `sol_expert_guidance` | Curated guidance on topics |
|
|
109
|
+
|
|
110
|
+
## Validator Clients
|
|
111
|
+
|
|
112
|
+
Solana validator clients indexed:
|
|
113
|
+
|
|
114
|
+
| Client | Language | Notes |
|
|
115
|
+
|--------|----------|-------|
|
|
116
|
+
| Jito-Agave | Rust | MEV-enabled fork |
|
|
117
|
+
| Frankendancer | C+Rust | Firedancer networking + Agave runtime |
|
|
118
|
+
| Agave | Rust | Reference implementation (Anza) |
|
|
119
|
+
| Firedancer | C | Full independent implementation (Jump) |
|
|
120
|
+
|
|
121
|
+
For current client diversity statistics, see [validators.app](https://www.validators.app/cluster-stats).
|
|
122
|
+
|
|
123
|
+
## Project Structure
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
src/solana_mcp/
|
|
127
|
+
├── server.py # MCP server with all tools
|
|
128
|
+
├── cli.py # CLI commands
|
|
129
|
+
├── versions.py # Version/client/consensus tracking
|
|
130
|
+
├── indexer/
|
|
131
|
+
│ ├── downloader.py # Git clone with sparse checkout
|
|
132
|
+
│ ├── compiler.py # Rust + C parsing (tree-sitter)
|
|
133
|
+
│ ├── chunker.py # Code/markdown chunking
|
|
134
|
+
│ └── embedder.py # Embeddings + LanceDB
|
|
135
|
+
└── expert/
|
|
136
|
+
└── guidance.py # Curated expert knowledge
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Data Location
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
~/.solana-mcp/
|
|
143
|
+
├── agave/ # Reference client source
|
|
144
|
+
├── jito-solana/ # MEV fork source
|
|
145
|
+
├── jito-programs/ # On-chain MEV programs
|
|
146
|
+
├── firedancer/ # Jump's C implementation
|
|
147
|
+
├── solana-improvement-documents/
|
|
148
|
+
├── alpenglow/ # Future consensus
|
|
149
|
+
├── compiled/ # Extracted JSON
|
|
150
|
+
│ ├── agave/
|
|
151
|
+
│ ├── jito-solana/
|
|
152
|
+
│ ├── jito-programs/
|
|
153
|
+
│ └── firedancer/
|
|
154
|
+
└── lancedb/ # Vector index
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Expert Guidance Topics
|
|
158
|
+
|
|
159
|
+
The `sol_expert_guidance` tool provides curated knowledge on:
|
|
160
|
+
|
|
161
|
+
**Staking & Consensus:**
|
|
162
|
+
- `staking` - Delegation, warmup/cooldown, rewards
|
|
163
|
+
- `voting` - Vote accounts, TowerBFT voting
|
|
164
|
+
- `slashing` - Current lack of slashing, future plans
|
|
165
|
+
- `towerbft` - Current consensus mechanism
|
|
166
|
+
- `consensus` - PoH + TowerBFT relationship
|
|
167
|
+
- `alpenglow` - Future consensus (~150ms finality)
|
|
168
|
+
- `poh` - Proof of History (ordering, not consensus)
|
|
169
|
+
|
|
170
|
+
**Runtime & Architecture:**
|
|
171
|
+
- `accounts` - Account model, rent, ownership
|
|
172
|
+
- `svm` - Solana Virtual Machine
|
|
173
|
+
- `turbine` - Block propagation
|
|
174
|
+
- `leader_schedule` - Slot assignment
|
|
175
|
+
- `epochs` - 432,000 slots, ~2-3 days
|
|
176
|
+
|
|
177
|
+
**MEV (Jito):**
|
|
178
|
+
- `mev` - MEV on Solana overview
|
|
179
|
+
- `jito` - Jito infrastructure and architecture
|
|
180
|
+
- `bundles` - Atomic transaction bundles
|
|
181
|
+
- `tips` - Tip distribution to validators/stakers
|
|
182
|
+
|
|
183
|
+
## Solana vs Ethereum
|
|
184
|
+
|
|
185
|
+
| Aspect | Ethereum | Solana |
|
|
186
|
+
|--------|----------|--------|
|
|
187
|
+
| Spec format | Markdown + Python | Rust implementation |
|
|
188
|
+
| Slashing | Yes (3 penalties) | No (indirect penalties only) |
|
|
189
|
+
| Finality | ~13 min | ~12.8s → 150ms (Alpenglow) |
|
|
190
|
+
| Consensus | Casper FFG | TowerBFT → Alpenglow |
|
|
191
|
+
|
|
192
|
+
## Development
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
# Install with dev dependencies
|
|
196
|
+
pip install -e ".[dev]"
|
|
197
|
+
|
|
198
|
+
# Run tests
|
|
199
|
+
pytest
|
|
200
|
+
|
|
201
|
+
# Lint
|
|
202
|
+
ruff check src/
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Differences from Official Solana MCP
|
|
206
|
+
|
|
207
|
+
The official [mcp.solana.com](https://mcp.solana.com) is documentation-focused.
|
|
208
|
+
|
|
209
|
+
This implementation:
|
|
210
|
+
- Indexes actual **source code** from multiple clients
|
|
211
|
+
- Parses **Rust and C** with tree-sitter
|
|
212
|
+
- Tracks **client diversity** and stake distribution
|
|
213
|
+
- Includes **expert guidance** from protocol research
|
|
214
|
+
- Provides **constant/function lookup** with full source
|
|
215
|
+
|
|
216
|
+
## License
|
|
217
|
+
|
|
218
|
+
MIT
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
solana_mcp/__init__.py,sha256=HlNT4RJvbDFDO_Jpczsuj4wfG6LQB3_C_vmi6GQD8M8,95
|
|
2
|
+
solana_mcp/cli.py,sha256=4Xbp6uhLtiD9ya4ml7M3CHLr7hQpLIvUgZswDmudxG4,17659
|
|
3
|
+
solana_mcp/config.py,sha256=-y_uYIQFNwiztZpAeoVaG7_ibekD41xMuBioIj9q1bc,9775
|
|
4
|
+
solana_mcp/logging.py,sha256=y9NJOIjopo5VUpCxD92TDt2ANtlNn_0t0jJdG44KV18,2033
|
|
5
|
+
solana_mcp/models.py,sha256=Nh9kduT_NdTfzbOG9QrgNp2382u5Gw8rYUcz7RHlKZg,1810
|
|
6
|
+
solana_mcp/server.py,sha256=xXerV5lz3mLEuQpypOrsdE75CGg6a_M6-0unFuXWSEw,24027
|
|
7
|
+
solana_mcp/versions.py,sha256=fSxGMOubBWVaxkkrdmAklC-Jvn62kcbp1rfSjSpW6so,13172
|
|
8
|
+
solana_mcp/expert/__init__.py,sha256=VPZ0bjBssqQGTp-OxTDM1iiNuugGHMn4iKfBBm3KBn8,197
|
|
9
|
+
solana_mcp/expert/guidance.py,sha256=cW_JGdQL_NPSPrpfwTnMmSBXg-ZOUy3bfy34C6AwKBw,21663
|
|
10
|
+
solana_mcp/indexer/__init__.py,sha256=CBizqn3uCQL2An0a6cS7mK-bkaQzSrc7C4HsP-BWy8M,263
|
|
11
|
+
solana_mcp/indexer/chunker.py,sha256=2Wc5haGNNOsEJgBPpuEeOoQeMWQ99svBOdKnm6tBJmY,14387
|
|
12
|
+
solana_mcp/indexer/compiler.py,sha256=Vg9j2NU_DAkdG6Ill7qcLmqeOB9Y9F6ct_7zYJi7qvY,37568
|
|
13
|
+
solana_mcp/indexer/downloader.py,sha256=8-Pl-jfsyWVVI1_93RrdHN21ppC5gpWt27J-3aOJ4fo,9374
|
|
14
|
+
solana_mcp/indexer/embedder.py,sha256=PqHRfvqByeof8Juc2TgsuCIFcxtZkuQ_TlqlZGk42Oo,24465
|
|
15
|
+
solana_mcp/indexer/manifest.py,sha256=DfK4Ddb4n-8IgoCVlzeTvCiwUCKpmscMLr0EMreJ8Sw,12663
|
|
16
|
+
solana_mcp/tools/__init__.py,sha256=ODg8b6g5JUklg52mVaQdYUZq8MwsSjeXPhr5hndlgUk,28
|
|
17
|
+
sol_mcp-0.2.0.dist-info/METADATA,sha256=hu5bMafrdb8AHhlT95GKqI7cwH-AdBO3zSbz3gHFONg,6970
|
|
18
|
+
sol_mcp-0.2.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
19
|
+
sol_mcp-0.2.0.dist-info/entry_points.txt,sha256=Q3evUFnZQQXnhoKIIhduDX2jymUGfkyt_CDCoNF_wyk,83
|
|
20
|
+
sol_mcp-0.2.0.dist-info/RECORD,,
|
solana_mcp/__init__.py
ADDED