Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
654 changes: 654 additions & 0 deletions ai/agentic-wallets.mdx

Large diffs are not rendered by default.

536 changes: 536 additions & 0 deletions ai/cambrian-agent-kit.mdx

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions ai/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: 'Build on Sei with AI'

Check warning on line 2 in ai/index.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/index.mdx#L2

Did you really mean 'Sei'?
sidebarTitle: 'Overview'
description: 'AI tools for building on Sei — from knowledge injection that makes your AI assistant Sei-aware, to live blockchain tooling that lets it act on-chain.'

Check warning on line 4 in ai/index.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/index.mdx#L4

Did you really mean 'Sei'?

Check warning on line 4 in ai/index.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/index.mdx#L4

Did you really mean 'blockchain'?
keywords: ['sei ai', 'ai development', 'sei-skill', 'mcp server', 'ai agents', 'blockchain ai']
---

AI coding assistants are powerful — but they weren't trained on Sei's specifics. Without context, they'll give you generic Ethereum answers: wrong gas patterns, missing dual-address handling, outdated package names, and assumptions about finality that don't hold on a 400ms chain.

Check warning on line 8 in ai/index.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/index.mdx#L8

Did you really mean 'Sei's'?

Check warning on line 8 in ai/index.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/index.mdx#L8

Did you really mean 'Ethereum'?

Sei provides two complementary tools to fix this.

Check warning on line 10 in ai/index.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/index.mdx#L10

Did you really mean 'Sei'?

## Two tools, two roles

<CardGroup cols={2}>
<Card title="sei-skill" icon="brain" href="/ai/sei-skill">
**Knowledge injection.** Teaches your AI assistant everything about Sei — architecture, precompiles, wallet patterns, gas behavior, and ecosystem — so every answer it gives is Sei-specific from the start.

Check warning on line 16 in ai/index.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/index.mdx#L16

Did you really mean 'Sei'?

Check warning on line 16 in ai/index.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/index.mdx#L16

Did you really mean 'precompiles'?
</Card>
<Card title="MCP Server" icon="plug" href="/ai/mcp-server">
**Live blockchain access.** Gives your AI assistant tools to read and write on-chain: query balances, send transactions, interact with contracts, and monitor network state in real time.

Check warning on line 19 in ai/index.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/index.mdx#L19

Did you really mean 'blockchain'?
</Card>
</CardGroup>

Use them together: sei-skill makes your assistant think in Sei, the MCP Server lets it act on Sei.

Check warning on line 23 in ai/index.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/index.mdx#L23

Did you really mean 'Sei'?

## Build AI agents on Sei

Check warning on line 25 in ai/index.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/index.mdx#L25

Did you really mean 'Sei'?

<CardGroup cols={2}>
<Card title="Cambrian Agent Kit" icon="robot" href="/ai/cambrian-agent-kit">
SDK for building autonomous AI agents with DeFi integrations — staking, lending, swaps, liquidity — powered by LangChain.
</Card>
<Card title="Agentic Wallets" icon="wallet" href="/ai/agentic-wallets">
Wallet infrastructure designed for AI agents: programmable signing, session keys, and policy controls.
</Card>
</CardGroup>
364 changes: 364 additions & 0 deletions ai/mcp-server.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,364 @@
---
title: 'MCP Server'
description: 'Enable AI assistants to interact with Sei networks through natural language using the Model Context Protocol'

Check warning on line 3 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L3

