Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_epoch_info

Retrieve detailed information about the current epoch on the Solana blockchain using this tool, enabling users to access essential data for blockchain analysis and decision-making.

Instructions

Returns information about the current epoch.

Returns: str: Epoch information in the format "Epoch info: {info}"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the 'get_epoch_info' tool logic. Decorated with @mcp.tool() which registers it in the MCP server. It queries the Solana RPC client for epoch info and formats the response.
    @mcp.tool() async def get_epoch_info() -> str: """Returns information about the current epoch. Returns: str: Epoch information in the format "Epoch info: {info}" """ async with AsyncClient(rpc_url) as client: info = await client.get_epoch_info() return f"Epoch info: {info}"
  • src/server.py:117-117 (registration)
    The @mcp.tool() decorator registers the get_epoch_info function as a tool in the FastMCP server.
    @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