Make Your AVS Agent-Ready With MCP

Abstract

This article explains how AVS builders could integrate MCP (Model Context Protocol) into their service to allow AI agents to interface with the network.

It lays out a practical guide for setting up an AVS-connected MCP server that lets agents reliably access verified data and execute on-chain tasks, detailing the technical components, use cases, and step-by-step implementation without unnecessary fluff.

What is the Model Context Protocol (MCP) — and Why It Matters

Model Context Protocol (MCP), introduced by Anthropic, is an open standard designed to make AI Agents more capable by standardizing integration with external tools and data sources. Think of it as the abstraction layer that eliminates the need for bespoke code whenever you want an LLM to interact with a new API or system, including AVS.

MCP operates on a client-server architecture with three key components:

  1. Host: The runtime environment where the AI agent (e.g., Claude or another LLM) executes. It is responsible for initiating and managing interactions via the MCP Client, acting as the origin point for all requests.
  2. MCP Client: The protocol clients that maintain 1:1 connections with servers.
  3. MCP Server: The execution layer that interfaces with external systems (e.g., Databases, Local Processes, External APIs, RPC Endpoints), translating the LLM's intent into API calls and returning results.

Here’s the core problem MCP solves: Every useful external system—AVSs, Slack, GitHub, your local filesystem—has its own API. Integrating each with an LLM traditionally requires custom glue code. The more tools you want, the more glue you need. It doesn’t scale.

MCP replaces this with a universal tool interface. Instead of writing bespoke integrations, you define a set of tools (e.g., fetch_price, validate_price) on an MCP server. The LLM, via the MCP client, invokes these tools in a standardized way. Whether the server is local or remote, the model can discover and use capabilities without additional engineering overhead.

This modularity is a game-changer: you can “plug in” functionality simply by running or connecting to an appropriate MCP server—instantly extending a model’s reach without rewriting code.

Othentic MCP Interface

At Othentic, we created an MCP interface example, that enables AVS teams to transform their AVS into an agent-compatible system.

By combining MCP with peer-to-peer consensus and on-chain validation, agents can retrieve the right context at the right time—leveraging the decentralization and verifiability of AVS systems. Othentic MCP interface enables the shift toward decentralized, verifiable, and context-aware AI era.

The AVS MCP server acts as an interface between the agents and the AVS network, enabling you to execute any AVS Tasks with on-chain validation. Whether querying an Oracle AVS or running an off-chain workflow, the MCP layer is compatible with any environment, making AVS agent-ready.

By implementing the MCP interface within the AVS, the agent is able to (1) use verifiable data and tools and (2) submit a task for execution by the AVS network.

Use Cases

Integrating an MCP server with an AVS unlocks a wide range of agent-centric use cases. Agents can leverage the standardized MCP interface to interact with verifiable tools and data sources within applications, while end-users gain the ability to query these agents through natural language prompts.

AI agents can access verifiable resources, context, and tools via interfacing with AVS. For example:

  1. Agents that interface with RedStone to take actions based on verifiable RWA data and price feeds.
  2. Agent interface with workflow systems to automate and perform actions across integrated apps with K3Labs, TriggerX  and Plug.
  3. DeFi trading agent from Giza that interfaces with Tria to bridge liquidity and execute tasks across VMs.
  4. Autonomous agents that query indexed blockchain data from Cambrian Network for real-time decision-making.

Build your own AVS MCP server

In this quick example, we'll demonstrate two real-world flows to set up an MCP integration with an AVS:

  1. Create an MCP server that fetches on-chain price data that has been verified by an AVS
  2. Create an MCP server that performs a request to an AVS to verify price data

Let's begin!

1. Clone the MCP AVS Example Repository

Clone the MCP AVS server Github repo to get started quickly. This provides the foundation for agent ↔ AVS communication:

git clone <https://github.com/Othentic-Labs/avs-mcp-example>
cd avs-mcp-example/MCP_Execution_Server

2. Build tools to expose your AVS to agents

Tools are the core building blocks of MCP servers. They expose executable functions that agents can call through natural language prompts.

Agents can:

  • Read verified data from AVS (Read data tool)
  • Submit data for on-chain validation to the AVS network (Write data tool)

Read more about Tools here: https://modelcontextprotocol.io/docs/concepts/tools

