# Chatfai — how to use (mcp.ai)

Connect your Chatfai account and use 3 tools for AI chatbots straight from your AI agent. Connect with your own API key. ChatFAI is an AI-powered platform that enables users to engage in interactive conversations with AI-generated versions of their favorite fictional characters from various media.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_chatfai?ms=1787295900000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `chatfai_get_public_character_by_id`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/chatfai`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/chatfai/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/chatfai/get/public/character/by/id` — Tool to retrieve a public character by its ID. Use when you need to fetch details of a single public character by providing its unique ID.
  - body: { id: string }
- `POST https://api.mcp.ai/api/chatfai/list/chatfai/conversations` — Tool to list conversations for the authenticated user. Use when you need to retrieve the user's chat conversations or verify authentication status.
  - body: { limit?: integer, cursor?: string }
- `POST https://api.mcp.ai/api/chatfai/search/characters` — Tool to search for public characters on ChatFAI by name or keyword. Use when you need to find characters matching a specific search query.
  - body: { q: string }

## Example prompts
- "What can I do in Chatfai?"
- "Show me a summary of my Chatfai account"

## More
- Page: https://mcp.ai/chatfai
- Agent spec (llms.txt): https://mcp.ai/chatfai/llms.txt
- Postman collection: https://mcp.ai/chatfai/postman.json
