{"skill":{"slug":"8004-mcp","displayName":"Agent identity and reputation registration","summary":"Register and manage agent identity, reputation, and feedback on Solana and EVM chains using the multi-chain ERC-8004 Agent Registry protocol.","description":"# 8004-MCP - Agent Registry Protocol\n\nMulti-chain MCP server for ERC-8004 Agent Registry. Query agents, reputation, and feedback across Solana + EVM chains.\n\n---\n\n## ⚡ First Time Setup (IMPORTANT)\n\n### 1. Check System Health\n```typescript\nawait client.callTool({ name: 'health_check', arguments: {} });\n// Returns: { server: 'ok', chains: {...}, walletStore: 'not_initialized', ... }\n```\n\n### 2. Initialize Wallet Store (One-Time)\nThe wallet store encrypts all your wallets with a single master password.\n\n```typescript\n// ⚠️ SAVE THIS PASSWORD - Cannot be recovered if lost!\nawait client.callTool({ name: 'wallet_store_init', arguments: {\n  password: 'YourSecureMasterPassword123!'\n}});\n// Returns: { initialized: true, message: 'Wallet store created' }\n```\n\n### 3. Create a Wallet\n```typescript\nawait client.callTool({ name: 'wallet_create', arguments: {\n  name: 'my-eth-wallet',\n  chainType: 'evm'  // or 'solana'\n}});\n// Returns: { name: 'my-eth-wallet', address: '0x...', chainType: 'evm' }\n```\n\n### 4. Fund Your Wallet\n\nCheck the \"Approximate Costs\" section below for funding amounts.\n\n```typescript\n// Get faucet info (testnet) or ask owner (mainnet)\nconst funding = await client.callTool({ name: 'faucet_info', arguments: {\n  chain: 'eth'  // or 'sol', 'base'\n}});\n// Returns faucet URLs and wallet address\n```\n\n**⚠️ Important for Agents:**\n- See \"Approximate Costs\" section for funding amounts\n- Faucets require captchas - you can't use them directly\n- Ask your owner to fund your wallet\n- On mainnet: no faucets, must ask owner for real funds\n\n### 5. On New Sessions - Unlock Store\n```typescript\nawait client.callTool({ name: 'wallet_store_unlock', arguments: {\n  password: 'YourSecureMasterPassword123!'\n}});\n// Now all write operations work\n```\n\n### Common Issues\n\n| Symptom | Cause | Solution |\n|---------|-------|----------|\n| `STORE_NOT_INITIALIZED` | First run | Call `wallet_store_init` |\n| `STORE_LOCKED` | New session | Call `wallet_store_unlock` |\n| `INVALID_PASSWORD` | Wrong password | Check password (no recovery!) |\n| Timeout on wallet ops | Store locked | Unlock first |\n| `INSUFFICIENT_BALANCE` | Empty wallet | Ask owner to fund (see below) |\n\n### Requesting Funds from Owner\n\nAs an agent, you cannot use faucets directly (captchas). Ask your owner:\n\n```typescript\n// 1. Get your wallet address\nconst info = await client.callTool({ name: 'faucet_info', arguments: { chain: 'eth' }});\n\n// 2. Ask owner to fund (see \"Approximate Costs\" section for amounts)\n// Example: \"Please fund my wallet 0x1234... with ~0.01 SOL or ~$0.50 in ETH\"\n\n// 3. Wait for owner to send funds, then proceed with agent_register\n```\n\n---\n\n## Quick Start (MCP Client)\n\n```typescript\nimport { Client } from '@modelcontextprotocol/sdk/client/index.js';\nimport { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';\nimport { spawn } from 'child_process';\n\nconst server = spawn('npx', ['@quantulabs/8004-mcp'], {\n  stdio: ['pipe', 'pipe', 'inherit'],\n  env: { ...process.env, NETWORK_MODE: 'testnet' }\n});\n\nconst client = new Client(\n  { name: 'my-agent', version: '1.0.0' },\n  { capabilities: {} }\n);\n\nawait client.connect(new StdioClientTransport({\n  reader: server.stdout,\n  writer: server.stdin,\n}));\n\n// Ready - use client.callTool()\n```\n\n## Global ID Format\n\n| Chain | Format | Example |\n|-------|--------|---------|\n| Solana | `sol:<pubkey>` | `sol:HHCVWcqs...` |\n| Ethereum | `eth:<chainId>:<tokenId>` | `eth:11155111:738` |\n| Base | `base:<chainId>:<tokenId>` | `base:84532:42` |\n\n---\n\n## Core Tools\n\n### Read Operations (No wallet needed)\n\n#### agent_search\nSearch agents across chains.\n```typescript\nawait client.callTool({ name: 'agent_search', arguments: {\n  query: 'trading bot',      // Search name/description\n  chain: 'eth',              // Optional: sol, eth, base, arb, poly, op\n  limit: 20,                 // Default: 20, max: 100\n  offset: 0,                 // Pagination offset\n  cursor: 'abc...',          // Cursor pagination (EVM only, faster)\n  // Advanced filters (EVM only):\n  hasMcp: true,              // Has MCP endpoint\n  hasA2a: true,              // Has A2A endpoint\n  active: true,              // Active agents only\n  x402support: true,         // Supports x402 payments\n  mcpTools: ['web-search'],  // Has specific MCP tools\n  a2aSkills: ['translation'] // Has specific A2A skills\n}});\n// Returns: { results: IAgentSummary[], total, hasMore, cursor? }\n```\n\n#### cache_search\nFast fuzzy search (FTS5). Use for partial name matches.\n```typescript\nawait client.callTool({ name: 'cache_search', arguments: {\n  query: 'Upsense',  // Partial match works\n  chain: 'all',\n  limit: 20\n}});\n```\n\n#### agent_get\nGet agent details by ID.\n```typescript\nawait client.callTool({ name: 'agent_get', arguments: {\n  id: 'eth:11155111:738'  // Global ID\n}});\n// Returns: IAgent with name, description, owner, endpoints, metadata\n```\n\n#### agent_exists\nCheck if agent exists.\n```typescript\nawait client.callTool({ name: 'agent_exists', arguments: {\n  id: 'sol:HHCVWcqs...'\n}});\n// Returns: { exists: boolean }\n```\n\n#### reputation_get\nGet reputation summary.\n```typescript\nawait client.callTool({ name: 'reputation_get', arguments: {\n  id: 'sol:HHCVWcqs...'\n}});\n// Returns: { averageScore, totalFeedbacks, trustTier (Solana only) }\n```\n\n#### feedback_list\nList feedbacks for an agent.\n```typescript\nawait client.callTool({ name: 'feedback_list', arguments: {\n  id: 'sol:HHCVWcqs...',\n  limit: 20,\n  minScore: 50  // Optional filter\n}});\n```\n\n#### leaderboard_get\nTop agents by reputation.\n```typescript\nawait client.callTool({ name: 'leaderboard_get', arguments: {\n  chain: 'sol',\n  limit: 10\n}});\n```\n\n#### solana_atom_stats_get\nATOM reputation metrics (Solana only).\n```typescript\nawait client.callTool({ name: 'solana_atom_stats_get', arguments: {\n  asset: 'HHCVWcqs...'  // Solana pubkey (no sol: prefix)\n}});\n// Returns: { qualityScore, trustTier, uniqueClients, fastEma, slowEma }\n```\n\n#### solana_integrity_verify\nVerify indexer data integrity (Solana only).\n```typescript\nawait client.callTool({ name: 'solana_integrity_verify', arguments: {\n  asset: 'HHCVWcqs...'\n}});\n// Returns: { status: 'valid' | 'syncing' | 'corrupted' }\n```\n\n### Write Operations (Wallet required)\n\n#### Wallet Store Setup (Master Password)\n```typescript\n// 1. Initialize store (one-time) - SAVE THE MASTER PASSWORD!\nawait client.callTool({ name: 'wallet_store_init', arguments: {\n  password: 'MySecureMaster123!'\n}});\n\n// 2. Create wallets (stored in encrypted store)\nawait client.callTool({ name: 'wallet_create', arguments: {\n  name: 'my-solana',\n  chainType: 'solana'  // or 'evm'\n}});\n\n// 3. On new session, unlock store with master password\nawait client.callTool({ name: 'wallet_store_unlock', arguments: {\n  password: 'MySecureMaster123!'\n}});\n\n// 4. Now write operations work (all wallets unlocked)\n```\n\n#### feedback_give\nSubmit feedback for an agent.\n```typescript\nawait client.callTool({ name: 'feedback_give', arguments: {\n  id: 'sol:HHCVWcqs...',\n  value: 85,              // Score 0-100\n  tag1: 'uptime',         // Category tag\n  tag2: 'day',            // Period tag\n  comment: 'Great agent', // Optional\n  skipSend: false         // true = dry-run (returns unsigned tx)\n}});\n```\n\n#### agent_register\nRegister new agent on-chain. See \"Approximate Costs\" section for funding.\n\n```typescript\nawait client.callTool({ name: 'agent_register', arguments: {\n  chain: 'eth',  // or 'sol', 'base', etc.\n  name: 'My Agent',\n  description: 'Does cool stuff',\n  tokenUri: 'https://example.com/agent.json',  // Optional: your hosted metadata\n  // If no tokenUri: SDK uploads to IPFS automatically\n}});\n```\n\n---\n\n## Approximate Costs\n\n### Solana (Devnet/Mainnet)\n\n| Operation | Cost | Notes |\n|-----------|------|-------|\n| `agent_register` | ~0.01 SOL | Includes ATOM stats account |\n| `feedback_give` | ~0.0005 SOL | Event-based, low rent |\n| `feedback_response_append` | ~0.0005 SOL | Event-based |\n| `agent_uri_update` | ~0.00005 SOL | Tx fee only |\n\n### EVM - L2 Chains (Base, Arbitrum, Optimism)\n\n**Recommended for lowest costs.**\n\n| Operation | Gas | Typical Cost |\n|-----------|-----|--------------|\n| `agent_register` | 150-200k | $0.01-0.50 |\n| `feedback_give` | 100k | $0.01-0.30 |\n| `feedback_response_append` | 60k | $0.01-0.20 |\n| `agent_uri_update` | 50k | $0.01-0.15 |\n\n### EVM - Ethereum Mainnet\n\n**High variability - gas spikes during congestion.**\n\n| Operation | Gas | Cost (25-100 gwei) |\n|-----------|-----|--------------------|\n| `agent_register` | 150-200k | $10-60 |\n| `feedback_give` | 100k | $7-30 |\n| `feedback_response_append` | 60k | $4-18 |\n| `agent_uri_update` | 50k | $3-15 |\n\n**Tip:** Use L2 chains (Base, Arbitrum) for 10-100x lower costs than Ethereum mainnet.\n\n---\n\n## Dry-Run Mode (skipSend)\n\nTest write operations without funds or broadcasting:\n\n```typescript\n// Returns unsigned transaction, no funds needed\nconst preview = await client.callTool({ name: 'feedback_give', arguments: {\n  id: 'sol:HHCVWcqs...',\n  value: 85,\n  tag1: 'uptime',\n  skipSend: true  // Dry-run\n}});\n// preview.content[0].text contains: { unsigned: true, transaction: \"base64...\", message: \"...\" }\n```\n\nSupported on: `feedback_give`, `agent_register`, `agent_transfer`, `agent_uri_update`, `feedback_revoke`, `solana_validation_request`, `solana_validation_respond`\n\n---\n\n## Network Configuration\n\n```typescript\n// Check current network\nawait client.callTool({ name: 'network_get', arguments: {} });\n\n// Switch to mainnet\nawait client.callTool({ name: 'network_set', arguments: { mode: 'mainnet' } });\n\n// Switch to testnet (default)\nawait client.callTool({ name: 'network_set', arguments: { mode: 'testnet' } });\n```\n\n| Network | Solana | Ethereum | Base |\n|---------|--------|----------|------|\n| testnet | devnet | Sepolia (11155111) | Base Sepolia (84532) |\n| mainnet | mainnet-beta | Mainnet (1) | Base (8453) |\n\n---\n\n## x402 Protocol\n\nPayment-linked reputation.\n\n```typescript\n// 1. Build identity for 402 response\nconst identity = await client.callTool({ name: 'x402_identity_build', arguments: {\n  agentId: 'sol:HHCVWcqs...'\n}});\n\n// 2. Parse payment proof from response header\nconst proof = await client.callTool({ name: 'x402_proof_parse', arguments: {\n  paymentResponse: 'base64-encoded-header...'\n}});\n\n// 3. Submit feedback with proof\nawait client.callTool({ name: 'x402_feedback_submit', arguments: {\n  agentId: 'sol:HHCVWcqs...',\n  value: 90,\n  tag1: 'x402-resource-delivered',\n  tag2: 'exact-svm',\n  proofOfPayment: proof.proofOfPayment\n}});\n```\n\n---\n\n## Error Codes\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| `STORE_LOCKED` | Write op without unlock | Call `wallet_store_unlock` with master password |\n| `STORE_NOT_INITIALIZED` | No wallet store | Call `wallet_store_init` first |\n| `INVALID_PASSWORD` | Wrong master password | Check password (cannot recover if lost) |\n| `AGENT_NOT_FOUND` | Invalid ID | Verify global ID format |\n| `INSUFFICIENT_BALANCE` | Wallet empty | Fund wallet address |\n| `PROVIDER_NOT_AVAILABLE` | Chain not initialized | Check `network_get` |\n\n---\n\n## OASF Standards\n\n```typescript\n// List valid skill slugs\nawait client.callTool({ name: 'oasf_list_skills', arguments: {} });\n\n// List valid domain slugs\nawait client.callTool({ name: 'oasf_list_domains', arguments: {} });\n\n// List feedback tags\nawait client.callTool({ name: 'oasf_list_tags', arguments: {} });\n```\n\n---\n\n## All Tools Reference\n\n### Agent Operations\n- `agent_get` - Get agent by ID\n- `agent_exists` - Check existence\n- `agent_search` - Search with filters\n- `agent_list_by_owner` - List by owner address\n- `agent_register` - Register new agent (write)\n- `agent_transfer` - Transfer ownership (write)\n- `agent_uri_update` - Update metadata URI (write)\n- `agent_metadata_set` - Set on-chain metadata (Solana, write)\n\n### Feedback Operations\n- `feedback_give` - Submit feedback (write)\n- `feedback_read` - Read single feedback\n- `feedback_list` - List feedbacks\n- `feedback_revoke` - Revoke feedback (write)\n- `feedback_response_append` - Respond to feedback (write)\n\n### Reputation Operations\n- `reputation_get` - Get summary\n- `leaderboard_get` - Top agents\n\n### Collection Operations\n- `collection_get` - Get collection details\n- `collection_list` - List collections\n- `collection_agents` - List agents in collection\n- `collection_base_get` - Get base registry\n- `collection_create` - Create collection (Solana, write)\n- `collection_uri_update` - Update collection URI (Solana, write)\n\n### Wallet Store (Master Password)\n- `wallet_store_init` - Initialize store with master password\n- `wallet_store_unlock` - Unlock all wallets with master password\n- `wallet_store_lock` - Lock store (secure wipe)\n- `wallet_store_status` - Get store status\n- `wallet_store_change_password` - Change master password\n- `wallet_store_migrate` - Migrate legacy wallets\n\n### Wallet Operations\n- `wallet_list` - List wallets in store\n- `wallet_info` - Wallet details\n- `wallet_create` - Create new wallet (requires unlocked store)\n- `wallet_import` - Import private key (requires unlocked store)\n- `wallet_delete` - Delete wallet (requires unlocked store)\n- `wallet_security` - Configure auto-lock timeout\n\n### Cache Operations\n- `cache_search` - Fast FTS5 search\n- `cache_refresh` - Force refresh\n- `cache_stats` - Cache statistics\n- `cache_sync_status` - Sync status\n\n### Solana-Specific\n- `solana_atom_stats_get` - ATOM metrics\n- `solana_atom_stats_initialize` - Init ATOM account (write)\n- `solana_trust_tier_get` - Trust tier\n- `solana_enriched_summary_get` - Combined metrics\n- `solana_agent_wallet_get` - Get operational wallet\n- `solana_sign` - Sign with agent wallet\n- `solana_verify` - Verify signature\n- `solana_validation_request` - Request validation (write)\n- `solana_validation_respond` - Respond to validation (write)\n- `solana_validation_read` - Read validation\n- `solana_validation_wait` - Wait for response\n- `solana_validation_pending_get` - Pending validations\n- `solana_integrity_verify` - O(1) integrity check\n- `solana_integrity_verify_deep` - Deep verification\n\n### EVM-Specific\n- `evm_agent_wallet_set` - Set operational wallet (write)\n- `evm_agent_wallet_unset` - Remove operational wallet (write)\n\n### x402 Protocol\n- `x402_identity_build` - Build agent identity\n- `x402_proof_parse` - Parse payment proof\n- `x402_feedback_build` - Build feedback file\n- `x402_feedback_submit` - Submit with proof (write)\n\n### Configuration & Health\n- `config_get` - Current config\n- `config_set` - Update config\n- `config_reset` - Reset to defaults\n- `network_get` - Network status\n- `network_set` - Switch network\n- `health_check` - System health (server, chains, wallet store, cache)\n- `faucet_info` - Testnet faucet URLs and funding info\n\n### OASF Standards\n- `oasf_list_skills` - Valid skill slugs\n- `oasf_list_domains` - Valid domain slugs\n- `oasf_list_tags` - Feedback tags\n- `oasf_validate_skill` - Validate skill\n- `oasf_validate_domain` - Validate domain\n- `oasf_validate_tag` - Validate tag\n\n### Crawler\n- `crawler_fetch_mcp` - Fetch MCP capabilities\n- `crawler_fetch_a2a` - Fetch A2A agent card\n- `crawler_is_alive` - Health check\n\n### IPFS (Configured by default)\n- `ipfs_configure` - Override default IPFS/Pinata settings (optional)\n- `ipfs_add_json` - Store JSON (max 1MB)\n- `ipfs_add_registration` - Store registration file\n- `ipfs_get_registration` - Retrieve registration\n\n> Note: IPFS is pre-configured with a shared Pinata account. No setup required for basic usage.\n\n---\n\n## Claude Code Integration\n\n> This section is for Claude Code / AI assistants using 8004-MCP tools.\n\n### Intent Mapping\n\n| User Says | Tool | Notes |\n|-----------|------|-------|\n| \"find agents\", \"search for X\" | `agent_search` or `cache_search` | Use `cache_search` for partial names |\n| \"agent details\", \"info on X\" | `agent_get` | Pass global ID |\n| \"is X reliable?\", \"reputation\" | `reputation_get` | Returns score + trust tier |\n| \"top agents\", \"best agents\" | `leaderboard_get` | Chain optional |\n| \"reviews for X\", \"feedback\" | `feedback_list` | |\n| \"my wallets\" | `wallet_list` | |\n| \"switch to mainnet\" | `network_set` | `mode: 'mainnet'` |\n| \"OASF skills/domains/tags\" | `oasf_list_*` | |\n\n### DO NOT use web search for:\n- Agent registry queries (use 8004 tools)\n- Reputation/feedback lookups\n- OASF standards\n- x402 protocol\n\n### Search Strategy\n1. **Exact name known** → `agent_search` with `nameQuery`\n2. **Partial name** → `cache_search` (fuzzy FTS5)\n3. **By capabilities** → `agent_search` with `hasMcp`, `hasA2a`, `mcpTools`, etc.\n4. **By owner** → `agent_search` with `owner`\n\n### Write Operation Flow\n1. Check `wallet_store_status` - is store initialized and unlocked?\n2. If not initialized: `wallet_store_init` (save master password!)\n3. If locked: `wallet_store_unlock` with master password\n4. If no wallet: `wallet_create` for needed chain\n5. Execute write operation\n6. Report transaction hash on success\n","tags":{"latest":"0.2.3"},"stats":{"comments":0,"downloads":2169,"installsAllTime":82,"installsCurrent":2,"stars":0,"versions":1},"createdAt":1770127406143,"updatedAt":1779076608728},"latestVersion":{"version":"0.2.3","createdAt":1770127406143,"changelog":"Version 0.2.3 of 8004-mcp\n\n- Added detailed onboarding instructions, including first-time setup, wallet encryption, and funding guidance.\n- Expanded documentation for all core read and write operations, with example code for each.\n- Clarified error cases and troubleshooting steps for common issues (e.g., locked store, insufficient funds).\n- Documented global agent ID formats across supported chains (Solana, Ethereum, Base).\n- Updated cost estimates for on-chain operations on Solana and EVM networks.","license":null},"metadata":null,"owner":{"handle":"montecrypto999","userId":"s17e174tc9523fwr9r72hmh2qn884nsp","displayName":"MonteCrypto","image":"https://avatars.githubusercontent.com/u/58423789?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779943696033}}