Skip to content

czDamian/amadeus-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amadeus MCP Tools Test

This project demonstrates the use of an LLM (Claude) with the Amadeus blockchain using the Model Context Protocol (MCP). It allows an AI agent to query blockchain statistics, check account balances, and simulate transaction creation and signing by interfacing with the Amadeus MCP server.

Features

  • Blockchain Queries: Retrieve current block height, transaction history, and validator information.
  • Account Management: Check AMA token balances and other assets for specific addresses.
  • Transaction Simulation: Build and sign transaction blobs (simulation only, does not broadcast to mainnet/testnet without specific configuration).
  • MCP Integration: Uses the Amadeus MCP server (https://mcp.ama.one/rpc) to dynamically fetch and execute tools.

Prerequisites

  • Node.js: Ensure you have Node.js installed (v18+ recommended).
  • Anthropic API Key: You need a valid API key from Anthropic to use the Claude model.
  • Amadeus Wallet Address: A valid Amadeus blockchain address (starting with ama1) for testing queries.

Installation

  1. Clone the repository
  git clone https://github.com/czDamian/amadeus-agent.git
  1. Install the dependencies:
  npm install

Configuration

Create a .env file in the root directory and add the following environment variables:

# mandatory
ANTHROPIC_API_KEY=your_anthropic_api_key_here

# optional
AMA_WALLET_ADDRESS=your_amadeus_wallet_address_here
AMADEUS_MAINNET_RPC=https://node.ama.one
AMADEUS_TESTNET_RPC=https://testnet.node.ama.one

Usage

To run the test script and interact with the Amadeus tools via Claude:

node test.js

The script will:

  1. Initialize the Anthropic client.
  2. Send a prompt to Claude (eg: "using the amadeus blockchain tools, get the balance of the first validator").
  3. Claude will decide which tools to call based on the dynamically fetched definitions.
  4. The script executes the tools against the Amadeus MCP server and returns the results to Claude.
  5. Claude generates a final natural language response.

Project Structure

  • test.js: The main entry point. It sets up the MCP integration, dynamically fetches tools, handles the conversation loop with Claude, and executes the tool calls.
  • amadeus_mcp_tools.json: A JSON file containing a snapshot of the available tools. Note: This file is for reference purposes only; the actual tools are fetched dynamically from the MCP server at runtime.

License

MIT

About

This project demonstrates the use of an LLM (Claude) with the Amadeus blockchain using the Model Context Protocol (MCP)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors