Algorand Remote MCP

March 13, 2026 · View on GitHub

A Model Context Protocol (MCP) server that provides tools and resources for AI agents to interact with the Algorand blockchain. Built on Cloudflare Workers with HashiCorp Vault-based wallet management and multi-provider OAuth authentication.

Overview

Algorand Remote MCP bridges AI agents and the Algorand blockchain ecosystem through a standardized MCP interface. It enables AI systems to manage wallets, create and submit transactions, swap tokens via DEX aggregators, and access blockchain data — all without requiring deep blockchain expertise.

This is a remote MCP implementation running on Cloudflare Workers with:

  • HashiCorp Vault for secure Ed25519 key storage and transaction signing
  • Multi-provider OAuth (Google, GitHub, Twitter, LinkedIn) for user authentication
  • algosdk v3.5.2 for Algorand SDK operations
  • Haystack Router for best-price DEX aggregation across Tinyman, Pact, Folks, and LST protocols
  • Tinyman SDK for direct DEX swap operations
  • Alpha Arcade SDK for prediction market trading (orderbooks, limit/market orders, positions)

Quick Start

Prerequisites: Node.js v16+, an OAuth account (Google, GitHub, Twitter, or LinkedIn)

Add to your MCP client configuration:

{
  "mcpServers": {
    "algorand-remote-mcp": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://algorandmcp.goplausible.xyz/sse"
      ]
    }
  }
}

Restart your LLM agent and prompt:

Read Algorand MCP skill.

Architecture

┌─────────────────────────────────────────────────────────────────────────────┐
│                              AI Agents / LLM Clients                       │
│                    (Claude, GPT, Cursor, Windsurf, etc.)                    │
└─────────────────────────────┬───────────────────────────────────────────────┘
                              │ MCP Protocol (SSE / Streamable HTTP)

┌─────────────────────────────────────────────────────────────────────────────┐
│                     Cloudflare Workers — Edge Runtime                       │
│  ┌───────────────────────────────────────────────────────────────────────┐  │
│  │                        OAuthProvider Layer                            │  │
│  │          Google · GitHub · Twitter · LinkedIn (Multi-provider)        │  │
│  └───────────────────────────┬───────────────────────────────────────────┘  │
│                              ▼                                              │
│  ┌───────────────────────────────────────────────────────────────────────┐  │
│  │              AlgorandRemoteMCP (McpAgent / McpServer)                 │  │
│  │                                                                       │  │
│  │  ┌─────────────── Tool Managers ───────────────────────────────────┐  │  │
│  │  │                                                                 │  │  │
│  │  │  walletManager ─── accountManager ─── utilityManager            │  │  │
│  │  │  transactionManager/                                            │  │  │
│  │  │    ├── generalTransaction   (pay, sign, submit, keyreg)         │  │  │
│  │  │    ├── assetTransactions    (ASA create, optin, transfer)       │  │  │
│  │  │    ├── appTransactions      (create, update, delete, call)      │  │  │
│  │  │    └── groupTransactions    (atomic groups)                     │  │  │
│  │  │  algodManager ─── knowledgeManager                              │  │  │
│  │  │  arc26Manager ─── receiptManager ─── ap2Manager                 │  │  │
│  │  │  tinymanManager ─── alphaArcadeManager                          │  │  │
│  │  │  apiManager/                                                    │  │  │
│  │  │    ├── algod/       (account, application, asset, txn queries)  │  │  │
│  │  │    ├── indexer/     (search & lookup across all data types)     │  │  │
│  │  │    ├── hayrouter/   (DEX aggregator — quote, swap, optin)      │  │  │
│  │  │    └── nfd/         (Algorand Name Service lookups)            │  │  │
│  │  └─────────────────────────────────────────────────────────────────┘  │  │
│  │                                                                       │  │
│  │  ┌─────────────── Resources ───────────────────────────────────────┐  │  │
│  │  │  algorand://remote-mcp-skill         (Skill definition)        │  │  │
│  │  │  algorand://knowledge/taxonomy       (Knowledge base)          │  │  │
│  │  │  algorand://knowledge/taxonomy/{cat} (Category docs)           │  │  │
│  │  └─────────────────────────────────────────────────────────────────┘  │  │
│  │                                                                       │  │
│  │  ┌─────────────── Utils ───────────────────────────────────────────┐  │  │
│  │  │  ResponseProcessor (pagination, BigInt-safe JSON)               │  │  │
│  │  │  vaultManager (Vault API client)                                │  │  │
│  │  │  Skill.js (skill content)                                       │  │  │
│  │  └─────────────────────────────────────────────────────────────────┘  │  │
│  └───────────────────────────────────────────────────────────────────────┘  │
│                                                                             │
│  ┌─────────────── Cloudflare Bindings ────────────────────────────────────┐ │
│  │  Durable Objects (session state)  ·  KV (OAuth tokens, client reg)    │ │
│  │  R2 Bucket (knowledge documents)  ·  Service Bindings (Vault worker)  │ │
│  └────────────────────────────────────────────────────────────────────────┘ │
└──────────┬──────────────────┬──────────────────┬──────────────────┬─────────┘
           │                  │                  │                  │
           ▼                  ▼                  ▼                  ▼
