send_transaction
Send signed and serialized transactions to the Solana blockchain using the MCP server. This tool processes pre-formatted transaction data and returns the send result.
Instructions
Send a transaction that has already been signed and serialized into the wire format.
Args: txn (bytes): Signed transaction as bytes
Returns: str: Transaction send result
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"txn": "<txn>"
},
"name": "send_transaction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| txn | Yes |
Implementation Reference
- src/server.py:638-638 (registration)Decorator that registers the send_transaction function as an MCP tool.
@mcp.tool() - src/server.py:639-650 (handler)The handler function that executes the tool logic: sends the provided signed transaction bytes to the Solana RPC endpoint using send_raw_transaction and returns the result.
async def send_transaction(txn: bytes) -> str: """Send a transaction that has already been signed and serialized into the wire format. Args: txn (bytes): Signed transaction as bytes Returns: str: Transaction send result """ async with AsyncClient(rpc_url) as client: result = await client.send_raw_transaction(txn) return f"Transaction sent: {result}"