Skip to main content
You are here: Chatbot

Extend Chatbot with Custom Tools

Overview

Connect your custom MCP (Model Context Protocol) server to the DocsHound chatbot to extend its capabilities with your own tools and workflows. This allows the chatbot to perform actions on behalf of users, such as fetching personalized data or executing operations in your systems.

Getting Started

MCP integration requires activation on your DocsHound account. Before configuring the mcp-token attribute, contact DocsHound support to enable this feature and provide your MCP server URL.

MCP Server Requirements

Your MCP server must meet the following requirements:

  • Transport: SSE (Server-Sent Events)

  • Authentication: JWT Bearer token via the Authorization HTTP header (optional)

User Authentication Flow

When authentication is enabled, DocsHound forwards the user's token to your MCP server, enabling user-specific workflows:

  1. You sign a JWT token with your secret containing user claims (e.g., user ID, email, roles)

  2. Pass this token to the chatbot widget via mcp-token attribute or mcpToken prop

  3. DocsHound forwards the token to your MCP server in the Authorization header with Bearer prefix

  4. Your MCP server validates the token and extracts user claims

  5. MCP tools can now perform user-specific actions (fetch user data, update records, etc.)

Configuration

HTML Snippet

To enable MCP integration with authentication, set the mcp-token attribute in the <docshound-chat> web component:

html
<docshound-chat mcp-token="YOUR_SIGNED_JWT_TOKEN"></docshound-chat>

React Component

For React applications, pass the token via the mcpToken prop:

jsx
<DocsHoundChat mcpToken="YOUR_SIGNED_JWT_TOKEN" />

Parameters

Parameter

Description

Default Value

mcp-token

JWT token signed with your secret for MCP server authentication. Enables user-specific MCP tool workflows.

Undefined

Note: For React components, use mcpToken (camelCase) instead of mcp-token.