Logo di GitBook MCP Server

GitBook MCP Server

Community
tcsenpai

An MCP (Model Context Protocol) server that exposes documentation sites content for AI assistants. This server scrapes and indexes GitBook and other websites documentation, making it searchable and accessible through MCP tools.

Autoretcsenpai
Repositorymcpbook
LinguaJavaScript
Fork
7
Stelle
19
Strumenti disponibili
0
Tipo di trasportostdio, streamable-http
Categorie
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    GitBook MCP Server mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    19 stelle e 7 fork nel repository collegato.

MSeeP.ai Security Assessment Badge Verified on MSeeP

Universal Documentation MCP Server

MCP Badge

A high-performance MCP (Model Context Protocol) server that transforms any documentation website into an AI-accessible knowledge base. Originally built for GitBook but works with Vercel docs, Next.js sites, Docusaurus, and many other documentation platforms. Features instant startup, intelligent caching, and automatic domain detection.

✨ Key Features

  • ⚡ Instant Startup - SQLite storage with sub-second server initialization
  • 🔍 Advanced Search - FTS5 full-text search with fuzzy matching and ranking
  • 🧠 Smart Auto-Detection - Automatically detects domain, keywords, and branding
  • 📝 Markdown Perfect - Preserves formatting with syntax-highlighted code blocks
  • 🔄 Background Updates - Non-blocking change detection and cache refresh
  • 🌐 Universal Support - Works with GitBook, Vercel docs, Next.js sites, and many other documentation platforms
  • 📡 Dual Interface - Both MCP tools and REST API endpoints
  • 🚀 Production Ready - Rate limiting, error handling, and robust caching

🚀 Quick Start

💡 Recommended: Use the interactive creator for the best experience!

🎨 Web UI Management Dashboard

bash
# Clone this repo (once)
git clone https://github.com/tcsenpai/mcpbook/
cd mcpbook

# Build the UI
npm run ui:build

# Start the web interface
npm run ui

The Web UI provides:

  • 🚀 Visual Server Creation - Step-by-step wizard with live URL validation
  • 📊 Server Management - Start/stop/delete servers with real-time status
  • 📋 Claude Desktop Integration - One-click copy config or add via CLI
  • 🖥️ Live Terminal - Real-time feedback and command execution
  • ⚠️ Safety Features - Confirmation dialogs and cancel functionality

⭐ One-Command Setup

bash
# Clone this repo (once)
git clone https://github.com/tcsenpai/mcpbook/
cd mcpbook

# Create MCP server for any documentation site instantly
npm exec create-gitbook-mcp

That's it! 🎉 The interactive wizard will:

  • ✨ Guide you through setup with smart defaults
  • 🔍 Auto-detect domain/keywords from your documentation site
  • 📦 Install in organized directories (~/.config/mcpbooks/servers/[name])
  • 🌍 Optionally install globally (accessible as your-server-name command)
  • 🤖 Auto-configure Claude Desktop (optional)
  • 🚀 Pre-cache everything for instant server startup

🛠️ Manual Setup (Advanced Users)

  1. Install and Configure

    bash
    npm install
    echo "GITBOOK_URL=https://docs.yoursite.com" > .env
  2. Build with Auto-Detection

    bash
    npm run build  # Automatically detects and configures your domain
  3. Start Server

    bash
    npm start  # Instant startup with SQLite cache
  4. Test with MCP Inspector

    bash
    npx @modelcontextprotocol/inspector node dist/index.js

📦 Installation Options

Option 1: Local Development

bash
git clone <repository>
cd mcpbook
npm install
npm run build
npm start

Option 2: Global Installation

bash
npm install -g .
# Then use the binary name from package.json
your-mcp-server-name

Option 3: Claude Desktop Integration

json
{
  "mcpServers": {
    "gitbook": {
      "command": "node",
      "args": ["/absolute/path/to/dist/index.js"],
      "env": {
        "GITBOOK_URL": "https://docs.yoursite.com"
      }
    }
  }
}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\\Claude\\claude_desktop_config.json

Option 4: StreamableHTTP Transport

bash
npm run start:http  # StreamableHTTP on port 3001
node dist/index.js --streamable-http --port=3002  # Custom port

Option 5: REST API Server

bash
npm run start:api  # HTTP server on port 3000
PORT=8080 npm run start:api  # Custom port

🌐 Platform Compatibility

While originally designed for GitBook, this MCP server has proven compatibility with many documentation platforms:

✅ Guaranteed to Work

  • GitBook (original target platform)
  • Custom GitBook instances

🎯 Successfully Tested

  • Vercel-hosted docs (docs.vercel.com, aptos.dev)
  • Next.js documentation sites
  • Static site generators with consistent navigation
  • Most HTML-based documentation platforms

🔧 How It Works

The scraper intelligently:

  • Discovers navigation through link crawling
  • Extracts content from any HTML structure
  • Adapts to different layouts automatically
  • Handles various authentication and routing patterns

