Ask AI assistant widget for GitBook
Use a Biel.ai AI assistant or AI search widget to answer questions from your published GitBook content on a website you control. You can also connect AI agents through MCP, with or without installing the widget.
Prerequisites
- A Biel.ai account and a project.
- Published GitBook content that Biel.ai can crawl.
- A website that allows custom JavaScript to host the widget.
Add the assistant widget

Host the widget on a separate website. GitBook does not allow this widget to inject JavaScript into a site or space. See GitBook’s integration configuration guide.
- Open your Biel.ai project, select Settings > Sources > URLs, and enter your published GitBook URL. For multiple pages, use a sitemap.
- Click Save, then Refresh sources. Check loading progress and Logs in the project dashboard.
- Install the widget on a site you control using the CDN installation guide. Use the same project's ID from its installation code.
- Publish that page, test a question about your GitBook content, and link to it from your GitBook space.
Add the search widget
Use the same Biel.ai project that indexes your GitBook content. Host the widget on a website that allows custom JavaScript.
-
On the external website hosting your widget, add these assets inside
<head>:<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/biel-search/dist/biel-search/biel-search.css"><script type="module" src="https://cdn.jsdelivr.net/npm/biel-search/dist/biel-search/biel-search.esm.js"></script> -
Add the search button where it should appear on that website:
<biel-search-button project="<YOUR_PROJECT_ID>" button-style="rounded">Search</biel-search-button>Replace
<YOUR_PROJECT_ID>with your project ID. -
Publish the page and link to it from GitBook. Open Search, enter a term from your documentation, and open a result.
Troubleshooting
Custom scripts option not available
Use the external hosting method above. A paid GitBook plan does not enable this widget inside GitBook.
Pages were not indexed
Check Logs and confirm that the published URLs are reachable by Biel.ai. For protected content, see private content.
Assistant not appearing on the external site
Verify that the widget's CSS and JavaScript load and that the project ID matches the installation code.
Connect AI agents with MCP
Let AI tools search and read your indexed documentation. MCP is available on every plan and during your trial.
- In the Biel.ai dashboard, open your project’s Settings > MCP.
- Select Enable MCP server and click Save.
- In the widget, open Connect via MCP using the
<>button. Select your AI client or choose MCP URL to copy the endpoint into its settings.
Without the widget: after enabling MCP, copy MCP endpoint from Settings > MCP and add it to your AI client. No widget installation or website changes are required.
The widget also exposes WebMCP tools to compatible browser agents visiting your site. Use the latest widget release and keep Enable WebMCP selected in Settings > MCP.
Next steps
- Customize the widget's appearance, behavior, and tone.
- Connect integrations like GitHub Actions, MCP, or Zapier.