logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

amoca-solana-mcp-platform

Facilitate the operation and administration of Solana-centric software by weaving in dynamic data feeds and auxiliary utilities directly into the development lifecycle. This presents a highly resilient and scalable framework optimized for building atop the Solana ledger.

Author

amoca-solana-mcp-platform logo

manolaz

MIT License

Quick Info

GitHub GitHub Stars 4
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

solanaapisworkflowsolana blockchaindeveloping solanamanage solana

AMOCA (Autonomous Merit On Chain Agent) - Solana Development Nexus

This repository houses the implementation of the Autonomous Merit On Chain Agent (AMOCA), specifically engineered for Solana development leveraging the Model Context Protocol (MCP).

smithery badge License: MIT Solana

Conceptual Outline

AMOCA (Autonomous Merit On Chain Agent)

AMOCA, or Autonomous Merit On Chain Agent, functions as an intelligent intermediary that augments Solana blockchain development workflows via a standardized interaction layer. This specific instantiation highlights:

  1. Comprehensive interface for Solana Remote Procedure Calls (RPC):
  2. Fundamental account queries (e.g., getBalance, getAccountInfo, getTransaction)
  3. Calculation of immutable storage requirements (e.g., getMinimumBalanceForRentExemption)
  4. Wallet lifecycle management (e.g., createWallet, importWallet)

  5. Decentralized Finance (DeFi) Transaction Capabilities:

  6. Verification of token balances (individual assets and aggregated portfolio view)
  7. Visualization of asset valuation distribution using USD-pegged histograms
  8. Real-time portfolio valuation tracking powered by Jupiter API price streams
  9. Direct integration with Jupiter API for token exchange execution
  10. Retrieval of price quotes and facilitation of swap transactions

  11. Supportive, autonomous orchestration routines for Solana engineering:

  12. Diagnostic assistance for failed transactions (root cause analysis, expenditure breakdown)
  13. Automated rent exemption cost determination
  14. On-demand access to documentation pertaining to Solana setup and network clusters

  15. Validation and verification mechanisms governed by on-chain merit principles.

flowchart TB
    %% Main Components
    Claude[Claude LLM]
    MCP[Model Context Protocol Server]
    User[Initiating Entity]

    %% External APIs
    SolanaRPC[Solana RPC Endpoints]
    JupiterAPI[Jupiter Exchange API]
    HeliusAPI[Helius Data Platform]

    %% API Categories
    subgraph HeliusServices[Helius Interface Modules]
        DAS[Digital Asset Standard API]
        CollectionMint[Collection & Mint API]
        Webhooks[Event Subscription Manager]
        NetworkTools[Network & Utility Functions]
    end

    subgraph SolanaServices[Core Solana Primitives]
        AccountOps[Account Information Operations]
        StorageCalc[Rent & Storage Cost Calculator]
        WalletOps[Keypair Management]
        TxAnalysis[Transaction Diagnostics]
    end

    subgraph JupiterServices[DeFi Exchange Tools]
        PriceData[Asset Price Feeds]
        TokenSwaps[Token Exchange Executor]
        QuoteRetrieval[Price Quote Fetcher]
    end

    %% Core Interactions
    User <---> Claude
    Claude <---> MCP

    %% MCP to APIs
    MCP <--> SolanaRPC
    MCP <--> JupiterAPI
    MCP <--> HeliusAPI

    %% Helius API Connections
    HeliusAPI --- HeliusServices

    %% Solana Service Connections
    SolanaRPC --- SolanaServices

    %% Jupiter Service Connections
    JupiterAPI --- JupiterServices

    %% AMOCA Features
    MCP --- TokenBalances[Token Holding Verifier]
    MCP --- PortfolioAnalysis[Portfolio Valuation Engine]
    MCP --- ValueVisualizations[Valuation Distribution Visualizer]
    MCP --- MeritValidation[Merit-based V&V System]
    MCP --- AutoWorkflows[Autonomous Workflow Orchestrator]

