Production-ready Model Context Protocol (MCP) server for monitoring and analyzing the Fetch.ai autonomous agent economy
Features β’ Quick Start β’ Tools β’ Prompts β’ Development
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.
- 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
# Required
Node.js >= 18.0.0
npm >= 9.0.0# 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 mcpAdd 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"
}
}
}
}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=10To get real agent data from Fetch.ai Agentverse:
- Go to https://agentverse.ai and sign in
- Navigate to your Profile section
- Click "+ New API Key"
- Give your API key a name
- Select "write" for access level
- Click "Generate API Key"
- Copy the key and add it to your
.envfile asAGENTVERSE_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.
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.
- "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"
- "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"
- "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"
# Using Docker Compose
docker-compose up -d
# Check logs
docker-compose logs -f
# Stop
docker-compose down# Production mode
NODE_ENV=production npm start
# With PM2
pm2 start server.js --name fetchai-mcp-serverGET /health- Health statusGET /info- Server informationPOST /mcp- MCP protocol endpoint
We welcome contributions! Please see our Contributing Guide for details.
Quick steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Fetch.ai - Autonomous agent economy platform
- Model Context Protocol - MCP specification
- Express.js - Web framework
- Node.js - Runtime environment
- Fetch.ai Documentation
- uAgents Documentation
- MCP Documentation
- Express.js Guide
- Node.js Best Practices
- Docker Documentation
Built by Tairon.ai team with help from Claude