Skip to content

Commit 945bdb0

Browse files
authored
Merge pull request #251 from openSVM/copilot/fix-b3f8f482-78b2-4665-bfbc-20597ebd6f7d
Add comprehensive MCP server support with enterprise-grade security, automation features, and complete professional documentation system for unified blockchain operations
2 parents db75d4d + b701112 commit 945bdb0

File tree

9 files changed

+2668
-319
lines changed

9 files changed

+2668
-319
lines changed

README.md

Lines changed: 129 additions & 191 deletions
Original file line numberDiff line numberDiff line change
@@ -1,170 +1,76 @@
1-
# OSVM CLI. pvv4fu1RvQBkKXozyH5A843sp1mt6gTy9rPoZrBBAGS 🚀
2-
3-
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
4-
[![Rust](https://img.shields.io/badge/Rust-1.80.0+-orange.svg)](https://www.rust-lang.org/)
5-
[![Solana](https://img.shields.io/badge/Solana-1.14.29+-purple.svg)](https://solana.com/)
6-
7-
A powerful command-line interface for managing Solana Virtual Machines (SVMs) across various networks. Monitor, deploy, and manage your SVM infrastructure with a single tool.
8-
9-
## 📚 Documentation
10-
11-
For comprehensive documentation, please visit the [docs](docs/) directory:
12-
13-
- **[📖 Complete Documentation Index](docs/README.md)** - Start here for all documentation
14-
- **[🚀 Quick Start Guide](docs/installation.md)** - Installation and setup
15-
- **[💡 Examples & Patterns](docs/examples.md)** - Usage examples and workflows
16-
- **[⚙️ Configuration Guide](docs/configuration.md)** - Configuration management
17-
18-
### Core Features Documentation
19-
20-
- **[🖥️ SVM Management](docs/svm-management.md)** - Manage Solana Virtual Machines
21-
- **[🏗️ Node Management](docs/node-management.md)** - Deploy and monitor nodes
22-
- **[🌐 SSH Deployment](docs/ssh-deployment.md)** - Remote deployment capabilities
23-
- **[🔗 RPC Manager](docs/rpc-manager.md)** - RPC node management
24-
- **[📊 Dashboard](docs/dashboard.md)** - Interactive monitoring interfaces
25-
26-
### Advanced Features Documentation
27-
28-
- **[🔧 Self-Repair System](docs/self-repair-system.md)** - Automated maintenance
29-
- **[📋 Log Monitoring](docs/log-monitoring.md)** - Real-time log analysis
30-
- **[⚡ Validator Enhancements](docs/validator-enhancements.md)** - Performance optimization
31-
- **[📦 eBPF Deployment](docs/ebpf-deployment.md)** - Smart contract deployment
32-
33-
```mermaid
34-
graph TB
35-
User((User))
36-
37-
subgraph "OSVM CLI System"
38-
subgraph "CLI Interface"
39-
MainCLI["Main CLI<br>Rust/Clap"]
40-
CommandParser["Command Parser<br>Clap"]
41-
42-
subgraph "Core Commands"
43-
SVMCommands["SVM Commands<br>Rust"]
44-
NodeCommands["Node Commands<br>Rust"]
45-
SolanaCommands["Solana Commands<br>Rust"]
46-
RPCCommands["RPC Commands<br>Rust"]
47-
end
48-
end
49-
50-
subgraph "Node Management"
51-
NodeManager["Node Manager<br>Rust"]
52-
53-
subgraph "Node Components"
54-
NodeDB["Node Database<br>JSON"]
55-
NodeMonitor["Node Monitor<br>Rust"]
56-
NodeDashboard["Node Dashboard<br>Ratatui"]
57-
NodeMetrics["Node Metrics<br>Rust"]
58-
NodeLogs["Log Manager<br>Rust"]
59-
end
60-
end
61-
62-
subgraph "SSH Deployment"
63-
SSHManager["SSH Manager<br>SSH2"]
64-
65-
subgraph "Deployment Components"
66-
DeployConfig["Deployment Config<br>Rust"]
67-
DiskManager["Disk Manager<br>Rust"]
68-
ServiceManager["Service Manager<br>Rust"]
69-
HotSwap["Hot Swap Manager<br>Rust"]
70-
Dependencies["Dependency Manager<br>Rust"]
71-
end
72-
end
73-
74-
subgraph "Utilities"
75-
Logger["Logger<br>env_logger"]
76-
Config["Config Manager<br>YAML"]
77-
Dashboard["Dashboard Generator<br>HTML/CSS"]
78-
Examples["Examples Manager<br>Rust"]
79-
end
80-
end
81-
82-
subgraph "External Systems"
83-
SolanaNode["Solana Node<br>Rust"]
84-
RPCNode["RPC Node<br>JSON-RPC"]
85-
RemoteServer["Remote Server<br>Linux"]
86-
end
87-
88-
User -->|Uses| MainCLI
89-
MainCLI -->|Parses| CommandParser
90-
CommandParser -->|Executes| SVMCommands
91-
CommandParser -->|Executes| NodeCommands
92-
CommandParser -->|Executes| SolanaCommands
93-
CommandParser -->|Executes| RPCCommands
94-
95-
NodeCommands -->|Manages| NodeManager
96-
NodeManager -->|Stores| NodeDB
97-
NodeManager -->|Monitors| NodeMonitor
98-
NodeMonitor -->|Displays| NodeDashboard
99-
NodeMonitor -->|Collects| NodeMetrics
100-
NodeManager -->|Manages| NodeLogs
101-
102-
SolanaCommands -->|Deploys| SSHManager
103-
RPCCommands -->|Deploys| SSHManager
104-
SSHManager -->|Uses| DeployConfig
105-
SSHManager -->|Manages| DiskManager
106-
SSHManager -->|Controls| ServiceManager
107-
SSHManager -->|Handles| HotSwap
108-
SSHManager -->|Installs| Dependencies
109-
110-
MainCLI -->|Uses| Logger
111-
MainCLI -->|Reads| Config
112-
NodeDashboard -->|Generates| Dashboard
113-
MainCLI -->|Shows| Examples
114-
115-
SSHManager -->|Connects to| RemoteServer
116-
NodeMonitor -->|Monitors| SolanaNode
117-
NodeMonitor -->|Monitors| RPCNode
118-
```
1+
# OSVM CLI
2+
3+
[![License: MIT](https://img.shields.io/badge/License-MIT-gray.svg)](LICENSE)
4+
[![Rust](https://img.shields.io/badge/Rust-1.80.0+-gray.svg)](https://www.rust-lang.org/)
5+
[![Solana](https://img.shields.io/badge/Solana-1.14.29+-gray.svg)](https://solana.com/)
6+
7+
A command-line interface for managing Solana Virtual Machines (SVMs) across networks with AI and MCP server integration. Deploy, monitor, and manage SVM infrastructure with automated AI assistance and blockchain data services.
1198

120-
## ⚡ One-Line Installation
9+
## Installation
12110

122-
### Linux/macOS
11+
### Quick Install
12312

12413
```bash
12514
curl -sSf https://raw.githubusercontent.com/opensvm/osvm-cli/main/install.sh | sh
12615
```
12716

128-
### Windows
17+
### Alternative Methods
12918

19+
**Windows:**
13020
```bash
13121
powershell -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/opensvm/osvm-cli/main/install.ps1' -OutFile 'install.ps1'; .\install.ps1"
13222
```
13323

134-
### Docker
24+
**Docker:**
25+
```bash
26+
docker pull ghcr.io/opensvm/osvm-cli:latest
27+
docker run --rm ghcr.io/opensvm/osvm-cli:latest --version
28+
```
13529

136-
Run OSVM CLI in a Docker container without installing it locally:
30+
**From Source:**
31+
```bash
32+
git clone https://github.com/opensvm/osvm-cli.git
33+
cd osvm-cli && cargo build --release
34+
sudo cp target/release/osvm /usr/local/bin/
35+
```
36+
37+
## Core Features
38+
39+
- **SVM Management** - List, inspect, and manage Solana Virtual Machines
40+
- **Node Deployment** - Deploy validator and RPC nodes with automated configuration
41+
- **AI Integration** - Built-in AI assistance for security analysis and blockchain queries
42+
- **MCP Server Support** - Connect to Model Context Protocol servers for enhanced data access
43+
- **Interactive Dashboard** - Real-time monitoring with terminal-based interface
44+
- **Remote Management** - SSH deployment and management capabilities
45+
- **Performance Monitoring** - Track TPS, latency, and system requirements
46+
- **Automated Maintenance** - Self-repair systems and log monitoring
47+
- **Multi-Network Support** - Configure for mainnet, testnet, or devnet
48+
- **Command Examples** - Built-in help and workflow examples
49+
50+
## Basic Usage
13751

13852
```bash
139-
# Pull the latest image
140-
docker pull ghcr.io/opensvm/osvm-cli:latest
53+
# List all SVMs
54+
osvm svm list
14155

142-
# Run with version check
143-
docker run --rm ghcr.io/opensvm/osvm-cli:latest --version
56+
# Get SVM information
57+
osvm svm get sonic
14458

145-
# Run with interactive mode (mount current directory)
146-
docker run --rm -it -v $(pwd):/workspace ghcr.io/opensvm/osvm-cli:latest
59+
# Deploy node to remote server
60+
osvm user@host --svm sonic --node-type validator --network mainnet
14761

148-
# Use as an alias
149-
alias osvm='docker run --rm -it -v $(pwd):/workspace ghcr.io/opensvm/osvm-cli:latest'
150-
```
62+
# Launch interactive dashboard
63+
osvm svm dashboard
15164

152-
## 🌟 Key Features
65+
# Get help and examples
66+
osvm examples
67+
```
15368

154-
- **SVM Management**: List and inspect Solana Virtual Machines
155-
- **Node Deployment**: Deploy validator or dedicated RPC nodes with a single command
156-
- **Interactive Dashboard**: Real-time monitoring with a terminal-based UI
157-
- **Network Configuration**: Configure nodes for mainnet, testnet, or devnet
158-
- **Performance Metrics**: Track TPS, latency, and system requirements
159-
- **Colorized Output**: Enhanced readability with consistent color-coding for status, commands, and data
160-
- **Command Examples**: Built-in examples for common workflows and operations
161-
- **SSH Deployment**: Remote deployment and management capabilities
16269

163-
## 🚀 GitHub Actions Integration
16470

165-
OSVM CLI now includes a dedicated GitHub Action for seamless CI/CD integration! Deploy SVM nodes directly from your workflows with minimal configuration.
71+
## CI/CD Integration
16672

167-
### Quick Start
73+
Deploy SVM nodes directly from GitHub workflows with minimal configuration.
16874

16975
```yaml
17076
- name: Deploy SVM Node
@@ -177,18 +83,15 @@ OSVM CLI now includes a dedicated GitHub Action for seamless CI/CD integration!
17783
node-type: 'validator'
17884
```
17985
180-
### Features
181-
182-
- 🔒 **Secure**: Uses GitHub Secrets for sensitive data
183-
- 🎯 **Configurable**: Support for different networks and node types
184-
- 📊 **Detailed Logging**: Comprehensive deployment logs
185-
- 🔄 **Reusable**: Includes reusable workflows for common patterns
186-
187-
[📖 View Complete Documentation](.github/actions/svm-deploy/README.md) | [🔧 See Examples](examples/github-actions/)
86+
**Features:**
87+
- Secure deployment using GitHub Secrets
88+
- Configurable for different networks and node types
89+
- Detailed deployment logging
90+
- Reusable workflows for common patterns
18891
189-
---
92+
[View Complete Documentation](.github/actions/svm-deploy/README.md)
19093
191-
## 📋 Command Reference
94+
## Command Reference
19295
19396
### SVM Management
19497
@@ -329,65 +232,100 @@ or plain string:
329232
HN4tEEGheziD9dqcWg4xZd29htcerjXKGoGiQXM5hxiS
330233
```
331234

332-
## 🔧 Detailed Installation
235+
## AI Integration
333236

334-
### Prerequisites
237+
Built-in AI capabilities for blockchain analysis and assistance:
335238

336-
- Rust 1.80.0 or later
337-
- Solana CLI tools 1.14.29 or later
239+
```bash
240+
# Ask AI questions about Solana security
241+
osvm "What are the best practices for Solana smart contract security?"
242+
243+
# Use custom AI models (OpenAI, Ollama, LocalAI, etc.)
244+
export OPENAI_URL="https://api.openai.com/v1/chat/completions"
245+
export OPENAI_KEY="sk-your-openai-api-key"
246+
osvm "Help me optimize my validator performance"
247+
248+
# Local AI models for privacy
249+
export OPENAI_URL="http://localhost:11434/v1/chat/completions"
250+
export OPENAI_KEY="ollama-key"
251+
osvm "Analyze this smart contract for vulnerabilities"
252+
```
253+
254+
**AI Features:**
255+
- Smart contract analysis and security auditing
256+
- Automated code review of Solana programs
257+
- Best practices guidance for deployment
258+
- Privacy options with local models (Ollama, LocalAI)
259+
- Multi-provider support (OpenAI, Anthropic, OpenAI-compatible APIs)
338260

339-
### From Source
261+
## MCP Server Integration
262+
263+
Connect to Model Context Protocol servers for enhanced blockchain data access:
340264

341265
```bash
342-
# Clone the repository
343-
git clone https://github.com/opensvm/osvm-cli.git
344-
cd osvm-cli
266+
# Quick setup with Solana MCP server
267+
osvm mcp setup --auto-enable
345268

346-
# Build the project
347-
cargo build --release
269+
# Add MCP server manually
270+
osvm mcp add solana-server \
271+
--server-url https://api.solana-mcp.com \
272+
--auth-type bearer \
273+
--auth-token your-token \
274+
--enabled
348275

349-
# Install the binary
350-
sudo cp target/release/osvm /usr/local/bin/
351-
```
276+
# Add MCP server from GitHub repository
277+
osvm mcp add-github solana-mcp https://github.com/openSVM/solana-mcp-server --enabled
352278

353-
## 📊 Dashboard Features
279+
# Discover available tools
280+
osvm mcp tools solana-server
354281

355-
The interactive dashboard provides real-time monitoring of your SVM infrastructure, including:
282+
# Execute blockchain queries
283+
osvm mcp call solana-server getBalance --args '{"pubkey":"11111111111111111111111111111112"}'
284+
```
356285

357-
- Overview of all installed SVMs with status indicators
358-
- Network details for each SVM (mainnet, testnet, devnet)
359-
- Performance metrics with real-time visualization
360-
- Node status monitoring with resource usage
361-
- Aggregated logs from all nodes
286+
**MCP Features:**
287+
- Multi-transport support (HTTP, WebSocket, stdio)
288+
- Authentication with bearer tokens, API keys, basic auth
289+
- Circuit breaker for automatic failure recovery
290+
- Tool discovery for blockchain operations
291+
- GitHub integration for server deployment
292+
- AI-ready integration for enhanced analysis
293+
294+
## Dashboard
362295

363-
Launch the dashboard with:
296+
The interactive dashboard provides real-time monitoring:
364297

365298
```bash
366299
osvm svm dashboard
367300
```
368301

369-
### Keyboard Controls
302+
**Features:**
303+
- Overview of all SVMs with status indicators
304+
- Network details (mainnet, testnet, devnet)
305+
- Performance metrics with real-time visualization
306+
- Node status monitoring with resource usage
307+
- Aggregated logs from all nodes
370308

371-
- `Tab`, `Right Arrow`, `Left Arrow`: Switch between tabs
372-
- `Up Arrow`, `Down Arrow`: Navigate through items
373-
- `n`: Select next SVM
374-
- `v`: Toggle verbosity level (affects displayed information detail)
375-
- `p`: Select previous SVM
309+
**Keyboard Controls:**
310+
- `Tab`, ``, ``: Switch between tabs
311+
- ``, ``: Navigate through items
312+
- `n`/`p`: Select next/previous SVM
313+
- `v`: Toggle verbosity level
376314
- `h`: Toggle help overlay
377-
- `q` or `Ctrl+C`: Quit the dashboard
315+
- `q` or `Ctrl+C`: Quit
378316

379-
## 📚 Documentation
317+
## Documentation
380318

381-
- [📖 GitHub Actions Integration](.github/actions/svm-deploy/README.md) - Complete guide for CI/CD integration
382-
- [🔧 GitHub Actions Examples](examples/github-actions/) - Ready-to-use workflow examples
383-
- [📋 Command Reference](#-command-reference) - All available commands and options
384-
- [🎯 Usage Examples](#-usage-examples) - Common use cases and scenarios
385-
- [🔧 Installation Guide](#-detailed-installation) - Step-by-step setup instructions
386-
- [📊 Dashboard Features](#-dashboard-features) - Interactive monitoring capabilities
319+
- [Complete Documentation Index](docs/README.md) - Start here for all documentation
320+
- [AI Integration Guide](docs/ai-endpoint-configuration.md) - AI-powered analysis setup
321+
- [MCP Integration Guide](docs/mcp-integration.md) - Model Context Protocol server setup
322+
- [RPC Manager Guide](docs/rpc-manager.md) - RPC node management
323+
- [GitHub Actions Integration](.github/actions/svm-deploy/README.md) - CI/CD integration guide
324+
- [Examples & Patterns](docs/examples.md) - Usage examples and workflows
387325

388326
For complete documentation, visit [our official documentation](https://docs.opensvm.org).
389327

390-
## 🤝 Contributing
328+
## Contributing
391329

392330
Contributions are welcome! Please feel free to submit a Pull Request.
393331

@@ -430,6 +368,6 @@ If you need to skip the pre-commit hook for a specific commit (not recommended),
430368
git commit --no-verify -m "your message"
431369
```
432370

433-
## 📄 License
371+
## License
434372

435373
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

0 commit comments

Comments
 (0)