Core Capabilities

  • Solana RPC Toolkit: Execute queries on account state, determine balances, and dissect transaction payloads.
  • Keypair Administration: Provision new Solana wallets or integrate existing keypairs.
  • Trading Subsystem: Facilitate token exchanges, query asset valuations, and conduct portfolio reviews.
  • Helius Platform Integration: Unlock advanced Solana data retrieval via Helius's specialized APIs.

Solana Model Context Protocol (MCP) Integration

This repository showcases a foundational deployment of an MCP server tailored specifically for Solana interactions.

MCP Definition

The Model Context Protocol (MCP) establishes a standardized conduit enabling generative models to interface seamlessly with external utilities and data sources. This demonstration instance furnishes an MCP server capable of providing:

  1. Essential Solana primitive operations (e.g., getBalance, getAccountInfo, getTransaction).
  2. A selection of helpful, context-aware routines for Solana engineering tasks.

Prerequisites for Setup

  • Runtime Environment: Node.js (Version 16 or newer is advised)
  • Package Manager: pnpm (Version 9.10.0 or compatible)
  • Solana Tool Suite: Solana CLI (Optional, though highly recommended)

Deployment Instructions

Fork this repository and install required packages:

git clone https://github.com/manolaz/amoca-solana-mcp-server.git
cd solana-dev-mcp
pnpm install

To launch this server within the MCP inspector environment, execute:

npx @modelcontextprotocol/inspector ts-node index.ts

Initiating the Service

  1. Environment Setup: Construct a .env file by duplicating the .env.example template and populate it with necessary API authentication credentials.
cp .env.example .env
# Populate .env with secrets
  1. Code Review: The primary server logic resides within index.ts, which initializes the MCP server, establishing fetching mechanisms and predefined operational prompts.

  2. Server Customization: Expand the server's utility by integrating additional tools, resources, or custom prompt handlers.

  3. Verification: Run the integrated testing suite to confirm operational stability.

pnpm test

Operational Examples

This section guides users on integrating the Solana MCP platform with AI interfaces like Claude. The same methodology applies to other MCP-compatible environments such as Windsurf and Cursor.

Configuration File Generation

To enable an AI environment to connect to this Solana MCP backend, a specific configuration manifest must be generated. Execute one of the following commands based on your global ts-node availability:

  • Use pnpm generate-config if ts-node is installed globally.
  • If global ts-node is unavailable, run pnpm build && pnpm generate-config:js.

This action yields a JSON configuration payload similar to the structures below:

If ts-node is present globally:

{
  "mcpServers": {
    "solana-dev": {
      "command": "ts-node",
      "args": ["<absolute-path-to-repo>/index.ts"]
    }
  }
}

If running from compiled JavaScript:

{
  "mcpServers": {
    "solana-dev": {
      "command": "node",
      "args": ["<absolute-path-to-repo>/dist/index.js"]
    }
  }
}

Interacting with AMOCA via Claude

AMOCA with Claude

Source Code Organization

  • index.ts - Core server execution script.
  • package.json - Project manifest detailing dependencies and metadata.
  • tsconfig.json - TypeScript compilation directives.

Expanding MCP for Solana Ecosystem Tasks

This MCP deployment serves as a versatile blueprint; feel free to adapt or extend it for specialized Solana development requirements. Below are suggested avenues for advancement:

Potential Enhancements

  1. Optimized Fee Estimator: Implement a utility that predicts optimal transaction priority fees based on recent network load analysis to balance cost and confirmation latency.

  2. Solana Verification Debugger: Engineer a diagnostic tool to provide granular insights into failures encountered during solana-verify processes.

  3. Security Contact Inspector: Develop a tool to extract and present the security.txt information associated with a deployed Solana program address, streamlining security contact discovery.

  4. Squads Program Management: Create automation scripts to streamline the deployment and update cycles for Solana programs managed via the Squads framework across various environments.

  5. Anchor Error Code Translator: Build a utility that maps raw Anchor error codes to their corresponding, human-readable error descriptions using known error databases.

  6. Advanced Contextual Prompts: Enrich the server's prompt catalog to offer more relevant, context-aware suggestions for complex Solana tasks like multi-instruction transactions or advanced token interactions.

  7. Complex Transaction Assembler: Introduce tools that simplify the construction of intricate transactions involving sequences of instructions directed at diverse Solana programs.

  8. Custom RPC Endpoint Configuration: Enable dynamic configuration of RPC endpoints, supporting connections to private nodes or local development validators.

  9. Program Deployment Utilities: Develop standardized tools to simplify the continuous deployment and version upgrades of on-chain programs.

  10. State Explorer Utility: Integrate a function that accepts an account or transaction identifier and renders its contents in a readily digestible, human-friendly format, mimicking explorer functionality for quick state inspection.

  11. Integrated Documentation Access: Incorporate mechanisms to fetch and serve documentation for Solana, Anchor, and related protocols directly within the MCP interface, minimizing context switching for developers.