💡 Pro Tip: If a site has consistent navigation and accessible content, our scraper will likely work! The auto-detection feature adapts to different site structures automatically.

⚙️ Configuration

Auto-Detection (Recommended)

env
GITBOOK_URL=https://docs.yoursite.com
AUTO_DETECT_DOMAIN=true
AUTO_DETECT_KEYWORDS=true

The server will automatically:

  • Generate domain-specific tool names (stripe_docs_search, api_docs_get_page)
  • Extract relevant keywords from content
  • Create contextual descriptions for better AI integration

Manual Configuration

env
# Target GitBook (required)
GITBOOK_URL=https://docs.yoursite.com

# Custom branding (optional)
SERVER_NAME=my-api-docs
SERVER_DESCRIPTION=API documentation and guides
DOMAIN_KEYWORDS=api,rest,graphql,endpoints
TOOL_PREFIX=api_

# Performance tuning
CACHE_TTL_HOURS=1
MAX_CONCURRENT_REQUESTS=5
SCRAPING_DELAY_MS=100

Configuration Examples

API Documentation:

env
GITBOOK_URL=https://api-docs.yourservice.com
TOOL_PREFIX=api_
DOMAIN_KEYWORDS=api,rest,endpoints,authentication

→ Results in: api_search_content, api_get_page, etc.

Product Documentation:

env
GITBOOK_URL=https://help.yourproduct.com  
TOOL_PREFIX=help_
DOMAIN_KEYWORDS=tutorial,guide,troubleshooting

→ Results in: help_search_content, help_get_page, etc.

🛠️ Available Tools

The server exposes 7 MCP tools with automatic prefixing:

Core Tools

ToolDescriptionParameters
{prefix}_search_contentAdvanced search with rankingquery: Search terms
{prefix}_get_pageGet specific page contentpath: Page path (e.g., "/api/auth")
{prefix}_list_sectionsGet table of contentsNone
{prefix}_get_section_pagesGet all pages in sectionsection: Section name
{prefix}_refresh_contentForce cache refreshNone
{prefix}_get_code_blocksExtract code with syntax highlightingpath: Page path
{prefix}_get_markdownGet formatted markdownpath: Page path

MCP Prompts

  • explain_section - Generate comprehensive tutorials
  • summarize_page - Create concise summaries
  • compare_sections - Compare documentation sections
  • api_reference - Format as API documentation
  • quick_start_guide - Generate quick start guides

🌐 HTTP Interfaces

The server supports both MCP StreamableHTTP and traditional REST API:

StreamableHTTP MCP Protocol:

bash
# Health check
curl http://localhost:3001/health

# MCP requests (requires MCP client)
curl -X POST http://localhost:3001/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'

REST API (separate server):

bash
# Search content
curl "http://localhost:3000/api/search?q=authentication"

# Get specific page
curl "http://localhost:3000/api/page/api/authentication"

# Get page as markdown
curl "http://localhost:3000/api/page/api/authentication/markdown"

# Get code blocks
curl "http://localhost:3000/api/page/api/authentication/code"

# List sections
curl "http://localhost:3000/api/sections"

# Get section pages
curl "http://localhost:3000/api/sections/API/pages"

# Server status
curl "http://localhost:3000/api/status"

# Refresh cache
curl -X POST "http://localhost:3000/api/refresh"

🎯 Usage Examples

Auto-Detection Results

  • docs.stripe.com → stripe_search_content, stripe_get_page
  • docs.react.dev → react_search_content, react_get_page
  • api.yourcompany.com → api_search_content, api_get_page
  • Generic sites → docs_search_content, docs_get_page

MCP Tool Usage

bash
# Search for authentication docs
{"tool": "api_search_content", "arguments": {"query": "oauth authentication"}}

# Get specific page
{"tool": "api_get_page", "arguments": {"path": "/auth/oauth"}}

# Get code examples
{"tool": "api_get_code_blocks", "arguments": {"path": "/sdk/quickstart"}}

# Refresh content
{"tool": "api_refresh_content", "arguments": {}}

🏗️ Architecture

  • SQLite Storage - Fast startup with FTS5 full-text search
  • Background Updates - Non-blocking change detection
  • Auto-Detection - Domain and keyword extraction
  • Parallel Scraping - Configurable concurrency
  • Smart Caching - Only updates changed content

Key Components

  • GitBookScraper - Web scraping and content extraction
  • SQLiteStore - High-performance storage with FTS5 search
  • DomainDetector - Automatic domain and keyword detection
  • GitBookMCPServer - MCP server with tool handlers
  • GitBookRestAPI - HTTP endpoints for web integration

🔧 Development

bash
# Development mode with auto-reload
npm run dev

# Build with auto-detection
npm run build

# Run manual auto-detection
npm run auto-detect

# Clean build (no auto-detection)
npm run build:clean

# Test with MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.js

