Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

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
NameRequiredDescriptionDefault
addressYes
lamportsYes

Implementation Reference

  • 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()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tywenk/mcp-sol'

If you have feedback or need assistance with the MCP directory API, please join our Discord server