Skip to content

Production-ready Model Context Protocol (MCP) server for monitoring and analyzing the Fetch.ai autonomous agent economy

License

Notifications You must be signed in to change notification settings

Tairon-ai/fetch-ai-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Fetch.ai Autonomous Agent Economy MCP Server v0.1

License: MIT Node Version MCP Protocol Docker Ready

Production-ready Model Context Protocol (MCP) server for monitoring and analyzing the Fetch.ai autonomous agent economy

Features β€’ Quick Start β€’ Tools β€’ Prompts β€’ Development


🎯 Overview

This MCP server provides real-time monitoring and analytics for the Fetch.ai autonomous agent economy. It enables insights into agent interactions, micro-transactions, AI-driven commerce, and network health.

✨ Features

Core Capabilities

  • Agent Economy Monitoring - Track active agents and real-time interactions
  • Transaction Analytics - Monitor micro-transactions and payment patterns
  • AI Agent Performance - Analyze agent success rates and learning patterns
  • Commerce Intelligence - Track autonomous negotiations and DeFi activities
  • Network Health - Monitor the overall health of the agent-to-agent economy
  • MCP Protocol Compliance - Full implementation of MCP 2024-11-05 specification

πŸ“¦ Quick Start

Prerequisites

# Required
Node.js >= 18.0.0
npm >= 9.0.0

Installation

# Clone the repository
git clone https://github.com/Tairon-ai/fetch-ai-mcp.git
cd fetch-ai-mcp/mcp-server

# Install dependencies
npm install

# Configure environment (optional)
cp .env.example .env
# Edit .env with your configuration

# Start the server
npm start

# Development mode
npm run dev

# MCP stdio server for Claude Desktop
npm run mcp

πŸ€– Claude Desktop Integration

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "fetchai": {
      "command": "node",
      "args": ["/path/to/fetch-ai-mcp-server/mcp/index.js"],
      "env": {
        "FETCH_RPC_URL": "https://rpc-fetchhub.fetch.ai:443",
        "FETCH_REST_URL": "https://rest-fetchhub.fetch.ai",
        "AGENTVERSE_API_KEY": "your_api_key_here"
      }
    }
  }
}

πŸ›  Development

Environment Variables

Create a .env file (or copy from .env.example):

# Fetch.ai Blockchain Configuration
FETCH_RPC_URL=https://rpc-fetchhub.fetch.ai:443
FETCH_REST_URL=https://rest-fetchhub.fetch.ai

# Agentverse API Key (Required for agent data)
# Get your key from https://agentverse.ai
AGENTVERSE_API_KEY=

# Server Configuration
PORT=8080
RATE_LIMIT_REQUESTS_PER_SECOND=10

Getting Agentverse API Key

To get real agent data from Fetch.ai Agentverse:

  1. Go to https://agentverse.ai and sign in
  2. Navigate to your Profile section
  3. Click "+ New API Key"
  4. Give your API key a name
  5. Select "write" for access level
  6. Click "Generate API Key"
  7. Copy the key and add it to your .env file as AGENTVERSE_API_KEY

Note: Without an API key, tools will require the AGENTVERSE_API_KEY to work with real agent data. Network stats work without API key.


πŸ“Š Available Tools

The server provides the following tools for interacting with Fetch.ai:

Tool Description Requires API Key
get_active_agents Monitor active agents and their interactions Yes
get_agent_transactions Track interaction volume and economy health Yes
search_agents Search agents by category, type, or keyword Yes
get_agent_metrics Analyze agent performance and network stats No (partial)
get_commerce_activity Monitor blockchain transactions and activity No

Note: Tools use real data from Agentverse API when AGENTVERSE_API_KEY is configured. Network stats from Fetch.ai RPC work without API key.


πŸ’¬ PROMPTS

Agent Economy Monitoring

  • "How many autonomous agents are active on Fetch.ai right now?"
  • "Show me the micro-transaction volume between agents today"
  • "What's the health of the agent-to-agent economy?"
  • "Track the most active autonomous agents and their interactions"

AI Agent Analytics

  • "Analyze agent registration trends and adoption patterns"
  • "Which types of AI agents are most popular on the network?"
  • "Show me agent performance metrics and success rates"
  • "Find agents that are learning and improving over time"

Autonomous Commerce Intelligence

  • "Monitor agent-to-agent negotiations and deal-making"
  • "Analyze micro-payment patterns in the agent economy"
  • "Show me agents optimizing supply chains or energy grids"
  • "Track autonomous agents in DeFi and trading activities"

πŸš€ Deployment

Docker (Recommended)

# Using Docker Compose
docker-compose up -d

# Check logs
docker-compose logs -f

# Stop
docker-compose down

Manual Deployment

# Production mode
NODE_ENV=production npm start

# With PM2
pm2 start server.js --name fetchai-mcp-server

Health Check Endpoints

  • GET /health - Health status
  • GET /info - Server information
  • POST /mcp - MCP protocol endpoint

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Quick steps:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments


πŸ“š Resources


Built by Tairon.ai team with help from Claude

About

Production-ready Model Context Protocol (MCP) server for monitoring and analyzing the Fetch.ai autonomous agent economy

Topics

Resources

License

Contributing

Stars

Watchers

Forks