Skip to content

Commit 9a1a931

Browse files
authored
Merge branch 'main' into copilot/fix-5
2 parents 91f343d + d78aa2a commit 9a1a931

40 files changed

+10467
-460
lines changed

β€ŽCargo.tomlβ€Ž

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "solana-mcp-server"
3-
version = "0.1.2"
3+
version = "1.0.2"
44
edition = "2021"
55

66
[dependencies]
@@ -9,9 +9,15 @@ env_logger = "0.11"
99
chrono = "0.4"
1010
url = { version = "2.5.0", features = ["serde"] }
1111
anyhow = "1.0"
12+
thiserror = "1.0"
1213
serde = { version = "1.0", features = ["derive"] }
1314
serde_json = "1.0"
1415
tokio = { version = "1.36", features = ["full"] }
16+
tracing = "0.1"
17+
tracing-subscriber = { version = "0.3", features = ["json", "env-filter"] }
18+
uuid = { version = "1.0", features = ["v4"] }
19+
once_cell = "1.19"
20+
dashmap = "6.1"
1521
solana-client = "1.18"
1622
solana-sdk = "1.18"
1723
solana-account-decoder = "1.18"
@@ -20,3 +26,4 @@ spl-token = "4.0.0"
2026
base64 = "0.22"
2127
bs58 = "0.5"
2228
bincode = "1.3"
29+
reqwest = { version = "0.11", features = ["json"] }

β€ŽREADME.mdβ€Ž

Lines changed: 81 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,43 @@ 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+
πŸš€ **[Developer Onboarding Guide](./docs/ONBOARDING.md)** - **Start here if you're new to the project!**
277+
278+
- [πŸ—οΈ Architecture Overview](./docs/ARCHITECTURE.md) - Server internals and design
279+
- [πŸš€ Deployment Guide](./docs/DEPLOYMENT.md) - Local, serverless, and endpoint deployment
280+
- [πŸ“– API Reference](./docs/API_REFERENCE.md) - Complete method documentation
281+
- [βš™οΈ Configuration Guide](./docs/CONFIGURATION.md) - Configuration options and management
282+
207283
## Environment Variables
208284

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

211289
## Development
212290

0 commit comments

Comments
Β (0)