MCP ExplorerExplorer

Avs Mcp Example

@Othentic-Labson 9 months ago
2 MIT
FreeCommunity
AI Systems
Example implementation of the AVS Model Context Protocol (MCP) in TypeScript

Overview

What is Avs Mcp Example

The avs-mcp-example is an example implementation of the AVS Model Context Protocol (MCP) in TypeScript, serving as an interface between AI Agents and the AVS network for executing tasks with on-chain validation.

Use cases

Use cases include executing AI tasks that require consensus verification, querying real-time cryptocurrency prices for trading applications, and integrating AI systems with blockchain for enhanced security and transparency.

How to use

To use avs-mcp-example, clone the repository, install the Othentic CLI, ensure the AVS network is running, and utilize the provided tools to fetch cryptocurrency prices and send tasks to the AVS network.

Key features

Key features include decentralized verification of tasks, generation of verifiable outputs, on-chain validation of transactions, and real-time access to blockchain data for AI decision-making.

Where to use

avs-mcp-example can be used in fields such as decentralized applications, AI-driven decision systems, and any scenario requiring secure task execution and validation on the blockchain.

Content

AVS MCP Server

Table of Contents

  1. Overview
  2. Components
  3. Installation
  4. Usage
  5. Next Steps
  6. Disclaimer

Overview

The AVS MCP server acts as an interface between the AI Agents and the AVS network, enabling you to execute any AVS Tasks with on chain validation.

alt text

Key Features

  • Decentralized Verification: Submit tasks to the AVS network for consensus-based verification

  • Verifiable Outputs: Generate cryptographic proofs of AI-initiated tasks

  • On chain Validation: Execute transaction on chain

  • Blockchain Data Access: Query real-time blockchain data for informed AI decision-making

Components

MCP Server requires the development of custom tools. You can create tools for generating Proof of Task and sending it to the AVS network. Additionally, you can integrate external resources such as APIs, databases, and local storage.

The following MCP server includes functionality to fetch the ETHUSDT price and call the sendTask RPC method to trigger the AVS Task.

Tools

  • get-price: Fetches the price of a cryptocurrency pair using the Binance API.

    • Input:
      • pair (string): The name of the cryptocurrency pair (e.g., ETHUSDT).
  • send-task

    • Input:
      • price (string): Price of the pair.
      • data (string): Any additional data.

Installation

  1. Clone the repository:

    git clone https://github.com/Othentic-Labs/avs-mcp-example.git
    cd avs-mcp-example
    
  2. Install Othentic CLI:

    npm i -g @othentic/othentic-cli
    

Usage

  1. Ensure the AVS Network is running

Make sure your AVS network is up and running before proceeding. Refer to the Quickstart Guide for instructions on running an AVS network.

  1. Build the MCP server

Run the following commands to compile the server:

cd MCP_Execution_Server
npm i
npm run build
  1. Configure Claude Desktop

Add the configuration for the MCP Server in your claude_desktop_config.json file. Detailed instructions are available in the Claude Desktop Configuration Guide.

Replace ADD_ABSOLUTE_PATH and YOUR_PERFORMER_PRIVATE_KEY_HERE with the appropriate values:

{
  "mcpServers": {
    "AVSPerformer": {
      "command": "node",
      "args":["ADD_ABSOLUTE_PATH/avs-mcp-example/MCP_Execution_Server/build/index.js"],
      "env": {
        "PRIVATE_KEY_PERFORMER": "YOUR_PERFORMER_PRIVATE_KEY_HERE",
        "OTHENTIC_CLIENT_RPC_ADDRESS":"http://localhost:8545",
        "PINATA_API_KEY": "7824585a98fe36414d68",
        "PINATA_SECRET_API_KEY": "41a53a837879721969e73008d91180df30dbc66097c7f75f08cd5489176b43ea",
      }
    }
  }
}
  1. Sample Prompts

You can interact with the AVS MCP Server using prompts such as:

can you get the price of ETHUSDT?
can you validate this price using AVS network?
  1. Verify the On-Chain Transaction

Check the on-chain transaction in the Attestation Center contract to confirm execution within the AVS network.

Next Steps

  • Write an MCP server for your AVS
  • Test it out and add it to the MCP Server repository.

Use Cases

  • AI-Powered DeFi: Trading agents that interface with intent solver AVS to bridge liquidity

  • Autonomous Agents: Make decisions based on real-time indexed blockchain data

  • Workflow Automation: Trigger and monitor on-chain actions across integrated applications

  • Oracle Integration: Access verifiable data through oracle AVS networks

Happy Building! 🚀

Disclaimer

This repository is an experimental implementation intended for testing and development purposes only. Do not use this in production environments without conducting a thorough security audit.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers