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

hive-protocol-gateway

Facilitates secure interfacing between advanced artificial intelligence agents and the Hive distributed ledger technology (DLT). It enables AI systems to query user profiles, fetch published articles and community discourse, execute content endorsements (votes), and reliably transfer digital assets.

Author

hive-protocol-gateway logo

gluneau

ISC License

Quick Info

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

Tags

hivecryptoblockchainhive blockchainhive mcpassistants hive

Hive Protocol Interconnect Service

Validated by MseeP Smithery Registry Entry Glama Service Link

This Model Context Protocol (MCP) service acts as a middleware layer connecting sophisticated AI assistants (like LLMs) directly to the operational capabilities of the Hive blockchain network.

Operational Summary

This gateway furnishes AI agents with the necessary remote procedure call (RPC) abstraction to:

  • Access and examine ledger participant metrics and historical transactions.
  • Retrieve published textual content, including long-form writings and commentary threads.
  • Filter data based on designated subject classifications (tags) or specific content creators.
  • Apply weighted endorsements (voting) to content and generate new publications (requires proper credential provisioning).
  • Facilitate the transfer of native assets (HIVE or HBD stablecoin) between ledger addresses.
  • Perform cryptographic signing and validation operations utilizing Hive key pairs.
  • Manage secure, end-to-end encrypted communication channels.

Core Capabilities

Pre-computation Prompts

  • generate-publication-schema - Formulates a structured prompt template to assist the AI in formatting a compliant Hive publication, including required metadata and categorization.
  • assess-network-identity - Creates an instructional prompt for synthesizing an analytical summary of a Hive account's operational statistics, content output, and participation patterns.

Exposed Toolset

Data Acquisition Functions

  • fetch_account_data - Retrieves comprehensive details concerning a specified Hive ledger participant.
  • resolve_content_asset - Fetches the specific payload of a Hive article given its originator and unique permalink identifier.
  • query_content_by_topic - Retrieves content aggregated under a specified taxonomy, sorted by relevance metrics (e.g., trending, popular, recent).
  • lookup_creator_stream - Retrieves content either authored by a specific user or drawn from their curated content feed.
  • retrieve_transaction_ledger - Accesses the chronological record of transactions for an account, with support for filtering by operation type.
  • obtain_network_status - Fetches real-time configuration parameters and aggregated metrics of the Hive consensus mechanism.
  • list_resource_stake_transfers - Gathers records detailing the delegated Hive Power allocations originating from a given account.

On-Chain Transaction Handling (Credentials Mandated)

  • endorse_content - Applies a vote (positive or negative) to ledger content (requires posting key security context).
  • publish_new_article - Injects a new content entry onto the Hive public ledger (requires posting key security context).
  • submit_response - Posts a direct reply or commentary thread item to existing content (requires posting key security context).
  • transfer_digital_asset - Moves HIVE or HBD currency units to another registered address (requires active key security context).

Cryptographic Primitives

  • cryptographically_sign - Generates a digital signature for an arbitrary data payload using a pre-configured Hive private key.
  • validate_digital_proof - Confirms the authenticity of a signature against a provided Hive public key.

Secure Messaging Module

  • encode_private_message - Encrypts data intended for a specific Hive participant using their public memo key.
  • decode_private_message - Decrypts data received from a known Hive participant.
  • dispatch_encrypted_payload - Transmits an encrypted message bundled within a nominal asset transfer operation.
  • fetch_secured_communications - Retrieves historical transaction data, optionally attempting immediate decryption of memoized contents.

Debugging Utility (MCP Inspector)

The integrated MCP Inspector allows for direct testing and diagnostic validation of the gateway's endpoints:

npx @modelcontextprotocol/inspector npx @gluneau/hive-mcp-server

Configuration for Authenticated Actions

Enabling write/transfer permissions necessitates setting specific environment variables:

export HIVE_USERNAME=your-hive-username
export HIVE_POSTING_KEY=your-hive-posting-private-key  # For publication/voting
export HIVE_ACTIVE_KEY=your-hive-active-private-key    # For currency movement
export HIVE_MEMO_KEY=your-hive-memo-private-key        # For message privacy

Crucial Security Advisory: Private cryptographic material must never be hardcoded or committed to source control. Utilize secured environment variable loading mechanisms.

