educhain ai agent kit
An MCP server that provides tools for interacting with EDUCHAIN, allowing Claude to query information about tokens and pools and perform swaps through SailFish DEX.
An MCP server that provides tools for interacting with EDUCHAIN, allowing Claude to query information about tokens and pools and perform swaps through SailFish DEX.
This MCP (Model Context Protocol) server provides tools and resources for interacting with EDUCHAIN. It allows Claude to query information about tokens and pools and perform swaps through SailFish DEX.
Note: SailFish DEX, like other Uniswap v3 forks, doesn't support native token swaps directly. Instead, it uses WEDU (Wrapped EDU) internally. When you use the swap functions for EDU, the system automatically handles the wrapping/unwrapping process, so you can work directly with EDU in your transactions. If you need more control, you can also use the
wrap_edu
andunwrap_wedu
functions to manually convert between EDU and WEDU.
get_token_price
: Get the current price of a token on SailFish DEXget_token_info
: Get detailed information about a token on SailFish DEXget_pool_info
: Get detailed information about a liquidity pool on SailFish DEXget_top_tokens
: Get a list of top tokens by TVL on SailFish DEXget_top_pools
: Get a list of top liquidity pools by TVL on SailFish DEXget_total_tvl
: Get the total value locked (TVL) in SailFish DEXget_24h_volume
: Get the 24-hour trading volume on SailFish DEXget_token_historical_data
: Get historical data for a token on SailFish DEXget_pool_historical_data
: Get historical data for a liquidity pool on SailFish DEXget_edu_balance
: Get the EDU balance of a wallet addressget_token_balance
: Get the token balance of a wallet address with USD valueget_multiple_token_balances
: Get multiple token balances for a wallet addressget_nft_balance
: Get the NFT balance of a wallet address for a specific NFT collectionget_wallet_overview
: Get an overview of a wallet including EDU, tokens, and NFTsget_wallet_address_from_private_key
: Get wallet address from private keysend_edu
: Send EDU native token to another wallet addresssend_erc20_token
: Send ERC20 token to another wallet addressget_swap_quote
: Get a quote for swapping tokens on SailFish DEXswap_tokens
: Swap tokens on SailFish DEX (token to token)swap_edu_for_tokens
: Swap EDU for tokens on SailFish DEXswap_tokens_for_edu
: Swap tokens for EDU on SailFish DEXwrap_edu
: Wrap EDU to WEDU (Wrapped EDU)unwrap_wedu
: Unwrap WEDU (Wrapped EDU) to EDUget_external_market_data
: Get external market data for EDU from centralized exchangescheck_arbitrage_opportunities
: Check for arbitrage opportunities between CEX and SailFish DEXupdate_external_market_config
: Update the configuration for external market data APIget_external_market_config
: Get the current configuration for external market data APIset_rpc_url
: Set the RPC URL for blockchain interactionsget_rpc_url
: Get the current RPC URL used for blockchain interactionssailfish://overview
: Overview of SailFish DEX including TVL, volume, and other metricssailfish://token/{tokenId}
: Information about a specific token on SailFish DEXsailfish://pool/{poolId}
: Information about a specific liquidity pool on SailFish DEXnpm install
npm run build
{
"mcpServers": {
"sailfish": {
"command": "node",
"args": ["/path/to/SubgraphMCP/build/index.js"],
"env": {
"RPC_URL": "https://your-edu-rpc-url.com"
}
}
}
}
use_mcp_tool("sailfish", "get_token_price", {
"tokenId": "0x836d275563bAb5E93Fd6Ca62a95dB7065Da94342"
});
use_mcp_tool("sailfish", "get_swap_quote", {
"tokenIn": "0xd02E8c38a8E3db71f8b2ae30B8186d7874934e12",
"tokenOut": "0x836d275563bAb5E93Fd6Ca62a95dB7065Da94342",
"amountIn": "10"
});
use_mcp_tool("sailfish", "swap_tokens", {
"privateKey": "YOUR_PRIVATE_KEY",
"tokenIn": "0xd02E8c38a8E3db71f8b2ae30B8186d7874934e12",
"tokenOut": "0x836d275563bAb5E93Fd6Ca62a95dB7065Da94342",
"amountIn": "10",
"slippagePercentage": 0.5
});
use_mcp_tool("sailfish", "check_arbitrage_opportunities", {
"threshold": 1.5
});
use_mcp_tool("sailfish", "update_external_market_config", {
"apiUrl": "https://api.example.com/crypto/prices",
"apiKey": "YOUR_API_KEY",
"symbols": {
"EDU": "EDU",
"USD": "USDT"
}
});
use_mcp_tool("sailfish", "wrap_edu", {
"privateKey": "YOUR_PRIVATE_KEY",
"amount": "10"
});
use_mcp_tool("sailfish", "unwrap_wedu", {
"privateKey": "YOUR_PRIVATE_KEY",
"amount": "10"
});
You can run the test script to verify the functionality:
node build/test.js
This will test the routing and swap quote functionality without executing actual swaps.
This project is licensed under the MIT License - see the LICENSE file for details.
[
{
"description": "Get the current price of a token on SailFish DEX",
"inputSchema": {
"properties": {
"tokenId": {
"description": "Token address",
"type": "string"
}
},
"required": [
"tokenId"
],
"type": "object"
},
"name": "get_token_price"
},
{
"description": "Get detailed information about a token on SailFish DEX",
"inputSchema": {
"properties": {
"tokenId": {
"description": "Token address",
"type": "string"
}
},
"required": [
"tokenId"
],
"type": "object"
},
"name": "get_token_info"
},
{
"description": "Get detailed information about a liquidity pool on SailFish DEX",
"inputSchema": {
"properties": {
"poolId": {
"description": "Pool address",
"type": "string"
}
},
"required": [
"poolId"
],
"type": "object"
},
"name": "get_pool_info"
},
{
"description": "Get a list of top tokens by TVL on SailFish DEX",
"inputSchema": {
"properties": {
"count": {
"description": "Number of tokens to return (default: 10)",
"type": "number"
}
},
"required": [],
"type": "object"
},
"name": "get_top_tokens"
},
{
"description": "Get a list of top liquidity pools by TVL on SailFish DEX",
"inputSchema": {
"properties": {
"count": {
"description": "Number of pools to return (default: 10)",
"type": "number"
}
},
"required": [],
"type": "object"
},
"name": "get_top_pools"
},
{
"description": "Get the total value locked (TVL) in SailFish DEX",
"inputSchema": {
"properties": {},
"required": [],
"type": "object"
},
"name": "get_total_tvl"
},
{
"description": "Get the 24-hour trading volume on SailFish DEX",
"inputSchema": {
"properties": {},
"required": [],
"type": "object"
},
"name": "get_24h_volume"
},
{
"description": "Get historical data for a token on SailFish DEX",
"inputSchema": {
"properties": {
"days": {
"description": "Number of days of data to return (default: 7)",
"type": "number"
},
"tokenId": {
"description": "Token address",
"type": "string"
}
},
"required": [
"tokenId"
],
"type": "object"
},
"name": "get_token_historical_data"
},
{
"description": "Get historical data for a liquidity pool on SailFish DEX",
"inputSchema": {
"properties": {
"days": {
"description": "Number of days of data to return (default: 7)",
"type": "number"
},
"poolId": {
"description": "Pool address",
"type": "string"
}
},
"required": [
"poolId"
],
"type": "object"
},
"name": "get_pool_historical_data"
},
{
"description": "Get the EDU balance of a wallet address",
"inputSchema": {
"properties": {
"walletAddress": {
"description": "Wallet address to check",
"type": "string"
}
},
"required": [
"walletAddress"
],
"type": "object"
},
"name": "get_edu_balance"
},
{
"description": "Get the token balance of a wallet address with USD value using SailFish as price oracle",
"inputSchema": {
"properties": {
"tokenAddress": {
"description": "Token contract address",
"type": "string"
},
"walletAddress": {
"description": "Wallet address to check",
"type": "string"
}
},
"required": [
"tokenAddress",
"walletAddress"
],
"type": "object"
},
"name": "get_token_balance"
},
{
"description": "Get multiple token balances for a wallet address with USD values using SailFish as price oracle",
"inputSchema": {
"properties": {
"tokenAddresses": {
"description": "List of token contract addresses",
"items": {
"type": "string"
},
"type": "array"
},
"walletAddress": {
"description": "Wallet address to check",
"type": "string"
}
},
"required": [
"tokenAddresses",
"walletAddress"
],
"type": "object"
},
"name": "get_multiple_token_balances"
},
{
"description": "Get the NFT balance of a wallet address for a specific NFT collection",
"inputSchema": {
"properties": {
"fetchTokenIds": {
"description": "Whether to fetch token IDs (default: true)",
"type": "boolean"
},
"nftAddress": {
"description": "NFT contract address",
"type": "string"
},
"walletAddress": {
"description": "Wallet address to check",
"type": "string"
}
},
"required": [
"nftAddress",
"walletAddress"
],
"type": "object"
},
"name": "get_nft_balance"
},
{
"description": "Get an overview of a wallet including EDU, tokens, and NFTs",
"inputSchema": {
"properties": {
"nftAddresses": {
"description": "List of NFT contract addresses to check",
"items": {
"type": "string"
},
"type": "array"
},
"tokenAddresses": {
"description": "List of token contract addresses to check",
"items": {
"type": "string"
},
"type": "array"
},
"walletAddress": {
"description": "Wallet address to check",
"type": "string"
}
},
"required": [
"walletAddress"
],
"type": "object"
},
"name": "get_wallet_overview"
},
{
"description": "Set the RPC URL for blockchain interactions",
"inputSchema": {
"properties": {
"url": {
"description": "RPC URL to use for blockchain interactions",
"type": "string"
}
},
"required": [
"url"
],
"type": "object"
},
"name": "set_rpc_url"
},
{
"description": "Get the current RPC URL used for blockchain interactions",
"inputSchema": {
"properties": {},
"required": [],
"type": "object"
},
"name": "get_rpc_url"
},
{
"description": "Send EDU native token to another wallet address",
"inputSchema": {
"properties": {
"amount": {
"description": "Amount of EDU to send",
"type": "string"
},
"privateKey": {
"description": "Private key of the sender wallet",
"type": "string"
},
"toAddress": {
"description": "Recipient wallet address",
"type": "string"
}
},
"required": [
"privateKey",
"toAddress",
"amount"
],
"type": "object"
},
"name": "send_edu"
},
{
"description": "Get wallet address from private key with proper checksum formatting",
"inputSchema": {
"properties": {
"privateKey": {
"description": "Private key of the wallet",
"type": "string"
}
},
"required": [
"privateKey"
],
"type": "object"
},
"name": "get_wallet_address_from_private_key"
},
{
"description": "Send ERC20 token to another wallet address",
"inputSchema": {
"properties": {
"amount": {
"description": "Amount of tokens to send",
"type": "string"
},
"confirm": {
"description": "Confirm the transaction after verifying wallet address (default: true)",
"type": "boolean"
},
"privateKey": {
"description": "Private key of the sender wallet",
"type": "string"
},
"toAddress": {
"description": "Recipient wallet address",
"type": "string"
},
"tokenAddress": {
"description": "Token contract address",
"type": "string"
}
},
"required": [
"privateKey",
"tokenAddress",
"toAddress",
"amount"
],
"type": "object"
},
"name": "send_erc20_token"
},
{
"description": "Get a quote for swapping tokens on SailFish DEX",
"inputSchema": {
"properties": {
"amountIn": {
"description": "Amount of input token to swap",
"type": "string"
},
"fee": {
"description": "Fee tier (100=0.01%, 500=0.05%, 3000=0.3%, 10000=1%)",
"type": "number"
},
"tokenIn": {
"description": "Address of the input token",
"type": "string"
},
"tokenOut": {
"description": "Address of the output token",
"type": "string"
}
},
"required": [
"tokenIn",
"tokenOut",
"amountIn"
],
"type": "object"
},
"name": "get_swap_quote"
},
{
"description": "Swap tokens on SailFish DEX (token to token)",
"inputSchema": {
"properties": {
"amountIn": {
"description": "Amount of input token to swap",
"type": "string"
},
"fee": {
"description": "Fee tier (100=0.01%, 500=0.05%, 3000=0.3%, 10000=1%)",
"type": "number"
},
"privateKey": {
"description": "Private key of the sender wallet",
"type": "string"
},
"slippagePercentage": {
"description": "Slippage tolerance percentage (default: 0.5)",
"type": "number"
},
"tokenIn": {
"description": "Address of the input token",
"type": "string"
},
"tokenOut": {
"description": "Address of the output token",
"type": "string"
}
},
"required": [
"privateKey",
"tokenIn",
"tokenOut",
"amountIn"
],
"type": "object"
},
"name": "swap_tokens"
},
{
"description": "Swap EDU for tokens on SailFish DEX",
"inputSchema": {
"properties": {
"amountIn": {
"description": "Amount of EDU to swap",
"type": "string"
},
"fee": {
"description": "Fee tier (100=0.01%, 500=0.05%, 3000=0.3%, 10000=1%)",
"type": "number"
},
"privateKey": {
"description": "Private key of the sender wallet",
"type": "string"
},
"slippagePercentage": {
"description": "Slippage tolerance percentage (default: 0.5)",
"type": "number"
},
"tokenOut": {
"description": "Address of the output token",
"type": "string"
}
},
"required": [
"privateKey",
"tokenOut",
"amountIn"
],
"type": "object"
},
"name": "swap_edu_for_tokens"
},
{
"description": "Swap tokens for EDU on SailFish DEX",
"inputSchema": {
"properties": {
"amountIn": {
"description": "Amount of tokens to swap",
"type": "string"
},
"fee": {
"description": "Fee tier (100=0.01%, 500=0.05%, 3000=0.3%, 10000=1%)",
"type": "number"
},
"privateKey": {
"description": "Private key of the sender wallet",
"type": "string"
},
"slippagePercentage": {
"description": "Slippage tolerance percentage (default: 0.5)",
"type": "number"
},
"tokenIn": {
"description": "Address of the input token",
"type": "string"
}
},
"required": [
"privateKey",
"tokenIn",
"amountIn"
],
"type": "object"
},
"name": "swap_tokens_for_edu"
},
{
"description": "Get external market data for EDU from centralized exchanges",
"inputSchema": {
"properties": {},
"required": [],
"type": "object"
},
"name": "get_external_market_data"
},
{
"description": "Check for arbitrage opportunities between centralized exchanges and SailFish DEX",
"inputSchema": {
"properties": {
"threshold": {
"description": "Minimum price difference percentage to consider as an arbitrage opportunity (default: 1.0)",
"type": "number"
}
},
"required": [],
"type": "object"
},
"name": "check_arbitrage_opportunities"
},
{
"description": "Update the configuration for external market data API",
"inputSchema": {
"properties": {
"apiKey": {
"description": "API key for external market data (if required)",
"type": "string"
},
"apiUrl": {
"description": "API URL for external market data",
"type": "string"
},
"symbols": {
"description": "Symbol mappings for the external API",
"properties": {
"EDU": {
"description": "Symbol for EDU token on the external API",
"type": "string"
},
"USD": {
"description": "Symbol for USD on the external API",
"type": "string"
}
},
"type": "object"
}
},
"required": [],
"type": "object"
},
"name": "update_external_market_config"
},
{
"description": "Get the current configuration for external market data API",
"inputSchema": {
"properties": {},
"required": [],
"type": "object"
},
"name": "get_external_market_config"
},
{
"description": "Wrap EDU to WEDU (Wrapped EDU)",
"inputSchema": {
"properties": {
"amount": {
"description": "Amount of EDU to wrap",
"type": "string"
},
"privateKey": {
"description": "Private key of the wallet",
"type": "string"
}
},
"required": [
"privateKey",
"amount"
],
"type": "object"
},
"name": "wrap_edu"
},
{
"description": "Unwrap WEDU (Wrapped EDU) to EDU",
"inputSchema": {
"properties": {
"amount": {
"description": "Amount of WEDU to unwrap",
"type": "string"
},
"privateKey": {
"description": "Private key of the wallet",
"type": "string"
}
},
"required": [
"privateKey",
"amount"
],
"type": "object"
},
"name": "unwrap_wedu"
}
]