Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_token_largest_accounts

Retrieve the 20 largest accounts for a specified SPL Token on Solana. Input the token mint address to analyze token distribution and identify top holders.

Instructions

Returns the 20 largest accounts of a particular SPL Token type.

Args: mint (str): Pubkey of token mint to query

Returns: str: Largest token accounts in the format "Largest token accounts: {accounts}"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mintYes

Implementation Reference

  • src/server.py:327-327 (registration)
    Registration of the tool using @mcp.tool() decorator.
    @mcp.tool()
  • The main handler function that implements the logic for the get_token_largest_accounts tool. It takes a mint pubkey as string input, uses AsyncClient to call get_token_largest_accounts on the Solana RPC, and returns a formatted string with the results.
    async def get_token_largest_accounts(mint: str) -> str: """Returns the 20 largest accounts of a particular SPL Token type. Args: mint (str): Pubkey of token mint to query Returns: str: Largest token accounts in the format "Largest token accounts: {accounts}" """ async with AsyncClient(rpc_url) as client: accounts = await client.get_token_largest_accounts(Pubkey.from_string(mint)) return f"Largest token accounts: {accounts}"
  • Input schema: mint (str). Output: str (formatted largest accounts info). Defined via type hints and docstring.
    async def get_token_largest_accounts(mint: str) -> str: """Returns the 20 largest accounts of a particular SPL Token type. Args: mint (str): Pubkey of token mint to query Returns: str: Largest token accounts in the format "Largest token accounts: {accounts}" """ async with AsyncClient(rpc_url) as client: accounts = await client.get_token_largest_accounts(Pubkey.from_string(mint)) return f"Largest token accounts: {accounts}"

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