Integration Guide for AI Clients

Use with Claude Desktop

  1. Ensure the latest Claude Desktop application is operational.
  2. Locate or establish the configuration file path:
  3. macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  4. Windows: %APPDATA%\Claude\claude_desktop_config.json
  5. Linux: ~/.config/Claude/claude_desktop_config.json

  6. Augment your configuration file by incorporating this server definition:

{
  "mcpServers": {
    "hive_ledger_access": {
      "command": "npx",
      "args": ["-y", "@gluneau/hive-mcp-server"],
      "env": {
        "HIVE_USERNAME": "your-hive-username",
        "HIVE_POSTING_KEY": "your-hive-posting-private-key",
        "HIVE_ACTIVE_KEY": "your-hive-active-private-key",
        "HIVE_MEMO_KEY": "your-hive-memo-private-key"
      }
    }
  }
}

Compatibility Note (Windsurf & Cursor)

This JSON structure is directly compatible with Windsurf's windsurf_config.json and Cursor's ~/.cursor/mcp.json (version 0.47+).

For older Cursor versions, the singular command line invocation must be used within the Settings' MCP configuration section: env HIVE_USERNAME=your-hive-username env HIVE_POSTING_KEY=your-hive-posting-private-key env HIVE_ACTIVE_KEY=your-hive-active-private-key env HIVE_MEMO_KEY=your-hive-memo-private-key npx -y @gluneau/hive-mcp-server

Illustrative Usage Scenarios

When the gateway is active within an MCP client, users can issue requests such as:

  • "Which posts are currently trending under the #photography topic on Hive?"
  • "Display the most recent publications from user 'alice'."
  • "Report on the current asset holdings and profile metadata for 'bob'."
  • "Retrieve the complete history of operations for account 'charlie'."
  • "Apply a maximum weight upvote to the content authored by 'dave' with perm: 'my-awesome-post'."
  • "Draft and publish a new article discussing advancements in artificial intelligence to Hive."
  • "Transfer 1 unit of HIVE currency to user 'frank' with the attached note: 'Gratitude for assistance!'"
  • "Generate a cryptographic signature for the phrase 'Proof of Identity' using my posting credentials."
  • "What are the currently observed network parameters for the Hive chain?"
  • "Detail the Hive Power delegations attributed to user 'grace'."
  • "Encrypt the text 'This is confidential' destined for recipient 'alice'."
  • "Decode the secret memo starting with '#4f3a5b...' reportedly sent by 'bob'."
  • "Send an untraceable message to 'charlie' stating 'Arrangements confirmed for tomorrow'."
  • "Show all received private communications and attempt decryption."
  • "List the last ten encrypted exchanges conducted with 'dave'."

Tool Specification Reference

fetch_account_data

Retrieves granular metrics for a Hive account, encompassing liquid balance, governance rights, voting influence, and associated metadata.

  • Parameters:
  • username: The required Hive ledger identifier.

resolve_content_asset

Fetches the body content of a specific piece of Hive content, identified uniquely by its author and permalink.

  • Parameters:
  • author: The identifier of the content creator.
  • permlink: The unique string identifier of the publication.

query_content_by_topic

Retrieves content filtered by a chosen subject index and ordered according to a specific sorting algorithm.

  • Parameters:
  • category: The sorting heuristic (e.g., trending, hot, freshly published).
  • tag: The thematic classification label.
  • limit: The maximum cardinality of results (range constrained: 1 to 20).

lookup_creator_stream

Retrieves content items either originated by a specified user or aggregated within their personalized content stream.

  • Parameters:
  • category: Differentiator between user's personal blog vs. their curated feed (blog or feed).
  • username: The Hive identifier whose content is being requested.
  • limit: The maximum number of records to return (range constrained: 1 to 20).

retrieve_transaction_ledger

Retrieves the historical sequence of operations associated with a Hive address, allowing for subset selection based on operation type.

  • Parameters:
  • username: The target Hive account name.
  • limit: The maximum count of operations to return.
  • operation_filter: An optional array specifying which operation types to include in the output.

obtain_network_status

Retrieves the prevailing operational statistics and configuration values of the Hive blockchain infrastructure.

  • Parameters: None

