Introduction
Connect AI assistants to your Guru’s knowledge base using the Model Context Protocol (MCP). Use your Guru directly within Claude Desktop, Claude Code, Cursor, and other MCP-compatible clients. With the MCP integration, you can:- Ask questions and get AI-generated answers from your knowledge base
- Search for relevant documentation without generating an answer
- Access your Guru’s knowledge directly in your development workflow
Prerequisites
Before setting up the MCP integration, ensure you have:- A Guru on Gurubase (either on Gurubase Cloud or self-hosted with Enterprise plan)
- An API key from API Keys
- An MCP-compatible client (Claude Desktop, Claude Code, Cursor, etc.)
Getting Your API Key
- Go to API Keys
- Click “New API Key” to generate a new key
- Copy the API key (it starts with
gb-)
Store your API key securely. It provides access to your Guru and should not be
shared publicly.
MCP Server URL
Your Guru’s MCP server is available at:{guru_slug} with your Guru’s slug. You can find the slug in your Guru’s URL. For example, if your Guru is at https://app.gurubase.io/g/kubernetes, the slug is kubernetes.
For self-hosted Gurubase (Enterprise plan), use your instance URL:
http://localhost:8029/mcp/{guru_slug}/Client Setup
Replace
{guru_slug} with your Guru’s slug and YOUR_API_KEY with your
actual API key in the examples below.Cursor
Cursor
In Cursor, go to Settings > MCP Servers and add one of the following configurations:Remote Server ConnectionLocal Server Connection
Claude Code
Claude Code
Remote Server ConnectionLocal Server Connection
Claude Desktop
Claude Desktop
Edit your Claude Desktop configuration file:Local Server Connection
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
macOS users: If Claude Desktop can’t find
npx, run which npx in your terminal and add an env section with that directory in the PATH. For example, if npx is at /opt/homebrew/opt/node@20/bin/npx, add:Windsurf
Windsurf
Add to your Windsurf MCP config file (Local Server Connection
~/.codeium/windsurf/mcp_config.json):Remote Server ConnectionVS Code (Copilot)
VS Code (Copilot)
Add to your VS Code settings (Local Server Connection
settings.json):Remote Server ConnectionZed
Zed
Add to your Zed settings file (
~/.config/zed/settings.json):Local Server ConnectionOther MCP Clients
Other MCP Clients
For any MCP-compatible client, use one of these configuration patterns:Remote Server Connection (if your client supports Local Server Connection (if your client only supports
url + headers):command):Which one should I use? If your client supports
url, use Remote. If it only supports command, use Local.Available Tools
Once connected, your MCP client will have access to two tools:gurubase_ask
Ask a question and get an AI-generated answer from your knowledge base. When to use:- You need a complete, synthesized answer
- You want explanations, tutorials, or how-to guidance
- Quality and completeness matter more than speed
| Name | Type | Required | Description |
|---|---|---|---|
question | string | Yes | The question to ask your Guru |
| Field | Description |
|---|---|
content | The AI-generated answer in Markdown format |
slug | Unique identifier for this Q&A |
trust_score | Confidence score (0-100) indicating answer reliability |
references | Array of source documents used to generate the answer |
This tool is slower (typically 10-30 seconds) because it retrieves sources,
synthesizes information, and generates a comprehensive answer. Use
gurubase_semantic_search for quick lookups.gurubase_semantic_search
Find relevant source documents without generating an answer. When to use:- You need a quick check of what documentation exists
- You want to find specific articles, guides, or references
- You need to explore the knowledge base
- Speed is important
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The search query |
labels | array | No | Filter results by category labels |
| Field | Description |
|---|---|
sources | Array of matching documents |
sources[].title | Document or page title |
sources[].link | URL to the source (external link or internal reference) |
sources[].labels | Category labels associated with the source |
sources[].icon_url | Icon URL for the source |
sources[].text | Relevant text snippet (truncated to ~500 chars) |
sources[].type | Source type (e.g., “Text”) |
total_count | Total number of sources returned |
Example Usage
Once configured, you can use your Guru directly in Claude: Asking a question:“Use the gurubase_ask tool to explain how to set up authentication”Searching documentation:
“Use gurubase_semantic_search to find docs about rate limiting”With labels filter:
“Search for API documentation rate limiting using gurubase_semantic_search with labels ‘api’, ‘reference”
Self-Hosted Configuration
For self-hosted Gurubase (Enterprise plan), update the URL to point to your instance:Replace
localhost:8029 with your actual Gurubase instance URL if different.Analytics
Questions asked via MCP appear in your Guru’s Analytics dashboard with the source type “MCP”. This allows you to track usage and identify common questions from your development team.Troubleshooting
Claude Desktop: 'Failed to spawn process: No such file or directory'
Claude Desktop: 'Failed to spawn process: No such file or directory'
This error occurs when Claude Desktop cannot find
npx in its PATH. GUI applications on macOS don’t inherit your shell’s PATH.Solution: Add the env section with the correct PATH:- Find your npx location:
which npx - Add the directory to the PATH in your config:
- Completely quit and restart Claude Desktop (Cmd+Q, not just close the window)
'Invalid API key' error
'Invalid API key' error
- Verify your API key is correct and starts with
gb-- Check that the API key has not been revoked - Ensure the API is enabled for your Guru in Settings
'Guru not found' error
'Guru not found' error
- Verify the guru_slug in the URL matches your Guru’s slug - Check that the Guru is not disabled - Ensure the API is enabled for your Guru
'Question was processed but could not be retrieved'
'Question was processed but could not be retrieved'
This is a temporary error. Try asking the question again. If it persists,
contact support.
Tools not appearing in Claude
Tools not appearing in Claude
- Verify your MCP configuration is correct
- Restart Claude Desktop completely
- Check Claude Desktop logs for connection errors
- Test the endpoint manually:
Slow responses from gurubase_ask
Slow responses from gurubase_ask
The
gurubase_ask tool generates comprehensive answers which takes time. For faster lookups, use gurubase_semantic_search to find relevant documents without AI synthesis.