Meson Cross-Chain Transaction
STDIOA Deno-based MCP server helping users transfer assets between different blockchains.
A Deno-based MCP server helping users transfer assets between different blockchains.
A Meson cross-chain transaction MCP (Model Context Protocol) server implemented with Deno and TypeScript, helping users transfer assets conveniently between different blockchains.
git clone <repository-url> cd meson-mcp
# Linux/MacOS export MESON_PRIVATE_KEY=your_private_key # Windows set MESON_PRIVATE_KEY=your_private_key
deno run --allow-net --allow-env main.ts
You can use the Meson cross-chain transaction MCP service by adding the following configuration to your MCP configuration file:
"meson_mcp": { "command": "npx", "args": [ "deno", "run", "--allow-env", "--allow-net", "--allow-read", "jsr:@demcp/meson-mcp" ], "env": { "MESON_PRIVATE_KEY": "0x1234567890abcdef", "MESON_USE_MAINNET": "true" } }
command: Execution command, here using npx
to run Deno
args: Command argument list
deno
: Specifies using the Deno runtimerun
: Deno's run command--allow-env
: Permission to access environment variables--allow-net
: Permission for network access--allow-read
: Permission for file readingjsr:@demcp/meson-mcp
: Package name loaded from JSR (JavaScript Registry)env: Environment variable configuration
MESON_PRIVATE_KEY
: Your Ethereum-compatible private key for transaction signing (replace the example value with your own key)MESON_USE_MAINNET
: Set to "true" to use the mainnet, set to "false" or omit to use the testnetNote: For security reasons, ensure your private key is not leaked or made public. In production environments, it's recommended to use secure methods to manage and store private keys.
The MCP server provides three core tools:
Prepares a cross-chain transaction and generates data for signing.
Parameters:
fromChain
: Source chain IDtoChain
: Destination chain IDfromToken
: Source token symboltoToken
: Destination token symbolamount
: Swap amountfromAddress
: Sender addressrecipient
: Recipient address (optional, defaults to sender)Returns:
Signs the transaction data and submits it to the Meson network.
Parameters:
encoded
: Encoded transaction datasigningRequest
: Data to be signed (containing message and hash)fromAddress
: Sender addressrecipient
: Recipient addressReturns:
Checks the status of a submitted transaction.
Parameters:
swapId
: Transaction IDReturns:
Here's a complete cross-chain transaction flow example:
I want to perform a cross-chain transaction on testnet
Please prepare a transaction from Ethereum Sepolia testnet to transfer 10 USDC to Arbitrum Sepolia,
my address is 0x1234...abcd
Please sign and submit the transaction prepared above
Please check the status of the transaction I just submitted
This MCP server supports all blockchains and tokens supported by the Meson protocol, including but not limited to:
For specific supported chains and tokens, please refer to the Meson official documentation.
MIT