list_resource_stake_transfers

Retrieves the delegation records for vested resources originating from a specified Hive participant.

  • Parameters:
  • username: The account performing the delegation.
  • limit: The upper bound on the number of delegation records to retrieve.
  • from: An optional username to use as a starting point for paginated retrieval.

endorse_content

Applies a directional endorsement (positive or negative) weight to a piece of Hive media using the gateway's configured account credentials.

  • Parameters:
  • author: The creator of the content receiving the vote.
  • permlink: The permalink identifying the content object.
  • weight: The magnitude of the vote, scaled from -10000 (full rejection) to +10000 (full approval).

publish_new_article

Submits a newly authored piece of content to the Hive blockchain network via the authenticated account.

  • Parameters:
  • title: The subject headline of the entry.
  • body: The primary textual content (Markdown is supported).
  • tags: A list of relevant subject tags for categorization.
  • Optional fields govern reward distribution, beneficiary assignments, etc.

submit_response

Adds a commentary entry, which can be a direct reply or a root comment, to an existing content entity.

  • Parameters:
  • parent_author: The identity of the original post author or the comment being replied to.
  • parent_permlink: The permalink identifying the parent content object.
  • body: The text of the reply (Markdown is accepted).
  • Optional parameters control reward splits and metadata.

transfer_digital_asset

Initiates a transfer of liquid HIVE or HBD assets from the configured account to a specified recipient address.

  • Parameters:
  • to: The destination Hive account identifier.
  • amount: The numerical value of the asset quantity to transfer.
  • currency: The ticker symbol of the asset (HIVE or HBD).
  • memo: An optional, potentially encrypted, textual annotation for the transaction.

cryptographically_sign

Generates a verifiable signature for arbitrary data using one of the private keys loaded from the environment configuration.

  • Parameters:
  • message: The input data string to be signed.
  • key_type: Specification of which key to utilize for signing (e.g., posting, active, or memo).

validate_digital_proof

Verifies if a provided signature corresponds correctly to the message hash when checked against a specific public key.

  • Parameters:
  • message_hash: The digest of the original message, presented in hexadecimal format.
  • signature: The string representing the cryptographic signature.
  • public_key: The public key credential against which validation is performed.

encode_private_message

Applies symmetric encryption to a message payload so that only the intended Hive recipient, possessing the corresponding private memo key, can read it.

  • Parameters:
  • message: The plaintext data to be obscured.
  • recipient: The Hive username designated as the intended receiver.

decode_private_message

Reverses the encryption process on a memoized message, utilizing the local account's private key.

  • Parameters:
  • encrypted_message: The ciphertext, typically prefixed with a marker (e.g., #).
  • sender: The Hive username from whom the encrypted communication originated.

dispatch_encrypted_payload

Sends an encrypted message concealed within a minimal HIVE token transfer transaction.

  • Parameters:
  • message: The content string to be secured and transmitted.
  • recipient: The intended recipient's Hive username.
  • amount: The HIVE quantity used to carry the payload (minimum 0.001; defaults to 0.001).

fetch_secured_communications

Queries the account's transaction history specifically for memoized messages, with an option to attempt immediate decryption upon retrieval.

  • Parameters:
  • username: The identity whose message history is to be inspected.
  • limit: The maximum number of historical entries to process (defaulting to 20).
  • decrypt: A boolean flag indicating whether decryption attempts should be executed post-retrieval (default: false).

Development & Architecture

Internal Layout

  • src/index.ts - Primary execution file for the gateway service.
  • src/tools/ - Directory housing the implementation logic for every exposed tool function.
  • src/schemas/ - Zod definitions used for rigorous validation of incoming tool parameter structures.
  • src/utils/ - Helper routines for abstracted Hive DLT interaction.
  • src/config/ - Configuration management, including environment variable loading and logging verbosity control.

Required External Libraries

  • @hiveio/dhive - Core client library for interacting with the Hive network nodes.
  • @modelcontextprotocol/sdk - The fundamental SDK for building the MCP interface.
  • zod - Used for enforcing data schema integrity.

Licensing

ISC License

Collaboration Guidelines

We welcome external contributions. Please review the detailed specifications within the CONTRIBUTING.md file before submitting any Merge Requests.

return

See Also

`