# SmartChatAI MCP

> SmartChatAI connects any AI agent client (Claude, Cursor, etc.) directly to your chatbot infrastructure. It lets you manage multiple bots, update their knowledge bases with PDFs, URLs, or text, and retrieve detailed chat history—all without leaving your terminal.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** chatbot-orchestration, knowledge-base, lead-collection, conversational-ai, automated-support

## Description

Listen up. This server connects your AI agent client—whether it's Claude or Cursor—directly into your entire chatbot infrastructure. You get full control over managing multiple bots and feeding them knowledge bases with PDFs, URLs, or just plain text. Everything runs without you having to leave your terminal.

**Managing Your Bots’ Status and Setup**

You can figure out exactly what bots you've got running right now by calling `list_ai_chatbots`. That tool gives you a roster of every active chatbot account managed through the SmartChatAI dashboard. If you need deep details on one specific bot, use `get_chatbot_details`; it pulls up all the configuration settings for that single instance. Need to set up a new agent? You can provision one with minimal boilerplate code using `create_new_ai_bot`, where you just name the bot and give it an initial prompt if you want. For security and identity checks, run `get_authenticated_user_profile` to grab the profile info tied to your API key.

**Feeding Your Bots Knowledge Bases**

The bots are only as good as the data you feed 'em. This server lets you train them on diverse sources. If you've got a stack of PDF documents, use `add_pdf_to_knowledge_base` to index that content immediately. For specific facts or guidelines written out plain text, just pass those strings into `add_text_to_knowledge_base` so the bot learns off 'em. When your knowledge comes from an entire website, you don't have to crawl it yourself; use `add_website_to_knowledge_base` and drop in the URL to index the whole thing. If you need to keep tracking external links on a site before ingesting them all at once, run `scrape_domain_links` against a domain to scan and index every link found there.

**Handling Conversations and Monitoring Activity**

You can simulate user conversations by sending an immediate message to any bot using `message_ai_chatbot`. This sends the prompt and gives you the AI's generated reply right back. To audit performance or extract data for training, you pull the entire chat history with `get_bot_chat_history`; this tool retrieves the complete record of messages sent and received for any specific chatbot flow. For monitoring how your bots connect to other systems, run `list_configured_webhooks` to see a list of all webhooks set up for bot activity tracking. You can also check system integrity anytime you need by running `check_api_health`, which verifies the SmartChatAI API is up and available to talk with.

**A quick rundown on what's happening:**

*   **Getting a Roster:** Start by listing all bots using `list_ai_chatbots`. Then, pick one and use `get_chatbot_details` for the nitty-gritty setup info. If you need an agent that doesn't exist yet, run `create_new_ai_bot` to spin up a fresh instance.
*   **Ingesting Data:** Don't forget your sources. PDFs get indexed with `add_pdf_to_knowledge_base`. Raw text goes through `add_text_to_knowledge_base`. Whole sites are handled by `add_website_to_knowledge_base`, or you can pre-scan a domain first using `scrape_domain_links`.
*   **Talking to the Bots:** To test it out, send a prompt and get an immediate response with `message_ai_chatbot`. If you need proof of what was said, pull all the transcripts via `get_bot_chat_history`. The system health check (`check_api_health`) keeps everything running smoothly.

## Tools

### add_pdf_to_knowledge_base
Indexes a chatbot's knowledge base by processing uploaded PDF documents.

### add_text_to_knowledge_base
Trains a bot on specific information provided as raw text strings.

### add_website_to_knowledge_base
Ingests and indexes content from an entire website URL for the chatbot's knowledge base.

### check_api_health
Verifies that the SmartChatAI API is operational and available to connect with.

### create_new_ai_bot
Provisions a new, blank AI agent instance using a specified name and optional initial prompt.

### get_chatbot_details
Retrieves detailed configuration settings for one specific AI bot instance.

### get_bot_chat_history
Pulls the complete record of a chatbot's conversations, including messages sent and received.

### get_authenticated_user_profile
Retrieves the profile information for the account linked to the API key.

### list_ai_chatbots
Lists all managed and active chatbot accounts connected to your SmartChatAI dashboard.

### list_configured_webhooks
Displays a list of all webhooks currently set up for bot activity monitoring.

### scrape_domain_links
Scans a domain and indexes all discovered links for future content ingestion.

### message_ai_chatbot
Sends an immediate message to a chatbot and returns the AI's generated reply.

## Prompt Examples

**Prompt:** 
```
List all active AI bots in my SmartChatAI account.
```

**Response:** 
```
I've retrieved your bots. You have 3 active bots online: 'Customer Support Lead', 'Sales Assistant', and 'FAQ Guide'. Which one would you like to update?
```

**Prompt:** 
```
Show me all active chatbot conversations with their resolution rates and average response times.
```

**Response:** 
```
45 active conversations across 3 chatbot flows. "Customer Support" (28 active): Resolution rate 84%, avg response 1.2s, 23 resolved without agent handoff. "Sales Assistant" (12 active): 67% lead qualification rate, avg 1.8s. "FAQ Bot" (5 active): 92% answer accuracy. Today's totals: 234 conversations completed, 12 escalated to human agents (5.1%), customer satisfaction: 4.6/5. Peak hour: 2-3 PM (45 concurrent chats). Most asked topic: "pricing plans" (34 times).
```