┌──────────────────┐ ┌────────────────┐ ┌────────────────┐ ┌───────────────┐
│  HashiCorp Vault │ │  Algorand Node │ │  DEX & Markets │ │  External APIs│
│  (CF Worker)     │ │  (Algod +      │ │                │ │               │
│                  │ │   Indexer)     │ │  Haystack      │ │  NFD API      │
│  Ed25519 keypair │ │                │ │  Router        │ │  Pera API     │
│  generation      │ │  Nodely.io /   │ │  ┌──────────┐  │ │  Alpha Arcade │
│  Transit engine  │ │  AlgoNode      │ │  │ Tinyman  │  │ │  API          │
│  signing         │ │                │ │  │ Pact     │  │ │               │
│  No private key  │ │  MainNet /     │ │  │ Folks    │  │ │               │
│  exposure        │ │  TestNet       │ │  │ LST      │  │ │               │
│                  │ │                │ │  └──────────┘  │ │               │
└──────────────────┘ └────────────────┘ │                │ └───────────────┘
                                        │  Tinyman SDK   │
                                        │  Alpha Arcade  │
                                        │  SDK           │
                                        └────────────────┘

Component Summary

  • AlgorandRemoteMCP: Main MCP agent extending McpAgent on Cloudflare Workers
  • OAuthProvider: Multi-provider authentication layer (Google, GitHub, Twitter, LinkedIn)
  • Tool Managers: 15 specialized managers covering accounts, wallets, transactions, assets, applications, APIs, DEX operations, prediction markets, ARC-26 URIs, receipts, AP2 protocol, and knowledge
  • Resource Providers: URI-based access to skill definition and knowledge base via R2
  • ResponseProcessor: Standardized response formatting with pagination and BigInt-safe serialization
  • HashiCorp Vault: Ed25519 keypair generation and secure signing via Transit engine — no private key exposure
  • Cloudflare Bindings: Durable Objects for session state, KV for OAuth, R2 for knowledge docs, Service Bindings for Vault worker

Tools

Account Management

ToolDescription
sdk_create_algorand_keypairCreate a new Algorand keypair (not wallet-linked)
sdk_mnemonic_to_address_and_secretkeyGet address and secret key from a mnemonic
sdk_address_to_public_keyGet the public key for an Algorand address
sdk_check_account_balanceCheck account balance in ALGO

Wallet Management

