digitalocean-mcp-chatbot-sdk
Version:
React SDK for Digitalocean MCP Chatbot integration
80 lines (52 loc) • 1.51 kB
Markdown
# Digitalocean MCP Chatbot SDK
React-based embeddable chatbot widget for Digitalocean MCP chatbot.
## Installation
```
npm install digitalocean-mcp-chatbot-sdk
```
## Usage
```
import MCPChatbot from 'digitalocean-mcp-chatbot-sdk';
```
## Props
| Prop | Type | Description |
|---------------------|---------|------------------------------------------|
| `apiUrl` | string | URL to your `/chat` POST API endpoint |
| `position` | string | One of `"bottom-right"`, `"bottom-left"`, `"top-right"`, `"top-left"` |
| `title` | string | Title in chat window |
| `placeholder` | string | Input box placeholder |
| `toggleButtonLabel` | string | Label for toggle button |
```
## 🚀 Build and Publish
1. **Install dependencies**:
```bash
npm install
```
2. **Build the package**:
```bash
npm run build
```
3. **Login to npm** (if not already):
```bash
npm login
```
4. **Publish to npm**:
```bash
npm publish --access public
```
## ✅ After Publishing
People can use your package like:
```bash
npm install digitalocean-mcp-chatbot-sdk
```
And in their apps:
```jsx
import MCPChatbot from 'digitalocean-mcp-chatbot-sdk';
function MyApp() {
return ;
}
```
## 🧠 Bonus: Add Build Badge to README
```md
[](https://badge.fury.io/js/digitalocean-mcp-chatbot-sdk)
```