**Prompt:** 
```
Train the chatbot with 10 new FAQ entries about our refund and return policies.
```

**Response:** 
```
10 FAQ entries added to knowledge base. Topics: refund eligibility (30-day window), return shipping process, exchange policy, digital product refunds, partial refund scenarios, international returns, defective item procedure, refund processing time (5-7 business days), gift return policy, subscription cancellation refunds. Training status: complete. Confidence score improvement: FAQ accuracy expected to increase from 89% to 95% on refund topics. 234 existing intents re-evaluated. No conflicts detected.
```

## Capabilities

### List and check bot status
Get a roster of every AI chatbot you run, along with detailed metadata for each one.

### Train on diverse data types
Feed your bots knowledge using PDFs, raw text blocks, or entire website URLs.

### Send messages and track replies
Simulate user conversations by sending a prompt to an active bot and capturing the AI's response.

### Retrieve full chat transcripts
Pull complete conversation logs for any specific chatbot flow, useful for auditing or training data extraction.

### Provision new bots
Create and set up a brand-new AI agent with minimal boilerplate code.

## Use Cases

### Onboarding a new product guide
The PM writes, 'Our sales bot needs to know about the Q3 pricing change.' Instead of manually uploading 50 pages into the CMS, they run `add_pdf_to_knowledge_base` with the PDF. The agent confirms successful ingestion and updates the bot's knowledge instantly.

### Investigating a customer complaint
A support rep gets an angry ticket. They ask their agent to pull the full record using `get_bot_chat_history` for that user ID. The agent returns the entire transcript, showing exactly where the bot failed and what information was missing.

### Scaling content updates
The marketing team just updated 20 blog posts on their site. Instead of updating each one individually, they use `add_website_to_knowledge_base` with the main blog URL. The bot now has access to all 20 new articles immediately.

### Checking system readiness
Before a major product launch, the DevOps team runs `check_api_health` and then uses `list_configured_webhooks`. This confirms both the platform is live and that all downstream systems are listening for bot actions.

## Benefits

- Update knowledge bases without context switching. Instead of logging into a separate CMS to update FAQs, call `add_pdf_to_knowledge_base` directly within your agent workflow.
- Centralized bot oversight. Use `list_ai_chatbots` and `get_chatbot_details` to see the status and config of every single bot you run, eliminating manual dashboard checks.
- Full conversational audit trail. Never lose a detail. Run `get_bot_chat_history` to pull transcripts instantly, which is critical for quality assurance or legal review.
- Dynamic data sourcing. Don't rely on static manuals. Use `add_website_to_knowledge_base` to automatically feed your bots the latest product pages as they go live.
- Quick testing and debugging. Need to know if a bot can answer a question? Just run `message_ai_chatbot`. You get an immediate, repeatable response without building a UI.

## How It Works

The bottom line is you run your entire bot operation—setup, training, messaging, and monitoring—from one command interface.

1. Subscribe to the server, then plug in your SmartChatAI API key into your client.
2. Use an action like `list_ai_chatbots` to see what bots are running. Then, if a bot needs new info, call `add_pdf_to_knowledge_base` with the relevant file path.
3. Your AI agent runs these tools in sequence, updating the knowledge base and ensuring the chatbot uses the latest context for responses.

## Frequently Asked Questions

**How do I train my chatbot with PDFs using add_pdf_to_knowledge_base?**
You pass the local file path to `add_pdf_to_knowledge_base`. The tool processes the document and makes its contents available as context for all subsequent bot interactions.

**Can I list all my bots at once using list_ai_chatbots?**
Yes. Running `list_ai_chatbots` returns a roster of every managed bot ID and its basic metadata, letting you know what's active on the platform.

**What is the difference between add_website_to_knowledge_base and scrape_domain_links?**
These tools serve different purposes. `scrape_domain_links` just discovers links across a domain, while `add_website_to_knowledge_base` ingests the *content* from one specific URL to train the bot.

**How do I test if my API keys are working?**
Run `check_api_health`. This confirms that your connection and credentials are valid before you try to perform any complex operations like sending messages or adding knowledge.

**How do I provision a new AI bot using `create_new_ai_bot`?**
You call `create_new_ai_bot(name, initial_prompt)` to set up the agent. This tool immediately registers the bot and provides you with its unique ID for subsequent configuration and testing.

**How do I retrieve full conversation transcripts using `get_bot_chat_history`?**
The tool pulls complete chat logs by requiring the bot ID and date range. You use this data to conduct performance audits or meet compliance requirements, giving you a detailed record of every interaction.

**Where do I check my active external alerts with `list_configured_webhooks`?**
The tool lists all currently configured webhook URLs and their trigger conditions. Check this list to confirm that your external systems are set up correctly to receive real-time data when bot events occur.

**When should I use `add_text_to_knowledge_base` instead of a PDF?**
Use this tool when your source material is plain, extracted text (like copy-pasted articles). It’s the most direct way to ingest content and avoids needing to process specific file formats.

**How do I find my SmartChatAI API Key?**
Log in to your SmartChatAI dashboard and you will find your unique secret API Key in the Settings or account management section.