> For the complete documentation index, see [llms.txt](https://aicre8.gitbook.io/aicre8.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aicre8.gitbook.io/aicre8.com/developers/rest-api-and-mcp-server.md).

# REST API & MCP Server

Connect AI agents to AICre8 using our REST API or MCP server. Build, edit, and deploy web projects programmatically from Claude Desktop, Cursor, Claude Code, or any MCP-compatible client.

### Authentication

All API requests require a Bearer token. Get your API key from your AICre8 Settings page.

### Base URL

<https://aicre8.dev/api/v1>

### Endpoints

#### List Projects

GET /projects — Returns all your projects with IDs, names, and preview URLs.

#### Create Project

POST /projects — Create a new project. Optional name and access\_type (Public, Private, Link).

#### Generate Code

POST /projects/:id/generate — Send a prompt to generate or modify code using AI. Include a URL in your prompt (e.g. "Build a site like example.com") and AICre8 will scrape the reference site for colors, fonts, and content automatically. Costs 1 credit per call.

#### Read File

GET /projects/:id/files/:path — Read a file from the project sandbox.

#### Write File

PUT /projects/:id/files/:path — Write or update a file in the project sandbox.

#### Run Command

POST /projects/:id/run — Execute a shell command in the sandbox (e.g. npm install).

#### Deploy

POST /projects/:id/deploy — Deploy to a live branded URL (slug.aicre8.app). Pass a map of file paths to contents.

### MCP Server

The AICre8 MCP server connects AI agents like Claude Desktop, Cursor, and Claude Code directly to your AICre8 account. Install with npx — no server to run.

#### Setup for Claude Desktop

Add to your claude\_desktop\_config.json:

#### Setup for Cursor

Add to .cursor/mcp.json in your project.

#### Setup for Claude Code

Run: claude mcp add aicre8 -- npx @aicre8/mcp-server

Set AICRE8\_API\_KEY in your environment.

### Credits and Billing

API and MCP usage deducts from the same credit balance as the AICre8 UI. Each generate\_code call costs 1 credit. The MCP server is free and open-source — billing flows through your AICre8 account.