Did you really mean 'Sei'?
keywords: ['mcp', 'ai', 'model context protocol', 'claude', 'cursor', 'windsurf', 'blockchain ai']
---
The Sei Model Context Protocol (MCP) Server enables AI assistants to interact with Sei networks through natural language. Built on the [Model Context Protocol](https://modelcontextprotocol.io/) standard, it provides seamless blockchain integration for AI coding assistants.

Check warning on line 6 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L6

Did you really mean 'Sei'?

Check warning on line 6 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L6

Did you really mean 'Sei'?

Check warning on line 6 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L6

Did you really mean 'blockchain'?

<Info>The Sei MCP Server is open source. Contribute at [github.com/sei-protocol/sei-js](https://github.com/sei-protocol/sei-js/tree/main/packages/mcp-server)</Info>

## What is MCP?

The Model Context Protocol is an open standard that connects AI systems with external tools and data sources. It enables:

- Real-time data access from external services
- Function execution and operations
- Context preservation across interactions
- Specialized capabilities beyond base training

The Sei MCP Server leverages this protocol to bring blockchain functionality directly to your AI assistant.

Check warning on line 19 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L19

Did you really mean 'Sei'?

Check warning on line 19 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L19

Did you really mean 'blockchain'?

## Capabilities

| Category | Features |
| --- | --- |
| Account Management | Wallet addresses • Balance queries • Contract verification |
| Token Operations | SEI transfers • ERC20/721/1155 support • Token approvals |
| Blockchain Data | Block information • Transaction details • Network status |

Check warning on line 27 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L27

Did you really mean 'Blockchain'?
| Smart Contracts | State queries • Function execution • Event logs |
| Networks | Mainnet • Testnet |

Check warning on line 29 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L29

Did you really mean 'Mainnet'?

Check warning on line 29 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L29

Did you really mean 'Testnet'?


## Setup Guide

<Tabs>
<Tab title="Cursor">

### Cursor Setup

<Steps>

<Step title="Open Settings">
Navigate to `Cursor → Settings → Cursor Settings → MCP`
</Step>

<Step title="Configure Server">
Click **"Add new Global MCP server"** and add this configuration to `mcp.json`:

```json
{
"mcpServers": {
"sei-mcp-server": {
"command": "npx",

Check warning on line 52 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L52

Did you really mean 'npx'?
"args": ["-y", "@sei-js/mcp-server"],

Check warning on line 53 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L53

Did you really mean 'mcp'?
"env": {
"PRIVATE_KEY": "your_private_key_here"
}
}
}
}
```
</Step>

<Step title="Restart">
Restart Cursor to activate the MCP server. You'll see a notification when it's ready.
</Step>

</Steps>

</Tab>
<Tab title="Windsurf">

### Windsurf Setup

<Steps>

<Step title="Open Settings">
Navigate to `Windsurf → Settings → Windsurf Settings → Cascade`
</Step>

<Step title="Add Configuration">
Add the Sei MCP Server to your configuration:

```json
{
"mcpServers": {
"sei": {
"command": "npx",
"args": ["-y", "@sei-js/mcp-server"],
"env": {
"PRIVATE_KEY": "your_private_key_here"
}
}
}
}
```
</Step>

<Step title="Activate">
Save and restart Windsurf. The server loads automatically.
</Step>

</Steps>

</Tab>
<Tab title="Claude Desktop">

### Claude Desktop Setup

<Steps>

<Step title="Install Claude">
Download [Claude Desktop](https://claude.ai/download) from Anthropic.
</Step>

<Step title="Edit Configuration">
Open **Settings** → **Developer** → **Edit Config** and add:

```json
{
"mcpServers": {
"sei": {
"command": "npx",
"args": ["-y", "@sei-js/mcp-server"],
"env": {
"PRIVATE_KEY": "your_private_key_here"
}
}
}
}
```
</Step>

<Step title="Restart">
Save and restart Claude Desktop to enable Sei tools.
</Step>

</Steps>

</Tab>
<Tab title="Claude CLI">

### Claude CLI Setup

<Steps>

<Step title="Install CLI">
```bash
npm install -g @anthropic-ai/claude-code
```
</Step>

<Step title="Add Server">
```bash
claude mcp add sei-mcp-server npx @sei-js/mcp-server

Check warning on line 154 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L154

Did you really mean 'claude'?
```
</Step>

<Step title="Start Session">
```bash
claude

Check warning on line 160 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L160

Did you really mean 'claude'?
```

The Sei MCP Server activates automatically in your session.

Check warning on line 163 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L163

Did you really mean 'Sei'?
</Step>

</Steps>

</Tab>
</Tabs>

## Private Key Setup

<Warning>**Security Notice**: Generate a dedicated wallet for MCP operations. Never use your main wallet's private key.</Warning>

Export your private key from your wallet:

- Look for "Export Private Key" or "Show Private Key" in wallet settings
- Ensure the key starts with `0x`
- Fund the wallet with small amounts for testing

## Features

The Sei MCP Server enables your AI assistant to:

Check warning on line 183 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L183

Did you really mean 'Sei'?

### Blockchain Operations

Check warning on line 185 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L185

Did you really mean 'Blockchain'?

- Query account balances and transaction history
- Execute token transfers
- Interact with smart contracts
- Monitor network status

### Coming Soon

- Documentation search and explanation
- @sei-js library integration
- Boilerplate generation
- DeFi protocol interactions

## Available Tools

### Core Operations

| Tool | Purpose | Example |
| --- | --- | --- |
| `get_address_from_private_key` | Retrieve wallet address | "What's my wallet address?" |
| `get_balance` | Check SEI balance | "Check balance of 0x123..." |
| `transfer_sei` | Send SEI tokens | "Send 1 SEI to 0x456..." |
| `is_contract` | Verify contract address | "Is 0x789... a contract?" |


### Token Management

| Tool | Purpose | Example |
| --- | --- | --- |
| `get_token_info` | Token metadata | "Get USDC token info" |
| `get_token_balance` | Token balance | "Check my USDC balance" |
| `transfer_token` | Token transfer | "Send 100 USDC to 0x123..." |
| `approve_token_spending` | Token approval | "Approve DEX for USDC" |


### NFT Operations

| Tool | Purpose | Example |
| --- | --- | --- |
| `get_nft_info` | NFT metadata | "Show NFT #123 details" |
| `check_nft_ownership` | Ownership verification | "Who owns NFT #456?" |
| `transfer_nft` | NFT transfer | "Send NFT #789 to 0xABC..." |
| `get_nft_balance` | Collection balance | "How many NFTs do I own?" |

Check warning on line 228 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L228

Did you really mean 'NFTs'?


### Blockchain Data

Check warning on line 231 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L231

Did you really mean 'Blockchain'?

| Tool | Purpose | Example |
| --- | --- | --- |
| `get_chain_info` | Network information | "Show Sei mainnet info" |

Check warning on line 235 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L235

Did you really mean 'Sei'?

Check warning on line 235 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L235

Did you really mean 'mainnet'?
| `get_block_by_number` | Block details by number | "Get block 12345" |
| `get_latest_block` | Latest block details | "Get latest block" |
| `get_transaction` | Transaction data | "Show tx 0xTXID..." |

Check warning on line 238 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L238

Did you really mean 'tx'?
| `read_contract` | Contract state | "Read DEX reserves" |


## AI Prompts

Pre-configured prompts for common tasks:

<div className="grid grid-cols-1 md:grid-cols-2 gap-4 my-6">
<div className="bg-white dark:bg-neutral-800/50 p-4 border border-neutral-200 dark:border-neutral-700">
<h4 className="font-medium text-purple-600 dark:text-purple-400 mb-1">my_wallet_address</h4>

Check warning on line 248 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L248

Did you really mean 'my_wallet_address'?
<p className="text-sm text-neutral-600 dark:text-neutral-400">Get your wallet address</p>
</div>
<div className="bg-white dark:bg-neutral-800/50 p-4 border border-neutral-200 dark:border-neutral-700">
<h4 className="font-medium text-purple-600 dark:text-purple-400 mb-1">explore_block</h4>

Check warning on line 252 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L252

Did you really mean 'explore_block'?
<p className="text-sm text-neutral-600 dark:text-neutral-400">Analyze block data</p>
</div>
<div className="bg-white dark:bg-neutral-800/50 p-4 border border-neutral-200 dark:border-neutral-700">
<h4 className="font-medium text-purple-600 dark:text-purple-400 mb-1">analyze_transaction</h4>

Check warning on line 256 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L256

Did you really mean 'analyze_transaction'?
<p className="text-sm text-neutral-600 dark:text-neutral-400">Transaction details</p>
</div>
<div className="bg-white dark:bg-neutral-800/50 p-4 border border-neutral-200 dark:border-neutral-700">
<h4 className="font-medium text-purple-600 dark:text-purple-400 mb-1">analyze_address</h4>

Check warning on line 260 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L260

Did you really mean 'analyze_address'?
<p className="text-sm text-neutral-600 dark:text-neutral-400">Address analysis</p>
</div>
</div>

## Usage Examples

<div className="space-y-4 my-6">
<div className="bg-white dark:bg-neutral-800/50 p-4 border-l-4 border-purple-500">
<p className="text-sm font-medium text-purple-600 dark:text-purple-400 mb-1">Query Balance</p>
<p className="text-neutral-700 dark:text-neutral-300">"What's my SEI balance?"</p>
<p className="text-sm text-neutral-600 dark:text-neutral-400 mt-2">→ Returns wallet balance and address</p>
</div>

<div className="bg-white dark:bg-neutral-800/50 p-4 border-l-4 border-purple-500">
<p className="text-sm font-medium text-purple-600 dark:text-purple-400 mb-1">Send Transaction</p>
<p className="text-neutral-700 dark:text-neutral-300">"Send 1 SEI to 0x742d35Cc6634C0532925a3b8D4C1C4e3153DC"</p>
<p className="text-sm text-neutral-600 dark:text-neutral-400 mt-2">→ Executes transfer and returns transaction hash</p>
</div>

<div className="bg-white dark:bg-neutral-800/50 p-4 border-l-4 border-purple-500">
<p className="text-sm font-medium text-purple-600 dark:text-purple-400 mb-1">Contract Analysis</p>
<p className="text-neutral-700 dark:text-neutral-300">"Is 0x3894085ef7ff0f0aedf52e2a2704928d1ec074f1 a contract?"</p>
<p className="text-sm text-neutral-600 dark:text-neutral-400 mt-2">→ Identifies contract type and metadata</p>
</div>
</div>

## Resource URIs

Check warning on line 287 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L287

Did you really mean 'URIs'?

Access blockchain data through standardized URIs:

Check warning on line 289 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L289

Did you really mean 'blockchain'?

Check warning on line 289 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L289

Did you really mean 'URIs'?

```bash
# Network data
evm://sei/chain
evm://sei-testnet/chain

# Block information
evm://sei/block/latest
evm://sei/block/12345

# Transactions
evm://sei/tx/0xabc123...
evm://sei/tx/0xabc123.../receipt

# Token data
evm://sei/token/0x3894085ef7ff0f0aedf52e2a2704928d1ec074f1
evm://sei/token/0x389.../balanceOf/0x742d...

# NFT data
evm://sei/nft/0xNFT_ADDRESS/123
evm://sei/nft/0xNFT_ADDRESS/123/isOwnedBy/0x742d...
```

## Configuration

### Environment Setup

```bash
# .env file
PRIVATE_KEY=0x_your_private_key_here

# Optional (coming soon)
CUSTOM_RPC_URL=https://your-rpc.com
CUSTOM_CHAIN_ID=1329
```

### HTTP Server Mode

For web applications:

```bash
# Start HTTP server
npx @sei-js/mcp-server --http

# Connect from web app
const eventSource = new EventSource('http://localhost:3001/sse');
```

## Security Guidelines

<Warning>
**Security Guidelines:**

1. **Use a dedicated wallet** - Create a new wallet specifically for MCP
2. **Minimal funding** - Only add funds needed for testing
3. **Environment variables** - Never hardcode private keys

Check warning on line 345 in ai/mcp-server.mdx

View check run for this annotation

Mintlify / Mintlify Validation (seilabs) - vale-spellcheck

ai/mcp-server.mdx#L345

Did you really mean 'hardcode'?
4. **Monitor activity** - Regularly check transaction history

**For production:**

- Implement transaction limits
- Use multi-signature wallets
- Add contract whitelisting
- Enable rate limiting

</Warning>

## Troubleshooting

**Connection issues**: Verify Node.js 18+ is installed and restart your AI assistant.

**Private key errors**: Ensure key format starts with `0x` and wallet has sufficient funds.

**Cursor: The model returned an error. Try disabling the MCP servers, or switch models**: Disable "Auto" in the model
menu and select a specific model e.g. `claude-4-sonnet`
Loading
Loading