request_airdrop
Initiate lamports airdrop to a specified Solana address using the Solana Client Protocol Server, enabling quick transaction of funds.
Instructions
Request an airdrop of lamports to a Pubkey.
Args: address (str): Public key of recipient lamports (int): Amount of lamports to request
Returns: str: Airdrop request result
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | ||
| lamports | Yes |
Implementation Reference
- src/server.py:622-636 (handler)The handler function for the 'request_airdrop' tool, decorated with @mcp.tool() for registration. It uses Solana's AsyncClient to request an airdrop of specified lamports to the given address.@mcp.tool() async def request_airdrop(address: str, lamports: int) -> str: """Request an airdrop of lamports to a Pubkey. Args: address (str): Public key of recipient lamports (int): Amount of lamports to request Returns: str: Airdrop request result """ async with AsyncClient(rpc_url) as client: result = await client.request_airdrop(Pubkey.from_string(address), lamports) return f"Airdrop request: {result}"
- src/server.py:622-622 (registration)The @mcp.tool() decorator registers the request_airdrop function as an MCP tool.@mcp.tool()