Contribution Guidelines

If you develop a useful extension, we encourage submitting a Pull Request. Please adhere to these standards:

  1. Ensure all new code is thoroughly documented.
  2. Accompany new functionality with appropriate unit or integration tests.
  3. Maintain consistency with the project's existing coding standards.
  4. Update the README to reflect any new features or tools added.

Helius API Tools

This framework incorporates various Helius endpoints for high-fidelity Solana data interaction:

Digital Asset Standard (DAS) Interface

Tool Name Functionality Description
getAssetsByOwner Retrieve all Non-Fungible Tokens (NFTs) held by a specified address.
getAsset Fetch comprehensive metadata for a singular NFT via its identifier.
getAssetsByGroup List assets belonging to a designated collection or grouping.
searchAssets Perform granular asset lookups using sophisticated query parameters.
getAssetProof Obtain the cryptographic Merkle proof for any compressed NFT.
getAssetsByCreator List assets associated with a particular creator address.
getAssetsByAuthority Retrieve assets based on their update authority address.
getNftEditions List all derived editions associated with a master NFT edition record.

Collection Metadata & Minting Interface

Tool Name Functionality Description
getMintlist Access the defined mint list configuration for a collection.

Event Subscription Handling

Tool Name Functionality Description
getAllWebhooks List all registered webhooks linked to the API key.
getWebhookByID Retrieve specific configuration details for a webhook via its ID.
createWebhook Establish a new webhook subscription to track address-level activity.
createCollectionWebhook Establish a new webhook focused on monitoring NFT collection events.
deleteWebhook Remove an existing webhook subscription using its unique ID.

Network Metrics & Support Functions

Tool Name Functionality Description
getCurrentTPS Determine the current Transactions Per Second (TPS) rate on Solana.
getTokenHolders Query the list of addresses holding a specific token (by mint address).
getPriorityFeeEstimate Provide an estimate for optimal transaction priority fees.
getStakeAccounts Retrieve stake accounts associated with a given owner address.
getComputeUnits Simulate a transaction payload to ascertain consumed compute units.

Advanced Prompt Library

The server features pre-configured prompts optimized for common Helius-centric workflows:

Prompt Alias Intended Task Description
collection-analysis Generate an in-depth analytical report on an specified NFT collection.
monitor-nft-collection Configure a webhook for real-time surveillance of NFT collection events.
network-status Retrieve and present the current operational status of the Solana network.

Demonstrative Operations

Querying Token Holdings by Address

const response = await server.tools.getAssetsByOwner({
  ownerAddress: "GoodboiNft5iFNhbgKkf1RX2VdMqKvt5xYxyVh3zf9okx",
});

Assessing an NFT Collection's Metrics

const response = await server.prompts["collection-analysis"]({
  collectionAddress: "J1S9H3QjnRtBbbuD4HjPV6RpRhwuk4zKbxsnCHuTgh9w",
});

Inspecting Current Network Throughput

const response = await server.prompts["network-status"]({});

Licensing Information

MIT License applies to this project.

INTERNET PROTOCOL: Uniform Resource Locator (URL) is a reference to a web resource that specifies its location on a computer network and a means of retrieving it. URLs are a subset of URIs, and are used to specify address locations in web browsers and other software that interacts with web resources.

See Also

`