ToolDescription
wallet_get_infoGet account information including address, publicKey, balance, and assets (replaces wallet_get_address and wallet_get_publickey)
wallet_get_roleGet the role UUID for the configured wallet to be used to login into Hashicorp Vault with OIDC
wallet_get_assetsGet assets held by the wallet
wallet_reset_accountReset wallet and generate new keys (destructive)
wallet_logoutLogout from OAuth provider

Transaction Operations

ToolDescription
sdk_txn_payment_transactionCreate a payment transaction
wallet_sign_transactionSign a transaction using vault keys
sdk_sign_transactionSign a transaction using a mnemonic
sdk_submit_transactionSubmit a signed transaction to the network
sdk_txn_key_registration_transactionCreate a key registration transaction
sdk_assign_group_idAssign group ID for atomic execution
sdk_create_atomic_groupCreate an atomic transaction group (pay, axfer, acfg, appl, afrz, keyreg)
wallet_sign_atomic_groupSign an atomic group using vault keys
sdk_sign_atomic_groupSign an atomic group using a mnemonic
sdk_submit_atomic_groupSubmit a signed atomic group
sdk_send_raw_transactionSubmit raw signed transactions

Asset Operations

ToolDescription
sdk_txn_create_assetCreate a new Algorand Standard Asset (ASA)
sdk_txn_asset_optinOpt-in to an ASA
wallet_usdc_optinOpt-in agent wallet to USDC (vault-signed)
sdk_txn_transfer_assetTransfer an ASA

Application (Smart Contract) Operations

ToolDescription
sdk_txn_create_applicationCreate a new smart contract
sdk_txn_update_applicationUpdate an existing smart contract
sdk_txn_delete_applicationDelete a smart contract
sdk_txn_closeout_applicationClose out from an application
sdk_txn_clear_applicationClear application state
sdk_txn_call_applicationCall a smart contract (noop, optin, closeout, clear, delete)
sdk_optin_applicationOpt-in to an application

DEX — Haystack Router (DEX Aggregator)

ToolDescription
haystack_get_swap_quoteGet best-price swap quote across multiple DEXes and LST protocols
haystack_execute_swapExecute an optimized swap: quote, vault-sign, submit, confirm
haystack_needs_optinCheck if an address needs to opt-in to an asset before swapping

DEX — Tinyman

ToolDescription
tinyman_fixed_input_swapExecute a swap with a fixed input amount
tinyman_fixed_output_swapExecute a swap with a fixed output amount

Algod API

ToolDescription
algod_get_account_infoGet account balance, assets, and auth address
algod_get_account_application_infoGet account-specific application info
algod_get_account_asset_infoGet account-specific asset info
algod_get_application_infoGet application details
algod_get_application_box_valueGet application box contents
algod_get_application_boxesList application boxes
algod_get_application_stateGet application global state
algod_get_asset_infoGet asset details
algod_get_asset_holdingGet asset holding for an account
algod_get_pending_txn_infoGet pending transaction details
algod_get_pending_transactionsGet pending transactions from mempool

Pera Wallet Asset Verification

ToolDescription
pera_asset_verification_statusGet verification status of an asset
pera_verified_asset_detailsGet detailed asset information from Pera
pera_verified_asset_searchSearch verified assets by name, unit name, or creator

Indexer API

ToolDescription
indexer_lookup_account_assetsGet account assets
indexer_lookup_account_app_local_statesGet account app local states
indexer_lookup_account_created_appsGet applications created by an account
indexer_lookup_account_transactionsGet transactions for an account
indexer_search_for_accountsSearch accounts with filters
indexer_lookup_application_logsGet application log messages
indexer_search_for_applicationsSearch applications
indexer_lookup_asset_balancesGet holders of a specific asset
indexer_search_for_assetsSearch assets
indexer_lookup_transaction_by_idGet transaction details
indexer_search_for_transactionsSearch transactions

NFD (Algorand Name Service)

ToolDescription
api_nfd_get_nfdGet NFD domain information by name
api_nfd_get_nfds_for_addressGet all NFD domains owned by an address

