# BotMape — how to use (mcp.ai)

Connect your BotMape account and use 8 tools for AI chatbots straight from your AI agent. Connect with your own API key. BotMape provides APIs for creating and managing AI agents, knowledge bases, conversations, messages, and usage analytics.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_botmape?ms=1787291220000`
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. `botmape_add_knowledge`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/botmape`
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/botmape/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/botmape/add/knowledge` — Add and automatically embed training content in one AI agent's knowledge base, optionally with source or categorization metadata.
  - body: { content: string, metadata?: object, ai_agent_id: integer }
- `POST https://api.mcp.ai/api/botmape/create/ai/agent` — Permanently create a BotMape AI agent. BotMape provides no documented delete-agent API, so this toolkit cannot remove it afterward, and creation may permanently consume a plan-limited agent slot. Requ
  - body: { name: string, description?: string, primary_color?: string, system_prompt?: string, welcome_message?: string, confirm_permanent_creation: boolean }
- `POST https://api.mcp.ai/api/botmape/delete/knowledge/entry` — Permanently delete one knowledge-base entry from an AI agent using both the agent ID and knowledge entry ID.
  - body: { ai_agent_id: integer, knowledge_entry_id: integer }
- `POST https://api.mcp.ai/api/botmape/get/ai/agent` — Return the detailed configuration, behavior prompt, appearance, and active state of one AI agent by ID.
  - body: { ai_agent_id: integer }
- `POST https://api.mcp.ai/api/botmape/get/platform/analytics` — Return account-wide BotMape message and conversation totals, daily activity, averages, and per-agent statistics.
- `POST https://api.mcp.ai/api/botmape/list/ai/agents` — Return all AI agents owned by the connected BotMape account, including the IDs needed by single-agent, chat, and knowledge tools.
- `POST https://api.mcp.ai/api/botmape/list/knowledge/entries` — Return all knowledge-base entries currently attached to one AI agent, including entry IDs needed for deletion.
  - body: { ai_agent_id: integer }
- `POST https://api.mcp.ai/api/botmape/send/message/to/ai/agent` — Immediately send a visitor message to an AI agent, creating a conversation or continuing the supplied conversation, and return the generated reply. This permanently adds chat history.
  - body: { message: string, visitor_id?: string, ai_agent_id: integer, visitor_name?: string, visitor_email?: string, conversation_id?: string }

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

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