Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_token_supply

Retrieve the total supply of an SPL Token by providing the mint public key on the Solana blockchain using the MCP server's tools.

Instructions

Returns the total supply of an SPL Token type.

Args: mint (str): Public key of token mint

Returns: str: Token supply information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mintYes

Implementation Reference

  • The handler function for the 'get_token_supply' tool. It is registered via the @mcp.tool() decorator and implements the logic to retrieve the total supply of an SPL token using the Solana RPC AsyncClient.
    @mcp.tool() async def get_token_supply(mint: str) -> str: """Returns the total supply of an SPL Token type. Args: mint (str): Public key of token mint Returns: str: Token supply information """ async with AsyncClient(rpc_url) as client: supply = await client.get_token_supply(Pubkey.from_string(mint)) return f"Token supply: {supply}"
  • src/server.py:607-607 (registration)
    The @mcp.tool() decorator registers the get_token_supply 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