TEAL Operations

ToolDescription
sdk_compile_tealCompile TEAL source code
sdk_disassemble_tealDisassemble TEAL bytecode

Utility Tools

ToolDescription
sdk_validate_addressCheck if an Algorand address is valid
sdk_encode_addressEncode a public key to an address
sdk_decode_addressDecode an address to a public key
sdk_app_address_by_idGet the address for an application ID
sdk_verify_bytesVerify a signature against bytes
sdk_sign_bytesSign bytes with a secret key
algorand_mcp_skillAccess comprehensive Algorand MCP skill

ARC-26 URI & Receipts

ToolDescription
generate_algorand_uriGenerate an ARC-26 compliant URI
generate_algorand_qrcodeGenerate a QR code for an Algorand URI
generate_algorand_receiptGenerate a transaction receipt

AP2 Protocol

ToolDescription
generate_ap2_mandateCreate an AP2 intent, cart, or payment mandate with verifiable credentials

Alpha Arcade (Prediction Markets)

ToolDescription
alpha_get_live_marketsFetch all live prediction markets (title, prices, volume, multi-choice options)
alpha_get_reward_marketsFetch markets with liquidity rewards
alpha_get_marketGet full details for a single market (on-chain + API)
alpha_get_orderbookUnified YES-perspective orderbook with spread calculation
alpha_get_open_ordersFetch open orders for a wallet on a specific market
alpha_get_positionsFetch all YES/NO token positions across markets
alpha_create_limit_orderPlace a limit order (price & quantity in microunits)
alpha_create_market_orderPlace a market order with auto-matching and slippage
alpha_cancel_orderCancel an open order and refund collateral
alpha_amend_orderEdit an existing unfilled order in-place
alpha_propose_matchPropose a match between a maker order and your wallet
alpha_split_sharesSplit USDC into equal YES + NO outcome tokens
alpha_merge_sharesMerge YES + NO tokens back into USDC
alpha_claimClaim USDC from a resolved market by redeeming outcome tokens

Knowledge Base

ToolDescription
get_knowledge_docGet markdown content for knowledge documents
list_knowledge_docsList available knowledge documents by category

Resources

Knowledge Resources

URIDescription
algorand://knowledge/taxonomyFull taxonomy of knowledge resources
algorand://knowledge/taxonomy/{category}Category-specific resources (arcs, sdks, algokit, puya, etc.)

Skill

URIDescription
algorand://remote-mcp-skillComprehensive Algorand MCP skill

Development

Prerequisites

  • Node.js v16+
  • Cloudflare Workers account
  • Algorand node access (e.g., Nodely.io / AlgoNode)
  • OAuth credentials (Google, GitHub, Twitter, and/or LinkedIn)
  • HashiCorp Vault worker for secure key management

Environment Variables

ALGORAND_NETWORK=mainnet
ALGORAND_ALGOD=https://your-algod-node.com
ALGORAND_INDEXER=https://your-indexer-node.com
ALGORAND_TOKEN=your-api-token
NFD_API_URL=https://api.nf.domains
HAYSTACK_API_KEY=your-haystack-api-key
ALPHA_API_KEY=your-alpha-arcade-api-key           # Optional, enables richer market data
ALPHA_API_BASE_URL=https://platform.alphaarcade.com/api  # Optional, default shown
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
HCV_WORKER_URL=https://your-hashicorp-vault-worker.workers.dev

Scripts

npm run dev          # Start local development server
npm run type-check   # Run TypeScript type checking
npm run deploy       # Deploy to Cloudflare Workers
npm run format       # Format code with Biome
npm run lint:fix     # Lint and auto-fix with Biome

Deployment

  1. Clone the repository
  2. Install dependencies: npm install
  3. Configure environment variables in wrangler.toml
  4. Deploy: npm run deploy

Usage Flows

