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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.py:153-162 (handler)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()