GitHub - GoPlausible/algorand-mcp: Algorand Model Context Protocol (Server & Client) (original) (raw)

Algorand MCP Implementation

smithery badge npm downloads npm version License: MIT

Overview

Model context protocol or MCP, is an open protocol that standardizes how applications provide context to LLMs. MCP provides specification standards to give LLMs tools, resources and instructions to be more useful and effective.

Screenshot 2025-03-15 at 17 47 54

MCP Github contains more information and different tools and specifications plus documentation of MCP.

This repository is a Model Context Protocol (MCP) implementation for Algorand blockchain interactions. The implementation consists of:

📦 Packages in this repository:

📦 NPM:

📦 Smithery:

Features

Requirements

Installation

To install or update the Algorand MCP implementation, clone the repository, install the dependencies and build the project":

First check node version to be 23.6.1 or later:

Upgrade to 23.6.1 or later if needed!

Then check the Claude or Cursor container folders to have mcp-servers folder (if not create one):

mkdir PATH_ON_YOUR_MACHINE/Claude/mcp-servers

or for Cursor

mkdir PATH_ON_YOUR_MACHINE/Cursor/mcp-servers

Then clone this repository under mcp-servers folder and install dependencies:

cd PATH_ON_YOUR_MACHINE/Claude/mcp-servers

or for Cursor

cd PATH_ON_YOUR_MACHINE/Cursor/mcp-servers

Clone the repository

git clone https://github.com/GoPlausible/algorand-mcp.git cd algorand-mcp

Install dependencies

npm install

Build the project

npm run build

Edit the .env file to set your configurations

And you are done! Now you can open you MCP config and add the server as :

{ "mcpServers": { "algorand-mcp": { "command": "node", "args": [ "PATH_ON_YOUR_MACHINE/Claude/mcp-servers/algorand-mcp/packages/server/dist/index.js" ], "env": { "ALGORAND_NETWORK": "testnet", "ALGORAND_ALGOD_API": "https://testnet-api.algonode.cloud/v2", "ALGORAND_ALGOD": "https://testnet-api.algonode.cloud", "ALGORAND_INDEXER_API": "https://testnet-idx.algonode.cloud/v2", "ALGORAND_INDEXER": "https://testnet-idx.algonode.cloud", "ALGORAND_ALGOD_PORT": "", "ALGORAND_INDEXER_PORT": "", "ALGORAND_TOKEN": "", "ALGORAND_AGENT_WALLET": "problem aim online jaguar upper oil flight stumble mystery aerobic toy avoid file tomato moment exclude witness guard lab opera crunch noodle dune abandon broccoli", "NFD_API_URL": "https://api.nf.domains", "NFD_API_KEY": "", "TINYMAN_ACTIVE": "false", "ULTRADE_ACTIVE": "false", "ULTRADE_API_URL": "https://api.ultrade.io", "VESTIGE_ACTIVE": "false", "VESTIGE_API_URL": "https://api.vestigelabs.org", "VESTIGE_API_KEY": "", "ITEMS_PER_PAGE": "10"

  }
}

} }

Make sure yopu change the paths to match your local system's paths.

For example on MACOS and Claud, the path would be something like this:

{ "mcpServers": { "algorand-mcp": { "command": "node", "args": [ " /Users/YOUR_USERNAME/Library/Application\ Support/Claude/mcp-servers/algorand-mcp/packages/server/dist/index.js" ] } } }

Project Architecture

The project follows a modular architecture with two main packages:

  1. Server Package (@algorand-mcp/server)
    • Provides MCP tools and resources
    • Manages blockchain interactions
    • Handles transaction creation and submission
    • Offers comprehensive blockchain queries
  2. Client Package (@algorand-mcp/client)
    • Handles wallet connections and transaction signing
    • Supports both local and external wallets
    • Universal compatibility (browser/Node.js)
    • Secure credential management
    • Still work in progress (Server works irrelevant to client status)

Project Structure

algorand-mcp/
├── packages/
│   ├── client/                    # Client Package
│   │   ├── src/
│   │   │   ├── index.ts          # Client entry point and wallet management
│   │   │   └── LocalWallet.ts    # Local wallet implementation
│   │   ├── package.json
│   │   └── tsconfig.json
│   └── server/                    # Server Package
│       ├── src/
│       │   ├── resources/         # MCP Resources (User-invokable endpoints)
│       │   │   ├── knowledge/     # Documentation and taxonomy
│       │   │   │   ├── taxonomy/  # Markdown documentation
│       │   │   │   └── index.ts   # Knowledge resource handler
│       │   │   ├── wallet/       # Wallet management
│       │   │   │   └── index.ts   # Wallet resource handler
│       │   │   └── index.ts       # Resource registration
│       │   ├── tools/            # MCP Tools (Agent-invokable operations)
│       │   │   ├── accountManager.ts     # Account operations
│       │   │   ├── algodManager.ts       # Node interactions
│       │   │   ├── utilityManager.ts     # Utility functions
│       │   │   ├── apiManager/       # API Tools
│       │   │   │   ├── algod/           # Algod API tools
│       │   │   │   ├── indexer/         # Indexer API tools
│       │   │   │   ├── nfd/            # NFDomains tools
│       │   │   │   ├── vestige/        # Vestige DeFi tools
│       │   │   │   ├── tinyman/        # Tinyman AMM tools
│       │   │   │   └── ultrade/        # Ultrade DEX tools
│       │   │   └── transactionManager/   # Transaction handling
│       │   ├── env.ts            # Environment configuration
│       │   └── index.ts          # Server entry point
│       ├── package.json
│       └── tsconfig.json
├── package.json                   # Root package file
└── tsconfig.json                 # Root TypeScript config

Core Functionalities

Server Features

Client Features (Work in Progress)

Response Format

All responses follow a standardized format:

{ "data": { // Response data here }, "metadata": { // Only for paginated responses "totalItems": number, "itemsPerPage": number, "currentPage": number, "totalPages": number, "hasNextPage": boolean, "pageToken": string, "arrayField": string // Name of paginated array field } }

Errors are returned in a standardized format:

{ "error": { "code": string, "message": string } }

Available Tools and Resources

The Algorand MCP implementation provides 125 tools and resources for blockchain interaction:

API Tools

Algod API Tools

Indexer API Tools

NFDomains (NFD) API Tools

Vestige API Tools

  1. View Tools:
  1. Swap Tools:
  1. Currency Tools:

Tinyman API Tools

Ultrade API Tools

  1. Wallet Tools:
  1. Market Tools:
  1. System Tools:

Account Management Tools

Application Tools

Asset Tools

Transaction Tools

Key Management Tools

Utility Tools

Dependencies

License

MIT