TypeScriptADK-TS

MCP ATP

Interact with the IQ AI Agent Tokenization Platform to manage AI agent tokens and positions.

Overview

The ATP MCP server connects your agent to the IQ AI Agent Tokenization Platform (ATP). It provides tools to query agent rankings, manage token positions, and interact with the ATP ecosystem programmatically using an API key and a funded wallet.

Getting Started

Install the package:

pnpm add @iqai/mcp-atp

Use the server in your agent:

import { McpAtp } from "@iqai/adk";

const toolset = McpAtp({
  env: {
    ATP_WALLET_PRIVATE_KEY: process.env.ATP_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 IQ AI Agent Tokenization Platform",
  transport: {
    mode: "stdio",
    command: "npx",
    args: ["-y", "@iqai/mcp-atp"],
    env: {
      ATP_WALLET_PRIVATE_KEY: process.env.ATP_WALLET_PRIVATE_KEY,
      ATP_API_KEY: process.env.ATP_API_KEY,
      PATH: process.env.PATH || "",
    },
  },
});

const tools = await toolset.getTools();
{
  "mcpServers": {
    "atp-mcp-server": {
      "command": "npx",
      "args": ["-y", "@iqai/mcp-atp"],
      "env": {
        "ATP_WALLET_PRIVATE_KEY": "your_wallet_private_key",
        "ATP_API_KEY": "your_atp_api_key"
      }
    }
  }
}

Environment Variables

VariableRequiredDescription
ATP_WALLET_PRIVATE_KEYYesPrivate key of the wallet used for ATP transactions
ATP_API_KEYYesYour IQ AI ATP API key

Credentials

To get your ATP credentials:

  1. Sign up at IQ AI
  2. Navigate to your profile page to generate an API Key
  3. Use the private key of the EVM wallet you want to use for ATP transactions

Available Tools

ATP_AGENT_STATS
tokenContract:string

Description

Get statistics and details of a given AI agent on the ATP platform.

ATP_GET_AGENTS
sort:stringlimit:integer

Description

Retrieve a list of AI agents from the ATP platform with optional sorting and limiting.

ATP_GET_AGENT_LOGS
agentTokenContract:stringpage:integerlimit:integer

Description

Retrieve logs for a specific AI agent, with pagination.

ATP_ADD_AGENT_LOG
agentTokenContract:stringcontent:stringtxHash:stringchainId:integer

Description

Add a new log entry for a specific AI agent. Requires API key as a parameter.

ATP_BUY_AGENT
tokenContract:stringamount:string

Description

Buy AI agent tokens using IQ as the base currency.

ATP_SELL_AGENT
tokenContract:stringamount:string

Description

Sell AI agent tokens back to the protocol.

ATP_GET_AGENT_POSITIONS

No parameters

Description

Retrieve the positions of the user's agent tokens.

Integration Example

import { AgentBuilder, McpAtp } from "@iqai/adk";
import * as dotenv from "dotenv";

dotenv.config();

async function main() {
  // Initialize McpAtp toolset
  const toolset = McpAtp({
    env: {
      ATP_WALLET_PRIVATE_KEY: process.env.ATP_WALLET_PRIVATE_KEY,
      ATP_API_KEY: process.env.ATP_API_KEY,
    },
  });

  // Get available McpAtp tools
  const atpTools = await toolset.getTools();

  // Create agent with McpAtp tools
  const { runner } = await AgentBuilder.create("atp_agent")
    .withModel("gemini-2.5-flash")
    .withDescription(
      "An agent that interacts with the IQ AI Agent Tokenization Platform",
    )
    .withTools(...atpTools)
    .build();

  const response = await runner.ask(
    "Show me the top 10 ranked agents on ATP and their recent performance",
  );

  console.log(response);
}

main().catch(console.error);

Further Resources