Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
},
"contextual": {
"options": [
"chatgpt",
"claude",
"cursor",
"chatgpt",
"vscode",
"perplexity",
"mcp",
Expand Down
207 changes: 129 additions & 78 deletions mcp-server.mdx
Original file line number Diff line number Diff line change
@@ -1,89 +1,140 @@
---
title: "MCP Server"
description: "Connect AI tools like Claude and Cursor to CometChat documentation with the MCP server to improve integration speed and developer productivity."
canonical: "https://www.cometchat.com/docs/mcp"
title: "Use CometChat with AI Coding Agents (MCP)"
sidebarTitle: "MCP Integration"
description: "Connect CometChat to Claude, Cursor, Windsurf, VS Code, and any other Model Context Protocol–compatible agent. Search docs, fetch reference pages, and pull implementation bundles from inside the conversation."
canonical: "https://www.cometchat.com/docs/mcp-server"
---

## Using the CometChat MCP Server
The **CometChat MCP server** lets Claude, Cursor, Windsurf, VS Code, and any
other Model Context Protocol–compatible agent integrate CometChat into your
app from natural-language prompts. Ask the agent to *"add a chat tab where
users can DM each other"* and it uses the MCP to read CometChat's docs,
pick the right components for your stack, and write the integration code.

### Claude
The server is **read-only** and **needs no account or API key** — it surfaces
CometChat's public documentation and curated implementation recipes.

1. **Add MCP server to Claude**
1. Navigate to the [Connectors](https://claude.ai) page in Claude’s settings.
2. Select **Add custom connector**, name it e.g. `CometChat Docs`, and enter the URL:
```
https://www.cometchat.com/docs/mcp
```
3. Click **Add**.
2. **Query with context**
1. In Claude, click the attachments (➕) button.
2. Select **CometChat Docs**.
3. Ask your questions—Claude will use your CometChat docs as context.
## Connector URL

```
https://mcp.cometchat.com/mcp
```

Transport: HTTP with Server-Sent Events. No authentication required.

## Connect from your agent

### Claude (Desktop or claude.ai)

1. Open **Settings → Connectors**.
2. Click **Add custom connector**.
3. Name it `CometChat`, paste the URL `https://mcp.cometchat.com/mcp`, and click **Add**.
4. In a new conversation, attach **CometChat** from the connectors picker and prompt away.

### Cursor

1. **Open MCP settings**
- Press `Cmd+Shift+P` (macOS) / `Ctrl+Shift+P` (Windows) → **Open MCP settings**.
- Select **Add custom MCP** to open your `mcp.json`.
2. **Configure**
```json
{
"mcpServers": {
"cometchat-docs": {
"url": "https://www.cometchat.com/docs/mcp"
}
}
}
```
3. **Verify**
- In Cursor’s chat, ask:
> “How do I integrate CometChat in my React app?”

{/* ### Lovable.dev

1. **Open your Lovable project**
- Log in at [Lovable.dev](https://lovable.dev) and select your project.
2. **Add a custom MCP server**
- Go to **Settings** → **Developer Tools** → **MCP Servers**.
- Click **Add custom server**, then:
- **Name:** `CometChat Docs`
- **URL:** `https://www.cometchat.com/docs/mcp`
- Click **Save**.
3. **Use the tools**
- Invoke the CometChat tools in your conversations with Lovable’s AI assistant. */}
1. `Cmd+Shift+P` (macOS) / `Ctrl+Shift+P` (Windows) → **Open MCP settings**.
2. Click **Add custom MCP** and paste:

```json
{
"mcpServers": {
"cometchat": {
"url": "https://mcp.cometchat.com/mcp"
}
}
}
```

### Windsurf

1. **Open Windsurf**
- Launch Windsurf and click the **Plugins** (hammer) icon.
2. **Add or configure**
- In **Manage plugins**, click **Add Custom Server +** or **View raw config**.
- Paste the following into your `mcp_config.json`:
```json
{
"mcpServers": {
"cometchat-docs": {
"type": "sse",
"serverUrl": "https://www.cometchat.com/docs/mcp"
}
}
}
```
- Save and click **Refresh**.
3. **Invoke within Windsurf**
- In the Composer, ask prompts like:
> “Show me how to use CometChat in my app.”

### Visual Studio Code

1. **Prerequisites**
- Latest VS Code with Copilot (agent mode) enabled.
2. **Add the server**
- `Cmd+Shift+P` (macOS) / `Ctrl+Shift+P` (Windows) → **MCP: Add MCP Server**.
- Enter:
- **Server Name:** `CometChat Docs`
- **Server URL:** `https://www.cometchat.com/docs/mcp`
- **Transport:** `SSE` (or HTTP stream)
- Confirm.
3. **Use in Copilot agent**
- In a Copilot chat session, your CometChat tools will now be listed and available.
1. Click the **Plugins** (hammer) icon → **Manage plugins** → **View raw config**.
2. Paste:

```json
{
"mcpServers": {
"cometchat": {
"type": "sse",
"serverUrl": "https://mcp.cometchat.com/mcp"
}
}
}
```

3. Save and click **Refresh**.

### Visual Studio Code (Copilot Agent)

1. `Cmd+Shift+P` / `Ctrl+Shift+P` → **MCP: Add MCP Server**.
2. Enter:
- **Server Name:** `CometChat`
- **Server URL:** `https://mcp.cometchat.com/mcp`
- **Transport:** SSE
3. Confirm.

## Example prompts

Once connected, try these in a fresh agent conversation:

- *"Add a chat tab where users can DM each other in my React app."*
- *"Let project members talk in a group chat with file sharing."*
- *"Add video calling between two users with a click-to-call button."*
- *"Set up content moderation so banned words are blocked before delivery."*
- *"Build a multi-tenant SaaS chat where each workspace's users are isolated."*
- *"Add presence indicators and typing dots to my conversation list."*

The agent will search the docs, pull the matching implementation bundle,
and write the code into your project.

## What the connector exposes

### Three tools (all read-only)

<CardGroup cols={3}>
<Card title="search_cometchat_docs" icon="magnifying-glass">
Search SDK guides, UI Kit references, REST API docs, and OpenAPI
specs. Returns ranked snippets with direct links.
</Card>
<Card title="fetch_cometchat_doc_page" icon="file-lines">
Fetch the full content of any documentation page as markdown by URL
or relative path.
</Card>
<Card title="get_cometchat_implementation_bundle" icon="box-open">
Return a curated implementation recipe — prerequisites, install,
configuration, working code — for a named scenario.
</Card>
</CardGroup>

### Ten curated implementation bundles

| Bundle | What it covers |
| --- | --- |
| `react-uikit-quickstart` | React UI Kit install, init, login, conversations list, chat window |
| `react-native-uikit-quickstart` | React Native UI Kit install, navigation, basic chat screen |
| `flutter-uikit-quickstart` | Flutter UI Kit install, init, login, basic chat |
| `ios-uikit-quickstart` | iOS UI Kit (SwiftUI) install, init, login, chat view |
| `android-uikit-quickstart` | Android UI Kit (Compose) install, init, login, chat screen |
| `js-sdk-messaging-basics` | Vanilla JS SDK install, send/receive text and media messages |
| `widget-embed` | No-code widget embed for an existing site |
| `moderation-setup` | AI moderation, profanity filter, image moderation, webhooks |
| `multi-tenant-chat` | Multi-tenant SaaS chat — auth, isolation, tenant-scoped users |
| `presence-and-typing` | Online presence, typing indicators, read receipts |

### Orientation skill resource

The MCP also exposes a `cometchat://skills/overview` resource — a structured
markdown document the agent reads once to orient itself on CometChat's
products, decision tree, and common pitfalls.

## Source

The MCP server is open-source at
[`github.com/cometchat/cometchat-mcp`](https://github.com/cometchat/docs-mcp).
Built from this very documentation repository, so the content it surfaces
is always in sync with what you see on the docs site.

## Support

Questions, feedback, or feature requests: open an issue on the
[GitHub repository](https://github.com/cometchat/docs-mcp/issues)