Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_slot

Retrieve the current slot being processed by a Solana node using the Model Context Protocol Server. Use this tool to monitor blockchain progress and synchronize data efficiently.

Instructions

Returns the current slot the node is processing.

Returns: str: Current slot in the format "Current slot: {slot}"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_slot' MCP tool. It is registered via the @mcp.tool() decorator and implements the tool logic by querying the Solana RPC client for the current slot and returning a formatted string response.
    @mcp.tool() async def get_slot() -> str: """Returns the current slot the node is processing. Returns: str: Current slot in the format "Current slot: {slot}" """ async with AsyncClient(rpc_url) as client: slot = await client.get_slot() return f"Current slot: {slot}"

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