Authentication

  1. User authenticates via OAuth (Google, GitHub, Twitter, or LinkedIn)
  2. Server creates or retrieves wallet credentials from HashiCorp Vault
  3. User accesses tools and resources through the MCP interface
  4. User can logout using wallet_logout

Individual Transactions

  1. Create transaction (e.g., sdk_txn_payment_transaction)
  2. Sign with vault (wallet_sign_transaction) or mnemonic (sdk_sign_transaction)
  3. Submit to network (sdk_submit_transaction)

Atomic Transaction Groups

  1. Create group (sdk_create_atomic_group)
  2. Sign group (wallet_sign_atomic_group or sdk_sign_atomic_group)
  3. Submit group (sdk_submit_atomic_group)

DEX Swaps via Haystack Router

  1. Get best-price quote (haystack_get_swap_quote)
  2. Execute swap — quotes, vault-signs, submits, and confirms in one call (haystack_execute_swap)

DEX Swaps via Tinyman

  1. Execute fixed-input or fixed-output swap (tinyman_fixed_input_swap / tinyman_fixed_output_swap)

Prediction Markets via Alpha Arcade

  1. Browse markets (alpha_get_live_markets)
  2. Check orderbook (alpha_get_orderbook)
  3. Place order (alpha_create_limit_order or alpha_create_market_order)
  4. Monitor positions (alpha_get_positions) and open orders (alpha_get_open_orders)
  5. Manage orders — amend (alpha_amend_order) or cancel (alpha_cancel_order)
  6. Claim winnings from resolved markets (alpha_claim)

Project Structure

src/
├── index.ts                      # Main entry point
├── types.ts                      # Type definitions
├── oauth-handler.ts              # OAuth authentication handler
├── workers-oauth-utils.ts        # OAuth utilities
├── resources/
│   ├── skill/                    # Skill resource
│   └── knowledge/                # Knowledge base resources
├── tools/
│   ├── accountManager.ts         # Account management
│   ├── algodManager.ts           # Algorand node tools
│   ├── ap2Manager.ts             # AP2 protocol tools
│   ├── arc26Manager.ts           # ARC-26 URI and QR tools
│   ├── knowledgeManager.ts       # Knowledge base tools
│   ├── receiptManager.ts         # Transaction receipt tools
│   ├── tinymanManager.ts         # Tinyman DEX tools
│   ├── alphaArcadeManager.ts     # Alpha Arcade prediction market tools
│   ├── utilityManager.ts         # Utility tools
│   ├── walletManager.ts          # Wallet management tools
│   ├── apiManager/
│   │   ├── algod/                # Algod API tools (account, application, asset, transaction)
│   │   ├── hayrouter/            # Haystack Router DEX aggregator tools
│   │   ├── indexer/              # Indexer API tools (account, application, asset, transaction)
│   │   └── nfd/                  # NFD name service tools
│   └── transactionManager/
│       ├── generalTransaction.ts # Payment, signing, submission, key registration
│       ├── appTransactions.ts    # Application (smart contract) transactions
│       ├── assetTransactions.ts  # Asset create, optin, transfer
│       └── groupTransactions.ts  # Atomic transaction groups
└── utils/
    ├── Skill.js                  # Skill content
    ├── vaultManager.ts           # HashiCorp Vault integration
    └── responseProcessor.ts      # Response formatting and pagination

Key Dependencies

PackageVersionPurpose
algosdk^3.5.2Algorand JavaScript SDK
@txnlab/haystack-router^2.0.5DEX aggregator for best-price swaps
@tinymanorg/tinyman-js-sdk^5.1.2Tinyman DEX SDK
@alpha-arcade/sdklatestPrediction market trading SDK
@modelcontextprotocol/sdk^1.12.1MCP protocol SDK
agents^0.0.95Cloudflare Agents SDK
algo-msgpack-with-bigint^2.1.1MessagePack with BigInt support

Contributing

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin feature/my-new-feature
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.