A Model Context Protocol (MCP) Server that integrates the Fystack Platform SDK, enabling AI agents to securely create wallets, manage assets, sign transactions, and execute blockchain operations.
- Create MPC Wallets: Generate secure wallets with key shares distributed across MPC nodes
- Create Standard Wallets: Generate standard (non-MPC) wallets for various purposes
- Get Wallet Assets: Retrieve all assets and balances for any wallet
- Deposit Addresses: Get deposit addresses for EVM, Solana, and Tron networks
- Multi-chain Support: Works with Ethereum, Solana, Tron, and all EVM chains
- Transaction Rescan: Reprocess blockchain transactions
- Secure Operations: All operations authenticated via API credentials
- Conversational Operations: Describe what you want to do in plain English
- Smart Parsing: Automatically extracts parameters from natural language
- Flexible Commands: Supports various phrasings and formats
- Uniswap Trading: Get price quotes and execute swaps across multiple chains
- Smart Order Routing: Automatic best path selection using Uniswap's AlphaRouter
- Multi-Chain Support: Trade on Ethereum, Optimism, Polygon, Arbitrum, and Base
- Native Token Support: Seamless ETH/MATIC/etc. trading with automatic wrapping
- Advanced MPC Key Management: Rotate, recover, or update key shares securely
- Gas Optimization: Automatically optimize gas fees for transactions
- Wallet Recovery: Recover wallets using MPC key shares
- Custom Token Support: Manage custom tokens and NFTs
- Node.js v18+
- Fystack API credentials (Get them here)
# Clone and setup
cd sdk-mcp-server
npm install # or bun install
# Build the project
npm run buildThe server is configured via environment variables passed through the MCP config file. See mcp.example.json for the template.
Required environment variables:
FYSTACK_API_KEY: Your Fystack API keyFYSTACK_API_SECRET: Your Fystack API secretFYSTACK_ENVIRONMENT: Environment (local,sandbox, orproduction)
Optional environment variables:
SOLANA_RPC_URL: Custom Solana RPC endpointETHEREUM_RPC_URL: Custom Ethereum RPC endpointETHEREUM_CHAIN_ID: Ethereum chain IDLOG_LEVEL: Logging level (debug,info,warn,error)
Add this to your Claude Desktop config (or other MCP client):
{
"servers": {
"Fystack MCP Server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"~/fystack/mpcium-mcp-server/src/index.ts" // Replace with your path to index.ts
],
"env": {
"FYSTACK_API_KEY": "YOUR_API_KEY_HERE",
"FYSTACK_API_SECRET": "YOUR_API_SECRET_HERE",
"FYSTACK_WORKSPACE_ID": "YOUR_WORKSPACE_ID_HERE",
"FYSTACK_ENVIRONMENT": "sandbox",
"LOG_LEVEL": "info"
}
}
}
}See all possible MCP Client here: MCP Clients
- Locate your MCP Config file
- Add the server configuration (see MCP Configuration above)
- Restart the client
- Client can now interact with Fystack through natural language!
┌─────────────────────────────┐
│ Claude / AI Agent │
│ (MCP Client) │
└──────────────┬──────────────┘
│ MCP Protocol (stdio)
┌──────────────▼──────────────┐
│ Fystack MCP Server │
├─────────────────────────────┤
│ • Tool Definitions │
│ • Tool Executors │
│ • Request Handlers │
└──────────────┬──────────────┘
│ REST API
┌──────────────▼──────────────┐
│ Fystack Platform SDK │
└──────────────┬──────────────┘
│
┌──────────────▼──────────────┐
│ Fystack Backend Services │
│ • Wallet Management │
│ • Transaction Processing │
│ • Asset Management │
└─────────────────────────────┘
The primary tool that handles all operations through natural language.
Examples:
{
"tool": "wallet_operations",
"message": "Create an MPC wallet named 'My Secure Wallet'"
}
{
"tool": "wallet_operations",
"message": "Get assets for wallet",
"wallet_id": "550e8400-e29b-41d4-a716-446655440000"
}
{
"tool": "wallet_operations",
"message": "Get deposit address for wallet on ethereum",
"wallet_id": "550e8400-e29b-41d4-a716-446655440000"
}Creates a new MPC wallet.
{
"tool": "create_mpc_wallet",
"name": "My MPC Wallet"
}Creates a standard wallet.
{
"tool": "create_standard_wallet",
"name": "My Standard Wallet",
"wallet_purpose": "user"
}Wallet purposes: user, gastank, payment, custody
Get all assets for a wallet.
{
"tool": "get_wallet_assets",
"wallet_id": "550e8400-e29b-41d4-a716-446655440000"
}Get deposit address for a specific blockchain.
{
"tool": "get_deposit_address",
"wallet_id": "550e8400-e29b-41d4-a716-446655440000",
"address_type": "evm"
}Address types: evm, solana, tron
Rescan a blockchain transaction.
{
"tool": "rescan_transaction",
"tx_hash": "0x123...",
"network_id": "ethereum"
}Get a price quote for a Uniswap swap with smart order routing.
{
"tool": "uniswap_get_price",
"wallet_id": "550e8400-e29b-41d4-a716-446655440000",
"chain_id": 1,
"token_in": "NATIVE",
"token_out": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount_in": "1.0",
"trade_type": "exactIn"
}Supported chains: 1 (Ethereum), 10 (Optimism), 137 (Polygon), 42161 (Arbitrum), 8453 (Base)
Execute a token swap on Uniswap using MPC wallet.
{
"tool": "uniswap_execute_swap",
"wallet_id": "550e8400-e29b-41d4-a716-446655440000",
"chain_id": 1,
"token_in": "NATIVE",
"token_out": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount_in": "0.1",
"slippage_tolerance": 0.5,
"deadline_minutes": 20
}Get intelligent swap suggestions based on liquidity, fees, and route optimization.
{
"tool": "uniswap_suggest_swap",
"wallet_id": "550e8400-e29b-41d4-a716-446655440000",
"chain_id": 1,
"token_in": "NATIVE",
"amount": "1.0"
}Returns ranked suggestions with:
- Output amounts for each token
- Price impact analysis
- Gas cost estimates
- Fee comparison
- Route complexity
- AI-generated reasoning
// 1. Create MPC wallet
const wallet = await client.call('create_mpc_wallet', {
name: "Trading Wallet"
});
// Response: { wallet_id: "...", status: "success" }
// 2. Get wallet assets
const assets = await client.call('get_wallet_assets', {
wallet_id: wallet.wallet_id
});
// Response: { wallet_id: "...", assets: [...], count: 5 }// Get Ethereum deposit address
const depositInfo = await client.call('get_deposit_address', {
wallet_id: wallet.wallet_id,
address_type: "evm"
});
// Response: { address: "0x...", qr_code: "...", ... }// Natural language: Create wallet
await client.call('wallet_operations', {
message: "Create an MPC wallet named 'My Investment Wallet'"
});
// Natural language: Get assets
await client.call('wallet_operations', {
message: "Show me the assets in my wallet",
wallet_id: "550e8400-e29b-41d4-a716-446655440000"
});
// Natural language: Get deposit address
await client.call('wallet_operations', {
message: "I need the deposit address for Solana",
wallet_id: "550e8400-e29b-41d4-a716-446655440000"
});Built with ❤️ for the Fystack community

