Skip to main content
Glama
tywenk

Model Context Protocol Server for Solana Client

by tywenk

get_identity

Retrieve the identity public key of the current node interacting with the Solana blockchain using the MCP server. Simplifies node identification for users managing blockchain operations.

Instructions

Returns the identity pubkey for the current node.

Returns: str: Node identity in the format "Node identity: {identity}"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_identity' MCP tool. It uses the Solana AsyncClient to fetch the current node's identity pubkey and formats it as a string response.
    @mcp.tool() async def get_identity() -> str: """Returns the identity pubkey for the current node. Returns: str: Node identity in the format "Node identity: {identity}" """ async with AsyncClient(rpc_url) as client: identity = await client.get_identity() return f"Node identity: {identity}"
  • src/server.py:153-153 (registration)
    The @mcp.tool() decorator registers the get_identity 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