We'll start by building a Tool that fetches price data from a Smart Contract on the Base network after it has passed verification by the RedStone AVS.

2.1. Read verified data from AVS

We'll walk through how to implement a custom MCP tool called get-price-from-redstone, which queries validated price from the RedStone AVS. The validated price data is stored on-chain using AVS Logic Hook contract, at the contract address below:

👉 RedStone AVS Logic Contract on Base

2.1.1: Add RedStone Price Service

Create a new file named RedStonePriceService in the services folder. This service connects to the RedStone AVS smart contract using exposes a getPrice() method:


import AVS_ABI from "../abis/RedstoneAVS.json"; // Replace with correct ABI path

export class PriceService {
  provider: ethers.providers.JsonRpcProvider;
  avsContract: ethers.Contract;

  constructor(rpcUrl: string, avsAddress: string) {
    this.provider = new ethers.providers.JsonRpcProvider(rpcUrl);
    this.avsContract = new ethers.Contract(avsAddress, AVS_ABI, this.provider);
  }

  /**
   * Gets the validated price from the Redstone AVS smart contract
   * @returns {Promise<string>} - Validated price from the AVS
   */
  async getPrice() {
    return asyncHandler(
      async () => {
        const price = await this.avsContract.price();
        return price.toString(); // Assuming BigNumber return
      },
      "Error fetching validated price from AVS"
    );
  }
}
2.1.2: Register the RedStone Price MCP Tool

Next, Create a new file in the tools folder to expose this functionality to the agent via an MCP tool called get-price-from-redstone.

export function registerRedstonePriceTool(server: any, priceService: PriceService) {
  server.tool(
    "get-price-from-redstone",
    "Get price data from Redstone AVS",
    async () => {
      try {
        const price = await priceService.getPrice();
        return {
          content: [
            {
              type: "text",
              text: `Price is : ${price}`,
            },
          ],
        };
      } catch (error) {
        console.error("Error in price tool:", error);
        return {
          content: [
            {
              type: "text",
              text: "Failed to retrieve price data",
            },
          ],
        };
      }
    }
  );
}
2.1.3: Test the Tool

Configure the required environment variable for an RPC endpoint:

{
  "mcpServers": {
    "RedStoneAVS": {
      "command": "node",
      "args":["ADD_ABSOLUTE_PATH/simple-price-oracle-avs-example/MCP_Execution_Server/build/index.js"],
      "env": {
        "BASE_RPC_ENDPOINT":"",
      }
    }
  }
}


  • Use MCP server with Claude or Cursor, configure  claude_desktop_config.json and check for available MCP tools, It should showcase the new tools added.
  • Try different prompts to invoke the tools, for example
    • "What’s the current price from RedStone?" → invokes the get-price-from-redstone tool to fetch the price

2.2. Submit data for validation to the AVS network

In this section, we will create Tools that allow agents to request verification of price data with an existing AVS, as demonstrated using Simple price oracle example AVS.

2.2.1: Write Task Execution service

Start by writing the Task Execution Logic to get the price of the currency pair from any exchange for example Binance, following the Execution Service guide.

Full Code: https://github.com/Othentic-Labs/avs-mcp-example/blob/main/MCP_Execution_Server/src/services/price.service.ts

  /**
   * Gets current price for a currency pair from Binance
   * @param {string} pair - Currency pair (e.g., "ETHUSDT")
   * @returns {Promise<string>} - Current price
   */
  async getPrice(pair: any) {
    return asyncHandler(
      async () => {
        const response = await fetch(
          `${this.endpoint}?symbol=${pair}`,
          { headers: this.headers }
        );
        
        if (!response.ok) {
          throw new Error(`HTTP error! status: ${response.status}`);
        }
        
        return (await response.json()).price;
      },
      "Error fetching price data"
    );
  }
2.2.2 Write a service to submit Task to AVS network

Create another service in the services folder to submit the Task for validation to the AVS network using sendTask RPC call.

