Ask AI assistant widget for VuePress
Add an AI assistant or AI search widget to your VuePress documentation using Biel.ai's web components. You can also connect AI agents through MCP, with or without installing the widget.
Prerequisites
- A Biel.ai account.
- A project with indexed content.
- A VuePress site.
- Node.js installed.
Add the assistant widget

For VuePress 2.x
-
Open your VuePress config file (
.vuepress/config.jsor.vuepress/config.ts). -
Add the Biel.ai scripts to the
headconfiguration:import { defineUserConfig } from 'vuepress'export default defineUserConfig({// ... your other confighead: [['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',{},`if (typeof window !== 'undefined') {window.addEventListener('DOMContentLoaded', () => {const button = document.createElement('biel-button');button.setAttribute('project', '<YOUR_PROJECT_ID>');button.setAttribute('header-title', 'Biel.ai assistant');button.setAttribute('button-position', 'bottom-right');button.setAttribute('modal-position', 'bottom-right');button.setAttribute('button-style', 'dark');button.textContent = 'Ask AI';document.body.appendChild(button);});}`]]})Replace
<YOUR_PROJECT_ID>with your project's ID from the Biel.ai dashboard. -
Start your VuePress development server:
npm run docs:dev -
Open your documentation and send a test question.
For VuePress 1.x
-
Open your VuePress config file (
.vuepress/config.js). -
Add the following to your config:
module.exports = {// ... your other confighead: [['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',{},`window.addEventListener('DOMContentLoaded', function() {var button = document.createElement('biel-button');button.setAttribute('project', '<YOUR_PROJECT_ID>');button.setAttribute('header-title', 'Biel.ai assistant');button.setAttribute('button-position', 'bottom-right');button.setAttribute('modal-position', 'bottom-right');button.setAttribute('button-style', 'dark');button.textContent = 'Ask AI';document.body.appendChild(button);});`]]}Replace
<YOUR_PROJECT_ID>with your project's ID from the Biel.ai dashboard. -
Start your VuePress development server:
npm run docs:dev
Add the search widget
VuePress 2
-
Install
biel-search:npm install biel-search -
In
.vuepress/client.js, registerSearchBoxto replace the default theme’s search control. Merge this into an existing client configuration if you have one:import { defineClientConfig } from 'vuepress/client';import bielPackage from 'biel-search/package.json';import { h, onMounted } from 'vue';import 'biel-search/dist/biel-search/biel-search.css';export default defineClientConfig({enhance({ app }) {app.component('SearchBox', {setup() {onMounted(() => {if (!document.querySelector('script[data-biel]')) {const script = document.createElement('script');script.type = 'module';script.src = `https://cdn.jsdelivr.net/npm/biel-search@${bielPackage.version}/dist/biel-search/biel-search.esm.js`;script.dataset.biel = '';document.head.appendChild(script);}});return () => h('biel-search-button', {project: '<YOUR_PROJECT_ID>','button-style': 'rounded',}, 'Search');},});},}); -
Replace
<YOUR_PROJECT_ID>with your project ID. Runnpm run docs:dev, open Search, and test a documentation query.
VuePress 1
-
Create
.vuepress/components/BielSearch.vue:<script>export default {render(h) {return h('biel-search-button', {attrs: { project: '<YOUR_PROJECT_ID>', 'button-style': 'rounded' },}, ['Search']);},};</script> -
Load the widget assets and override the search component alias in
.vuepress/config.js. Preserve your existing configuration and anychainWebpackchanges:const path = require('path');module.exports = {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' }],],chainWebpack(config) {config.resolve.alias.set('@SearchBox',path.resolve(__dirname, 'components/BielSearch.vue'));},}; -
Replace
<YOUR_PROJECT_ID>with your project ID. Runnpm run docs:dev, open Search, and test a documentation query.
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.