Skip to content

Commit 4166e66

Browse files
authored
Merge pull request #4 from openSVM/copilot/fix-3
Update Solana MCP with comprehensive RPC method documentation
2 parents 0f29c30 + bb55d4e commit 4166e66

25 files changed

+6790
-269
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ spl-token = "4.0"
2020
base64 = "0.21"
2121
bs58 = "0.5"
2222
bincode = "1.3"
23+
reqwest = { version = "0.11", features = ["json"] }

README.md

Lines changed: 79 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,32 @@ A Model Context Protocol (MCP) server that provides comprehensive access to Sola
2929
TEMP_DIR=$(mktemp -d) && cd "$TEMP_DIR" && git clone https://github.com/opensvm/solana-mcp-server.git . && cargo build --release && CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/claude" && mkdir -p "$CONFIG_DIR" && echo "{\"mcpServers\":{\"solana\":{\"command\":\"$PWD/target/release/solana-mcp-server\",\"env\":{\"SOLANA_RPC_URL\":\"https://api.mainnet-beta.solana.com\"}}}}" > "$CONFIG_DIR/config.json" || { rm -rf "$TEMP_DIR"; exit 1; }
3030
```
3131

32+
## Quick Deployment
33+
34+
🚀 **One-liner deployment scripts for all platforms:**
35+
36+
```bash
37+
# Local development
38+
./scripts/deploy-local.sh
39+
40+
# Docker container
41+
./scripts/deploy-docker.sh
42+
43+
# Kubernetes
44+
./scripts/deploy-k8s.sh
45+
46+
# AWS Lambda
47+
./scripts/deploy-lambda.sh
48+
49+
# Google Cloud Functions
50+
./scripts/deploy-gcf.sh
51+
52+
# Vercel Edge Functions
53+
./scripts/deploy-vercel.sh
54+
```
55+
56+
See [`scripts/README.md`](scripts/README.md) for detailed usage and requirements for each deployment option.
57+
3258
## Available RPC Methods
3359

3460
### Account Methods
@@ -49,9 +75,13 @@ TEMP_DIR=$(mktemp -d) && cd "$TEMP_DIR" && git clone https://github.com/opensvm/
4975
- Returns: Balance in lamports (1 SOL = 1,000,000,000 lamports)
5076

5177
- `getLargestAccounts`: Returns the 20 largest accounts by lamport balance
52-
- Input: None
78+
- Input: Optional `filter` (string) - Filter by account type (circulating|nonCirculating)
5379
- Returns: Array of accounts with their balances
5480

81+
- `getMinimumBalanceForRentExemption`: Returns minimum balance for rent exemption
82+
- Input: `dataSize` (integer) - Size of account data in bytes
83+
- Returns: Minimum lamports required for rent exemption
84+
5585
### Block Methods
5686
- `getBlock`: Returns identity and transaction information about a confirmed block
5787
- Input: `slot` (integer) - Slot number to query
@@ -78,9 +108,25 @@ TEMP_DIR=$(mktemp -d) && cd "$TEMP_DIR" && git clone https://github.com/opensvm/
78108
- Returns: Block commitment information
79109

80110
- `getBlockProduction`: Returns recent block production information
81-
- Input: None
111+
- Input: Optional `identity` (string) - Validator identity, `range` (object)
82112
- Returns: Block production stats
83113

114+
- `getSlot`: Returns the current slot the node is processing
115+
- Input: Optional `commitment` (string) - Commitment level
116+
- Returns: Current slot
117+
118+
- `getSlotLeaders`: Returns slot leaders for a given slot range
119+
- Input: `startSlot` (integer), `limit` (integer)
120+
- Returns: Array of validator identity pubkeys
121+
122+
- `getFirstAvailableBlock`: Returns the lowest confirmed block still available
123+
- Input: None
124+
- Returns: First available block slot
125+
126+
- `getGenesisHash`: Returns the genesis hash of the ledger
127+
- Input: None
128+
- Returns: Genesis hash as string
129+
84130
### System Methods
85131
- `getHealth`: Returns current health status of the node
86132
- Input: None
@@ -98,8 +144,12 @@ TEMP_DIR=$(mktemp -d) && cd "$TEMP_DIR" && git clone https://github.com/opensvm/
98144
- Input: None
99145
- Returns: Array of node information
100146

147+
- `getLeaderSchedule`: Returns the leader schedule for an epoch
148+
- Input: Optional `slot` (integer), `identity` (string)
149+
- Returns: Leader schedule by validator identity
150+
101151
- `getVoteAccounts`: Returns account info and stake for all voting accounts
102-
- Input: None
152+
- Input: Optional `votePubkey` (string), configuration parameters
103153
- Returns: Current and delinquent vote accounts
104154

105155
### Epoch and Inflation Methods
@@ -198,15 +248,41 @@ TEMP_DIR=$(mktemp -d) && cd "$TEMP_DIR" && git clone https://github.com/opensvm/
198248

199249
Once configured, you can interact with the Solana blockchain through natural language in Cline. Here are some example queries:
200250

251+
### Basic Queries
201252
- "What's the SOL balance of address Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr?"
202253
- "Show me the current slot number"
203254
- "Get information about the latest block"
204255
- "What's the current inflation rate?"
205256
- "Show me the token accounts owned by address ..."
206257

258+
### Multi-Network Queries
259+
- "List all available SVM networks"
260+
- "Enable Eclipse mainnet for queries"
261+
- "Check SOL balance on all enabled networks"
262+
- "Compare transaction counts across networks"
263+
264+
### Advanced Operations
265+
- "Show me the largest USDC token accounts"
266+
- "Get the leader schedule for the current epoch"
267+
- "Find all accounts owned by the SPL Token program"
268+
- "Check the block production stats for a validator"
269+
270+
## Documentation
271+
272+
For comprehensive documentation including architecture, deployment guides, and complete API reference, see:
273+
274+
📚 **[Complete Documentation](./docs/README.md)**
275+
276+
- [🏗️ Architecture Overview](./docs/ARCHITECTURE.md) - Server internals and design
277+
- [🚀 Deployment Guide](./docs/DEPLOYMENT.md) - Local, serverless, and endpoint deployment
278+
- [📖 API Reference](./docs/API_REFERENCE.md) - Complete method documentation
279+
- [⚙️ Configuration Guide](./docs/CONFIGURATION.md) - Configuration options and management
280+
207281
## Environment Variables
208282

209283
- `SOLANA_RPC_URL`: (Optional) The Solana RPC endpoint to use. Defaults to "https://api.mainnet-beta.solana.com" if not specified.
284+
- `SOLANA_COMMITMENT`: (Optional) Commitment level (processed|confirmed|finalized). Defaults to "confirmed".
285+
- `SOLANA_PROTOCOL_VERSION`: (Optional) MCP protocol version. Defaults to latest.
210286

211287
## Development
212288

0 commit comments

Comments
 (0)