Full Code : https://github.com/Othentic-Labs/avs-mcp-example/blob/main/MCP_Execution_Server/src/services/avs.service.ts


  /**
   * Sends a task to the AVS network for validation
   * @param {string} proofOfTask - IPFS hash of the proof of task
   * @param {string} data - Additional data for the task
   * @param {number} taskDefinitionId - Task definition identifier
   * @returns {Promise<any>} - Response from the AVS network
   */
  async sendTask(proofOfTask: any, data: any, taskDefinitionId: any) {
    return asyncHandler(
      async () => {
        const encodedData = ethers.hexlify(ethers.toUtf8Bytes(data));
        
        const message = ethers.AbiCoder.defaultAbiCoder().encode(
          ["string", "bytes", "address", "uint16"],
          [proofOfTask, encodedData, this.performerAddress, taskDefinitionId]
        );
        
        const messageHash = ethers.keccak256(message);
        const sig = this.wallet.signingKey.sign(messageHash).serialized;

        return await this.provider.send("sendTask", [
          proofOfTask,
          encodedData,
          taskDefinitionId,
          this.performerAddress,
          sig
        ]);
      }, 
      "Error sending task to AVS Network"
    );
  }
}
2.2.3: Register the send-task MCP Tool to Submit Task to AVS Network

Create a tool that stores the data on IPFS, generates a proof-of-task, and then invokes the AVS service to submit the task to the AVS network for verification.

Full Code: https://github.com/Othentic-Labs/avs-mcp-example/blob/main/MCP_Execution_Server/src/tools/task.tool.ts

export function registerTaskTool(server: any, ipfsService: IpfsService, avsService: AVSService) {
  server.tool(
    "send-task",
    "Send Task for validation to the AVS network",
    {
      price: z.string().describe("proof of task"),
      data: z.string().describe("additional data"),
    },
    async ({ price, data }: {price: any, data: any}) => {
      try {
        const result = { price: parseFloat(price) };
        const proofOfTask = await ipfsService.publishJSON(result);
        await avsService.sendTask(proofOfTask, data, 0);

        return {
          content: [
            {
              type: "text",
              text: `Sent successfully`,
            },
          ],
        };
      } catch (error) {
        console.error("Error in send-task tool:", error);
        return {
          content: [
            {
              type: "text",
              text: "Failed to submit Task",
            },
          ],
        };
      }
    }
  );
}

2.2.4 Test the tools

Update the required environment variables with Operator configuration and AVS client RPC endpoint:

{
  "mcpServers": {
    "RedStoneAVS": {
      "command": "node",
      "args":["ADD_ABSOLUTE_PATH/simple-price-oracle-avs-example/MCP_Execution_Server/build/index.js"],
      "env": {
        "BASE_RPC_ENDPOINT":"",
        "PRIVATE_KEY_PERFORMER": "YOUR_PERFORMER_PRIVATE_KEY_HERE",
        "OTHENTIC_CLIENT_RPC_ADDRESS":"http://localhost:8545",
        "PINATA_API_KEY": "7824585a98fe36414d68",
        "PINATA_SECRET_API_KEY": "41a53a837879721969e73008d91180df30dbc66097c7f75f08cd5489176b43ea",
      }
    }
  }
}
  • Try different prompts to invoke the tools, for example
    • "validate ETHUSDT price using the AVS network" → It first calls the get-price tool to retrieve the current price, then uses the send-task tool to submit that data to the AVS network for validation.
    • "validate 1455 for ETHUSDT price using the AVS network" → It directly calls the send-task tool to submit that data to the AVS network for validation.
  • Monitor task submissions to your AVS
  • Use the Attestation Center contract to verify on-chain execution

3. MCP AVS Server documentation

Create a detailed README explaining your AVS-MCP integration similar to the example readme.

Make sure to include following:

  • Tool descriptions & inputs/outputs
  • Environment variable configuration
  • Sample prompts
  • AVS contracts and on-chain validation flow

Add the AVS MCP server to the Awesome MCP Servers repo for others to discover.

✅ Your MCP Server is ready!

Your AVS is now fully integrated and accessible to any AI agent via any MCP-compatible interface—such as Claude, Cursor, or your custom agent runtime. ✨

Agents can now interact with your AVS with natural language prompts. An agent can also interact with multiple AVSs using different MCP servers.

Further Reading & Resources

Model Context Protocol Overview – Core principles behind MCP

Awesome MCP Servers - A collection of ready to use MCP Servers

MCP Server Playground - Call MCP Server Tools Online

https://glama.ai/mcp/servers - Curated list of MCP Servers