Skip to main content

ATXP CLI

The ATXP CLI is a command-line tool that helps you create ATXP projects, run demos, and manage your ATXP development workflow. It provides a streamlined way to bootstrap new projects and explore ATXP functionality.

Installation

The recommended way to use the ATXP CLI is to run it directly using npx atxp. As an alternative, you can install the ATXP CLI globally using npm:
npm install -g atxp
Verify installation by running atxp help to confirm the CLI is properly installed.

Quickstart

Run a demo

Run a demo ATXP project in seconds.
npx atxp demo

Create a new project

The ATXP CLI offers several project templates to get you started quickly:
Perfect for building AI agents that use paid MCP tools.Features:
  • Pre-configured ATXP client
  • Example agent implementation
  • Wallet integration setup
  • MCP server connection examples
Usage:
npx atxp create my-agent --template agent

Available commands

atxp create <project-name>

Creates a new ATXP project with a complete development setup.
project-name
string
required
The name of your new ATXP project. This will be used as the directory name and package name.
Example:
npx atxp create my-agent --template agent
What it creates:
  • Project directory with your specified name
  • package.json with ATXP dependencies
  • Basic project structure for agents or servers
  • Configuration files for development
  • Example code to get you started

atxp demo

Runs interactive demos to showcase ATXP functionality. Available demos:
  • Agent demo: Shows how to connect an agent to paid MCP servers
  • Server demo: Demonstrates creating a monetized MCP server
  • Payment flow: Interactive walkthrough of ATXP payment processing
Example:
npx atxp demo
1

Select demo type

Choose from available demo options when prompted.
2

Follow interactive prompts

The CLI will guide you through each step of the demo.
3

View results

See ATXP in action with real examples and outputs.

atxp help

Display help information and available commands.
npx atxp help

atxp agent create

Create a new agent account under your developer account. Requires login (npx atxp login). Each agent receives:
  • A unique email address ({agentId}@atxp.email)
  • An Ethereum wallet
  • 10 IOU tokens to start
  • A connection token for SDK/CLI access
npx atxp agent create
After creation, authenticate as the agent using its connection token:
CONNECTION_TOKEN=<agent_token> npx atxp email inbox

atxp agent list

List all agents you’ve created, with their email, account ID, connection token, wallet address, balance, and creation date.
npx atxp agent list

atxp agent register

Self-register as an agent without requiring a human developer’s login. Uses a two-step challenge/verify flow designed for AI agents.
1

Fetch a challenge

Run the register command to receive an obfuscated math challenge from the server:
npx atxp agent register
The CLI displays the challenge, instructions, and a registration ID.
2

Solve and submit the answer

You can answer interactively at the prompt, or resume in a separate invocation using --registration-id and --answer:
npx atxp agent register --registration-id reg_xxx --answer "535.00"
3

Use your new account

On success, the CLI prints your agent’s connection token, email, wallet address, and connection string. Authenticate as the agent:
npx atxp login --token "<connection_string>"
Options:
FlagDescription
--server <url>Accounts server URL (default: https://accounts.atxp.ai)
--answer <value>Provide the challenge answer non-interactively
--registration-id <id>Resume a previous challenge (skip fetching a new one)
The --registration-id flag allows a two-step flow: fetch the challenge in one invocation, solve it externally, and submit the answer in a separate invocation. Challenges expire after 5 minutes.

Development workflow

1

Create your project

npx atxp create my-project
cd my-project
2

Configure environment

Copy .env.example to .env and fill in your credentials.
Never commit your .env file to version control. Add it to your .gitignore.
3

Install dependencies

npm install
4

Start development server

npm run dev
5

Test your implementation

npm test

Next steps

Support

Need help with the ATXP CLI? Contact support.