MCP ATP
Interact with the IQ AI Agent Tokenization Platform
- Package:
@iqai/mcp-atp - Purpose: Interact with the IQ AI Agent Tokenization Platform
- Example: š MCP-ATP Agent Example
Usage with ADK TypeScript
import {McpAtp} from "@iqai/adk";
const toolset = McpAtp({
env: {
ATP_WALLET_PRIVATE_KEY: process.env.WALLET_PRIVATE_KEY,
ATP_API_KEY: process.env.ATP_API_KEY,
},
})
const tools = await toolset.getTools()import {McpToolset} from "@iqai/adk";
const toolset = new McpToolset({
name: "ATP MCP Client",
description: "Client for the @iqai/mcp-atp server",
transport: {
mode: "stdio",
command: "pnpm",
args: ["dlx", "@iqai/mcp-atp"],
env: {
ATP_WALLET_PRIVATE_KEY: process.env.WALLET_PRIVATE_KEY,
ATP_API_KEY: process.env.ATP_API_KEY,
PATH: process.env.PATH || "",
},
},
})
const tools = await toolset.getTools(){
"mcpServers": {
"atp-server": {
"command": "pnpm",
"args": ["dlx", "@iqai/mcp-atp"],
"env": {
"ATP_WALLET_PRIVATE_KEY": "your_wallet_private_key_here",
"ATP_API_KEY": "your_iq_atp_api_key_here"
}
}
}
}Features
- Interact with the IQ AI Agent Tokenization Platform
- Fetch statistics and details for a specific AI agent
- Retrieve the user's current holdings in ATP AI tokens
- Purchase AI agent tokens using IQ as the base currency
- Sell AI agent tokens back to the protocol
- Retrieve logs for a specific AI agent, with pagination
- Add a new log entry for a specific AI agent
Available Tools
ATP_AGENT_STATStokenContract:string
ATP_AGENT_STATSDescription
Get statistics and details of a given AI agent on the ATP platform.
ATP_GET_AGENTSsort:stringlimit:integer
ATP_GET_AGENTSDescription
Retrieve a list of AI agents from the ATP platform with optional sorting and limiting.
ATP_GET_AGENT_LOGSagentTokenContract:stringpage:integerlimit:integer
ATP_GET_AGENT_LOGSDescription
Retrieve logs for a specific AI agent, with pagination.
ATP_ADD_AGENT_LOGagentTokenContract:stringcontent:stringtxHash:stringchainId:integer
ATP_ADD_AGENT_LOGDescription
Add a new log entry for a specific AI agent. Requires API key as a parameter.
ATP_BUY_AGENTtokenContract:stringamount:string
ATP_BUY_AGENTDescription
Buy AI agent tokens using IQ as the base currency.
ATP_SELL_AGENTtokenContract:stringamount:string
ATP_SELL_AGENTDescription
Sell AI agent tokens back to the protocol.
ATP_GET_AGENT_POSITIONSNo parameters
ATP_GET_AGENT_POSITIONSNo parameters
Description
Retrieve the positions of the user's agent tokens.
Environment Variables
ATP_WALLET_PRIVATE_KEY: Required for position and trading operationsATP_API_KEY: Required for certain backend API calls
Usage Examples
- "Add log for agent
0x1234...5678: Just executed weekly yield distribution" - "Create log entry for Frax God: Updated pricing model" (Works only if token contract found in previous messages)
- "Log for agent
0x1234...5678with transaction hash0xabc...def: Distribution complete"
Response Format
Actions return structured responses including:
ā Transaction status & hash (for trades) š ā Formatted token amounts š² ā Error messages when applicable ā ā Agent addresses and statistics š· ā Formatted agent logs š
Error Handling
Error Scenarios
The plugin handles various error scenarios gracefully.
šØ Invalid token contracts šø Insufficient balances š Transaction failures š Network issues š Input validation errors š Missing API key for log creation