Skip to content

Commit d92f163

Browse files
committed
Adjusted docs for new wallet mode on MCP
1 parent 80f01dc commit d92f163

4 files changed

Lines changed: 194 additions & 29 deletions

File tree

.yarn/install-state.gz

445 KB
Binary file not shown.

docs/mcp-server/introduction.mdx

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,38 @@ icon: "robot"
2121

2222
## Quick Start
2323

24-
Add the Sei MCP Server to your AI assistant with this configuration:
24+
<Note>
25+
**Secure by Default**: The MCP server runs in **read-only mode** by default. Wallet tools are disabled until you explicitly configure a private key.
26+
</Note>
27+
28+
### Basic Setup (Read-Only)
29+
30+
Start with read-only blockchain data access:
31+
32+
```json
33+
{
34+
"mcpServers": {
35+
"sei": {
36+
"command": "npx",
37+
"args": ["-y", "@sei-js/mcp-server"]
38+
}
39+
}
40+
}
41+
```
42+
43+
### Full Setup (With Wallet)
44+
45+
To enable transactions and wallet tools, add the wallet mode flag and private key:
2546

2647
```json
2748
{
2849
"mcpServers": {
2950
"sei": {
3051
"command": "npx",
31-
"args": ["@sei-js/mcp-server"],
52+
"args": ["-y", "@sei-js/mcp-server"],
3253
"env": {
33-
"PRIVATE_KEY": "your_private_key_here"
54+
"WALLET_MODE": "private-key",
55+
"PRIVATE_KEY": "0x123..."
3456
}
3557
}
3658
}
@@ -46,7 +68,8 @@ Add the Sei MCP Server to your AI assistant with this configuration:
4668
The Model Context Protocol is an open standard that connects AI systems with custom prompts, tools and data sources (context). It enables:
4769

4870
- **Real-time blockchain data access** - Get current balances, transaction history, and network status directly from Sei
49-
- **Full execution and write operations** - Deploy contracts, execute transactions, and interact with smart contracts
71+
- **Secure by default** - Runs in read-only mode until you explicitly enable wallet tools
72+
- **Full execution and write operations** - Deploy contracts, execute transactions, and interact with smart contracts (with wallet configured)
5073
- **Up-to-date documentation access** - Search and understand the latest Sei documentation and guides
5174
- **Specialized blockchain capabilities** - Access Sei-specific features like precompiles and native token operations
5275

docs/mcp-server/setup.mdx

Lines changed: 82 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ icon: "download"
2020
Click "Add new Global MCP server" and add this configuration to mcp.json:
2121

2222
<CodeGroup>
23-
```json mcp.json
23+
```json
2424
{
2525
"mcpServers": {
26-
"sei-mcp-server": {
26+
"sei": {
2727
"command": "npx",
2828
"args": ["-y", "@sei-js/mcp-server"],
2929
"env": {
30-
"PRIVATE_KEY": "your_private_key_here"
30+
"WALLET_MODE": "private-key",
31+
"PRIVATE_KEY": "0x123..."
3132
}
3233
}
3334
}
@@ -58,14 +59,15 @@ icon: "download"
5859
Add the Sei MCP Server to your configuration:
5960

6061
<CodeGroup>
61-
```json Configuration
62+
```json
6263
{
6364
"mcpServers": {
6465
"sei": {
6566
"command": "npx",
6667
"args": ["-y", "@sei-js/mcp-server"],
6768
"env": {
68-
"PRIVATE_KEY": "your_private_key_here"
69+
"WALLET_MODE": "private-key",
70+
"PRIVATE_KEY": "0x123..."
6971
}
7072
}
7173
}
@@ -92,14 +94,15 @@ icon: "download"
9294
Open Settings → Developer → Edit Config and add:
9395

9496
<CodeGroup>
95-
```json Claude Config
97+
```json
9698
{
9799
"mcpServers": {
98100
"sei": {
99101
"command": "npx",
100102
"args": ["-y", "@sei-js/mcp-server"],
101103
"env": {
102-
"PRIVATE_KEY": "your_private_key_here"
104+
"WALLET_MODE": "private-key",
105+
"PRIVATE_KEY": "0x123..."
103106
}
104107
}
105108
}
@@ -126,7 +129,11 @@ icon: "download"
126129

127130
<Step title="Add Server">
128131
```bash
132+
# Read-only mode (default)
129133
claude mcp add sei-mcp-server npx @sei-js/mcp-server
134+
135+
# Wallet-enabled mode
136+
claude mcp add sei-mcp-server-wallet npx @sei-js/mcp-server --env WALLET_MODE=private-key PRIVATE_KEY=0x123...
130137
```
131138
</Step>
132139

@@ -142,24 +149,82 @@ icon: "download"
142149
</Tab>
143150
</Tabs>
144151

145-
## Private Key Setup
152+
## Wallet Connection
153+
154+
<Note>
155+
**Wallet Tools Disabled by Default**
156+
157+
For security, the MCP server runs in **read-only mode** by default. Only blockchain data tools are available without wallet configuration.
158+
</Note>
159+
160+
### Default Behavior (Read-Only)
161+
162+
Without wallet configuration, you can:
163+
- ✅ Check balances and account data
164+
- ✅ Read smart contract data
165+
- ✅ Get network and block information
166+
- ✅ Search documentation
167+
- ❌ Send transactions or transfer tokens
168+
- ❌ Deploy or write to contracts
169+
- ❌ Approve token spending
170+
171+
### Enabling Wallet Tools
172+
173+
To unlock transaction capabilities, add your private key to the configuration:
146174

147175
<Warning>
148176
Use a dedicated test wallet with minimal funds. Never use your main wallet's private key.
149177
</Warning>
150178

151-
Export your private key from your wallet:
152-
153179
<Steps>
154-
<Step title="Access Wallet Settings">
155-
Look for "Export Private Key" or "Show Private Key" in wallet settings
180+
<Step title="Get Private Key">
181+
Export your private key from your wallet:
182+
- Look for "Export Private Key" or "Show Private Key" in wallet settings
183+
- Ensure the key starts with `0x`
184+
- Fund the wallet with small amounts for testing
156185
</Step>
157186

158-
<Step title="Verify Format">
159-
Ensure the key starts with `0x`
187+
<Step title="Add to Configuration">
188+
Add the `PRIVATE_KEY` environment variable to your MCP configuration:
189+
190+
```json
191+
{
192+
"mcpServers": {
193+
"sei": {
194+
"command": "npx",
195+
"args": ["-y", "@sei-js/mcp-server"],
196+
"env": {
197+
"WALLET_MODE": "private-key",
198+
"PRIVATE_KEY": "0x123...."
199+
}
200+
}
201+
}
202+
}
203+
```
160204
</Step>
161205

162-
<Step title="Fund Wallet">
163-
Fund the wallet with small amounts for testing
206+
<Step title="Restart & Verify">
207+
Restart your AI assistant and verify wallet tools are available:
208+
209+
**Ask your AI:** "What's my wallet address?"
210+
211+
If configured correctly, you'll get your wallet address. If not, you'll see an error message.
164212
</Step>
165-
</Steps>
213+
</Steps>
214+
215+
### Security Best Practices
216+
217+
<CardGroup cols={2}>
218+
<Card title="Test Wallet Only" icon="shield-check">
219+
Use a dedicated wallet for testing, not your main holdings
220+
</Card>
221+
<Card title="Minimal Funds" icon="coins">
222+
Keep only small amounts needed for testing transactions
223+
</Card>
224+
<Card title="Secure Storage" icon="lock">
225+
Never commit private keys to version control
226+
</Card>
227+
<Card title="Regular Rotation" icon="arrows-rotate">
228+
Rotate test wallet keys periodically
229+
</Card>
230+
</CardGroup>

docs/mcp-server/tools.mdx

Lines changed: 85 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,35 @@ description: "Complete reference of 28 MCP tools for blockchain operations"
44
icon: "wrench"
55
---
66

7-
The Sei MCP Server provides 28 tools for blockchain operations. Ask your AI assistant using natural language or the exact tool names below.
7+
The Sei MCP Server provides 28 tools for blockchain operations. **By default, wallet tools are disabled** and only read-only tools are available. [Enable wallet tools](/mcp-server/setup#wallet-connection) to unlock transaction capabilities.
88

9-
## Core Operations
9+
<Note>
10+
**Wallet Tools Disabled by Default**
11+
12+
For security, wallet-dependent tools require explicit configuration. Only read-only blockchain data tools are available by default.
13+
</Note>
14+
15+
## Read-Only Tools (Always Available)
16+
17+
These tools work without wallet connection and are available by default:
1018

1119
| Tool | Purpose | Example Usage |
1220
|------|---------|---------------|
13-
| `get_address_from_private_key` | Get wallet address | "What's my wallet address?" |
1421
| `get_balance` | Check SEI balance | "What's my SEI balance?" |
15-
| `transfer_sei` | Send SEI tokens | "Send 1 SEI to 0x742d..." |
1622
| `is_contract` | Check if address is contract | "Is 0x3894... a contract?" |
1723
| `estimate_gas` | Estimate transaction gas cost | "How much gas for this transaction?" |
1824

25+
## Wallet Tools (Require Configuration) 🔐
26+
27+
<Warning>
28+
These tools require [wallet configuration](/mcp-server/setup#wallet-connection) and are **disabled by default** for security.
29+
</Warning>
30+
31+
| Tool | Purpose | Example Usage |
32+
|------|---------|---------------|
33+
| `get_address_from_private_key` | Get wallet address | "What's my wallet address?" |
34+
| `transfer_sei` | Send SEI tokens | "Send 1 SEI to 0x742d..." |
35+
1936
## Network & Blockchain Data
2037

2138
| Tool | Purpose | Example Usage |
@@ -27,40 +44,68 @@ The Sei MCP Server provides 28 tools for blockchain operations. Ask your AI assi
2744
| `get_transaction` | Get transaction details | "Analyze transaction 0xabc..." |
2845
| `get_transaction_receipt` | Get transaction receipt | "Get receipt for 0xabc..." |
2946

30-
## Token Management (ERC-20)
47+
## Token Management
48+
49+
### Read-Only Token Tools
3150

3251
| Tool | Purpose | Example Usage |
3352
|------|---------|---------------|
3453
| `get_token_info` | Get ERC-20 token details | "Get info for token 0x3894..." |
3554
| `get_token_balance` | Check token balance | "What's my USDC balance?" |
3655
| `get_erc20_balance` | Check ERC-20 balance | "Check ERC20 balance for 0x742d..." |
3756
| `get_token_balance_erc20` | Get ERC-20 token balance | "Get token balance for address" |
57+
58+
### Wallet-Required Token Tools 🔐
59+
60+
| Tool | Purpose | Example Usage |
61+
|------|---------|---------------|
3862
| `transfer_token` | Send ERC-20 tokens | "Send 100 USDC to 0x742d..." |
3963
| `transfer_erc20` | Transfer ERC-20 tokens | "Transfer tokens to address" |
4064
| `approve_token_spending` | Approve token spending | "Approve 1000 USDC for 0xDEX..." |
4165

4266
## NFT Operations (ERC-721)
4367

68+
### Read-Only NFT Tools
69+
4470
| Tool | Purpose | Example Usage |
4571
|------|---------|---------------|
4672
| `get_nft_info` | Get NFT details | "Get info for NFT token 123" |
4773
| `check_nft_ownership` | Verify NFT ownership | "Do I own NFT token 123?" |
48-
| `transfer_nft` | Transfer NFT | "Transfer NFT token 123 to 0x742d..." |
4974
| `get_nft_balance` | Count NFTs owned | "How many NFTs do I own?" |
5075

76+
### Wallet-Required NFT Tools 🔐
77+
78+
| Tool | Purpose | Example Usage |
79+
|------|---------|---------------|
80+
| `transfer_nft` | Transfer NFT | "Transfer NFT token 123 to 0x742d..." |
81+
5182
## Multi-Token Operations (ERC-1155)
5283

84+
### Read-Only ERC-1155 Tools
85+
5386
| Tool | Purpose | Example Usage |
5487
|------|---------|---------------|
5588
| `get_erc1155_balance` | Get ERC-1155 token balance | "Check my ERC1155 token balance" |
5689
| `get_erc1155_token_uri` | Get ERC-1155 metadata URI | "Get metadata for token ID 123" |
90+
91+
### Wallet-Required ERC-1155 Tools 🔐
92+
93+
| Tool | Purpose | Example Usage |
94+
|------|---------|---------------|
5795
| `transfer_erc1155` | Transfer ERC-1155 tokens | "Transfer ERC1155 token to address" |
5896

5997
## Smart Contract Operations
6098

99+
### Read-Only Contract Tools
100+
61101
| Tool | Purpose | Example Usage |
62102
|------|---------|---------------|
63103
| `read_contract` | Read contract data | "Read balanceOf from contract 0x3894..." |
104+
105+
### Wallet-Required Contract Tools 🔐
106+
107+
| Tool | Purpose | Example Usage |
108+
|------|---------|---------------|
64109
| `write_contract` | Execute contract function | "Call contract function with params" |
65110
| `deploy_contract` | Deploy new smart contract | "Deploy my token contract" |
66111

@@ -70,11 +115,43 @@ The Sei MCP Server provides 28 tools for blockchain operations. Ask your AI assi
70115
|------|---------|---------------|
71116
| `search_sei_js_docs` | Search Sei-JS documentation | "How do I use precompiles with Viem?" |
72117

118+
## Enabling Wallet Tools
119+
120+
To use wallet-required tools (🔐), you must configure a wallet connection:
121+
122+
<Steps>
123+
<Step title="Set Private Key">
124+
Add your private key to the MCP server configuration:
125+
126+
```json
127+
{
128+
"mcpServers": {
129+
"sei": {
130+
"command": "npx",
131+
"args": ["-y", "@sei-js/mcp-server"],
132+
"env": {
133+
"WALLET_MODE": "private-key",
134+
"PRIVATE_KEY": "0x123..."
135+
}
136+
}
137+
}
138+
}
139+
```
140+
</Step>
141+
142+
<Step title="Restart MCP Server">
143+
Restart your AI assistant (Claude Desktop, Cursor, etc.) to activate wallet tools.
144+
</Step>
145+
</Steps>
146+
147+
[See full setup guide →](/mcp-server/setup#wallet-connection)
148+
73149
## Security Notes
74150

75151
<Warning>
76-
The MCP server requires a `PRIVATE_KEY` environment variable for transaction signing. Ensure this key is:
152+
**Wallet tools require a private key for transaction signing. Ensure this key is:**
77153
- Kept secure and never shared
78-
- Only used with funds you can afford to lose
154+
- Only used with funds you can afford to lose
79155
- Properly backed up before use
156+
- From a dedicated wallet, not your main holdings
80157
</Warning>

0 commit comments

Comments
 (0)