Skip to main content

Documentation Index

Fetch the complete documentation index at: https://seilabs.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The Sei Model Context Protocol (MCP) Server enables AI assistants to interact with Sei networks through natural language. Built on the Model Context Protocol standard, it provides seamless blockchain integration for AI coding assistants.
The Sei MCP Server is open source. Contribute at github.com/sei-protocol/sei-js

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.

Capabilities

CategoryFeatures
Account ManagementWallet addresses • Balance queries • Contract verification
Token OperationsSEI transfers • ERC20/721/1155 support • Token approvals
Blockchain DataBlock information • Transaction details • Network status
Smart ContractsState queries • Function execution • Event logs
NetworksMainnet • Testnet

Setup Guide

Cursor Setup

1

Open Settings

Navigate to Cursor → Settings → Cursor Settings → MCP
2

Configure Server

Click “Add new Global MCP server” and add this configuration to mcp.json:
{
  "mcpServers": {
    "sei-mcp-server": {
      "command": "npx",
      "args": ["-y", "@sei-js/mcp-server"],
      "env": {
        "PRIVATE_KEY": "your_private_key_here"
      }
    }
  }
}
3

Restart

Restart Cursor to activate the MCP server. You’ll see a notification when it’s ready.

Private Key Setup

Security Notice: Generate a dedicated wallet for MCP operations. Never use your main wallet’s private key.
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:

Blockchain Operations

  • 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

ToolPurposeExample
get_address_from_private_keyRetrieve wallet address”What’s my wallet address?”
get_balanceCheck SEI balance”Check balance of 0x123…”
transfer_seiSend SEI tokens”Send 1 SEI to 0x456…”
is_contractVerify contract address”Is 0x789… a contract?”

Token Management

ToolPurposeExample
get_token_infoToken metadata”Get USDC token info”
get_token_balanceToken balance”Check my USDC balance”
transfer_tokenToken transfer”Send 100 USDC to 0x123…”
approve_token_spendingToken approval”Approve DEX for USDC”

NFT Operations

ToolPurposeExample
get_nft_infoNFT metadata”Show NFT #123 details”
check_nft_ownershipOwnership verification”Who owns NFT #456?”
transfer_nftNFT transfer”Send NFT #789 to 0xABC…”
get_nft_balanceCollection balance”How many NFTs do I own?”

Blockchain Data

ToolPurposeExample
get_chain_infoNetwork information”Show Sei mainnet info”
get_block_by_numberBlock details by number”Get block 12345”
get_latest_blockLatest block details”Get latest block”
get_transactionTransaction data”Show tx 0xTXID…”
read_contractContract state”Read DEX reserves”

AI Prompts

Pre-configured prompts for common tasks:

my_wallet_address

Get your wallet address

explore_block

Analyze block data

analyze_transaction

Transaction details

analyze_address

Address analysis

Usage Examples

Query Balance

”What’s my SEI balance?”

→ Returns wallet balance and address

Send Transaction

”Send 1 SEI to 0x742d35Cc6634C0532925a3b8D4C1C4e3153DC”

→ Executes transfer and returns transaction hash

Contract Analysis

”Is 0x3894085ef7ff0f0aedf52e2a2704928d1ec074f1 a contract?”

→ Identifies contract type and metadata

Resource URIs

Access blockchain data through standardized URIs:
# 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

# .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:
# Start HTTP server
npx @sei-js/mcp-server --http

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

Security Guidelines

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
  4. Monitor activity - Regularly check transaction history
For production:
  • Implement transaction limits
  • Use multi-signature wallets
  • Add contract whitelisting
  • Enable rate limiting

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