🌍 Universal GitBook Support

Works with any public GitBook, including:

  • API Documentation - Stripe, Twilio, etc.
  • Framework Docs - React, Vue, Angular
  • Product Guides - Help centers and tutorials
  • Developer Resources - SDKs and references
  • Company Wikis - Internal documentation

⚡ Performance

  • Instant Startup: Sub-second initialization with SQLite cache
  • Background Updates: Non-blocking change detection
  • Smart Indexing: FTS5 full-text search with ranking
  • Efficient Storage: SQLite replaces slow JSON parsing
  • Memory Optimized: On-demand loading instead of full memory cache

🚧 Limitations

  • Public GitBooks Only - Requires publicly accessible sites
  • Static Content - Scrapes published HTML, not API-based
  • Manual Refresh - No real-time updates (use refresh tool)
  • Text-Focused - Extracts text content, not interactive elements

📄 License

MIT


Need help? Check the MCP documentation or open an issue.

Installazione

TypingMind
Prerequisiti:

Node.js 18+

{
  "mcpServers": {
    "tcsenpai-mcpbook": {
      "command": "npx",
      "args": [
        "-y",
        "gitbook-mcp-server"
      ]
    }
  }
}

Usa MCP GitBook MCP Server con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso GitBook MCP Server, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Puoi eseguire MCP localmente sul tuo dispositivo o connetterti all'URL di un server MCP remoto.

Opzione 1: usa il connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi GitBook MCP Server come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di GitBook MCP Server.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "tcsenpai-mcpbook": {
      "command": "npx",
      "args": [
        "-y",
        "gitbook-mcp-server"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di GitBook MCP Server, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di GitBook MCP Server.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare GitBook MCP Server per aiutarmi con questa attività?
GitBook MCP Server
Certo. Ho letto.
Ecco cosa ho trovato con GitBook MCP Server.

Opzione 2: aggiungi l'URL di un server MCP

Usa questo metodo se GitBook MCP Server è già ospitato in remoto o se il tuo team vuole un unico connettore condiviso accessibile a più utenti.

1

Apri Connettori MCP

In TypingMind, vai su Plugin, apri Connettori MCP e scegli Aggiungi URL.

  1. Apri TypingMind nel tuo browser.
  2. Vai a Plugin.
  3. Apri Connettori MCP.
  4. Fai clic su Aggiungi URL.
Modulo di TypingMind per aggiungere l'URL di un server MCP personalizzato
2

Incolla l'URL del server

Inserisci URL del tuo server nel campo URL del server. Aggiungi un nome per la connessione, una descrizione, un'icona, header HTTP personalizzati o le impostazioni del client OAuth se richiesti dal server.

  1. Incolla URL del tuo server nel campo URL del server.
  2. Inserisci un nome per la connessione a GitBook MCP Server.
  3. Aggiungi una descrizione e un'icona per riconoscere più facilmente la connessione.
  4. Aggiungi header HTTP personalizzati o i dati del client OAuth se il server richiede l'autenticazione.
3

Crea la connessione

Fai clic su Crea connessione, poi torna all'elenco dei plugin e verifica che la nuova connessione MCP sia attiva.

  1. Fai clic su Crea connessione.
  2. Torna all'elenco dei connettori MCP.
  3. Verifica che la connessione GitBook MCP Server risulti attiva.
  4. Aggiorna l'elenco dei plugin se la connessione non appare subito.
4

Cambia modello senza riconnetterti

Avvia una chat con il tuo modello preferito, abilita gli strumenti di GitBook MCP Server dalla sezione Plugin e passa a un altro modello quando serve. La connessione MCP rimane disponibile nell'area di lavoro di TypingMind.

  1. Avvia una nuova chat in TypingMind.
  2. Seleziona il modello IA che vuoi usare.
  3. Abilita gli strumenti di GitBook MCP Server dalla sezione Plugin.
  4. Chiedi al modello di usare lo strumento quando serve.
  5. Passa a un altro modello IA e riutilizza la stessa connessione MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare GitBook MCP Server per aiutarmi con questa attività?
GitBook MCP Server
Certo. Ho letto.
Ecco cosa ho trovato con GitBook MCP Server.

Domande frequenti

A cosa serve il server MCP GitBook MCP Server?

GitBook MCP Server è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare GitBook MCP Server MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare GitBook MCP Server con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP GitBook MCP Server con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando GitBook MCP Server, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego GitBook MCP Server MCP a TypingMind?

Puoi collegare GitBook MCP Server a TypingMind con il connettore MCP locale oppure aggiungendo l'URL di un server MCP remoto. Usa il connettore locale quando il server deve accedere a file, app o risorse private sul tuo dispositivo; usa invece l'URL del server quando il server MCP è ospitato in remoto.

Quali strumenti offre GitBook MCP Server MCP in TypingMind?

GitBook MCP Server mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare GitBook MCP Server MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se GitBook MCP Server richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