A Next.js application that demonstrates AI-powered image generation using the ATXP (Autonomous Transaction Execution Protocol) client. This app provides a simple web interface where users can enter text prompts to generate images using AI.
- 🎨 AI-powered image generation from text prompts
- 🖼️ Real-time image display and preview
- ⚡ Built with Next.js 15 and React 19
- 🎯 TypeScript support
- 💅 Styled with Tailwind CSS
- 🔗 Integration with ATXP MCP server
- Node.js 18+
- npm or yarn
- Base blockchain account with private key
- Access to Base RPC endpoint
Create a .env.local file in the root directory with the following variables:
# Base blockchain RPC endpoint
BASE_RPC=https://mainnet.base.org
# Your Base blockchain private key (with 0x prefix)
BASE_PRIVATE_KEY=0x1234567890abcdef...
# Optional: Custom MCP server endpoint (defaults to https://image.mcp.atxp.ai)
# MCP_SERVER_URL=https://your-custom-server.comImportant:
- Keep your private key secure and never commit it to version control
- Your Base account needs sufficient funds to pay for blockchain transactions
- The private key must include the
0xprefix
-
Clone the repository
-
Install dependencies:
npm install
-
Set up your environment variables in
.env.local -
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
- Frontend: Users enter image generation prompts in a textarea
- API Route: The
/api/atxpendpoint processes requests using the ATXP client - Blockchain Integration: Uses Base blockchain account to authenticate with MCP server
- Image Generation: Calls the
image_create_imagetool via MCP protocol - Display: Generated images are displayed with download links
src/
├── app/
│ ├── api/atxp/
│ │ └── route.ts # ATXP API endpoint
│ ├── layout.tsx # Root layout
│ └── page.tsx # Main application page
└── styles/
└── globals.css # Global styles
- Next.js 15 - React framework with App Router
- React 19 - UI library
- TypeScript - Type safety
- Tailwind CSS - Utility-first CSS framework
- @atxp/client - ATXP protocol client
- Base Blockchain - Layer 2 Ethereum network
- Fork the repository
- Create a feature branch
- Make your changes
- Run linting:
npm run lint - Submit a pull request
This project is private and for testing purposes.
