Skip to main content
Glama
yellowgg2
by yellowgg2

BookStack MCP Server

A Model Context Protocol (MCP) server that provides tools for searching pages from BookStack. This server interacts with the BookStack API and provides structured data for pages with clean HTML-to-text conversion.

Features

  • Search pages from BookStack with customizable queries

  • Get structured data including titles, URLs, and content

  • Configurable pagination (page number and count)

  • HTML-to-text conversion for clean content reading

  • Clean error handling and validation

Related MCP server: BookStack MCP Server

Installation

Installing via Smithery

To install mcp-bookstack for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @yellowgg2/mcp-bookstack --client claude

Installing Manually

  1. Clone the repository:

git clone https://github.com/yellowgg2/mcp-bookstack.git
cd mcp-bookstack
  1. Install dependencies:

npm install
  1. Configure your environment:

Create a .env file with your BookStack API credentials or provide them in the MCP settings configuration file:

BOOKSTACK_API_TOKEN=your_token
BOOKSTACK_API_URL=your_bookstack_url
BOOKSTACK_API_KEY=your_api_key
  1. Build the server:

npm run build
  1. Add to your MCP settings configuration file (location depends on your system):

For VSCode Claude extension:

{
  "mcpServers": {
    "bookstack": {
      "command": "node",
      "args": ["/path/to/mcp-bookstack/build/app.js"],
      "env": {
        "BOOKSTACK_API_URL": "your_bookstack_url",
        "BOOKSTACK_API_TOKEN": "your_token",
        "BOOKSTACK_API_KEY": "your_api_key"
      }
    }
  }
}

Usage

The server provides a tool called search_pages that can be used to search pages from BookStack.

Tool: search_pages

Parameters:

  • query (string): Query to search for pages

    • Default: "" (empty string)

  • page (number): Page number to return

    • Range: 1-10

    • Default: 1

  • count (number): Number of pages to return

    • Range: 1-30

    • Default: 10

Example usage:

use_mcp_tool with:
server_name: "bookstack"
tool_name: "search_pages"
arguments: {
  "query": "knowledge base",
  "page": 1,
  "count": 5
}

Sample output:

# Page Title

Page content in plain text format...

Source: https://your-bookstack-url/page-url

Integrating with Claude

To use this MCP server with Claude, you'll need to:

  1. Have the Claude desktop app or VSCode Claude extension installed

  2. Configure the MCP server in your settings

  3. Use Claude's natural language interface to interact with BookStack

Configuration

For the Claude desktop app, VSCode Claude extension, and Cursor, add the server configuration to:

// ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
// %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
  "mcpServers": {
    "bookstack": {
      "command": "node",
      "args": ["/path/to/mcp-bookstack/build/app.js"],
      "env": {
        "BOOKSTACK_API_URL": "your_bookstack_url",
        "BOOKSTACK_API_TOKEN": "your_token",
        "BOOKSTACK_API_KEY": "your_api_key"
      }
    }
  }
}

Example Interactions

Once configured, you can interact with Claude using natural language to search BookStack pages. Examples:

  • "Search for documentation about API usage in our BookStack knowledge base"

  • "Find information about deployment in our internal docs"

  • "Look up security guidelines in BookStack"

Claude will automatically use the appropriate parameters to search for the pages you want.

Page Response Structure

Each page response includes:

  • Title of the page

  • Full content of the page (converted from HTML to plain text)

  • Source URL to the original page

The HTML-to-text conversion handles:

  • HTML entity decoding

  • Line breaks and paragraph formatting

  • List items with bullet points

  • Removal of HTML tags

  • Whitespace normalization

Development

The server is built using:

  • TypeScript

  • Model Context Protocol SDK

  • Axios for API requests

  • Zod for data validation

  • dotenv for environment configuration

To modify the server:

  1. Make changes to src/app.ts

  2. Rebuild:

npm run build

Error Handling

The server includes robust error handling for:

  • API connection failures

  • Authentication issues

  • Invalid parameter values

  • Data parsing errors

Errors are returned with appropriate error codes and descriptive messages.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - feel free to use this in your own projects.

Available Tools

1 tool
search_pagesC

Search pages from Bookstack

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNoPage number to return
countNoNumber of pages to return (max 30)
queryNoQuery to search for pages

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description fails to disclose behavioral traits such as how the search is performed, limits, or effects. The agent is left guessing about the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise (3 words), which is efficient. However, it may be overly brief at the cost of completeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description is too minimal to guide an agent effectively. It does not specify return format or search behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds no additional meaning beyond what's in the schema, but the schema already explains the parameters well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Search' and the resource 'pages from Bookstack', indicating the tool's purpose. However, it could be more specific about the search type (e.g., full-text, metadata) to distinguish it from potential future search tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool or any exclusions or alternatives. The description lacks context about appropriate usage scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev1.0.0
    • First observedsearch_pages

TDQS

C2.9/5.0
Disambiguation5/5

With only one tool, there is no ambiguity between tools.

Naming Consistency5/5

The single tool 'search_pages' follows a clear verb_noun pattern.

Tool Count1/5

A BookStack server with only a search tool is severely under-scoped; typical usage requires CRUD operations on books, chapters, and pages.

Completeness1/5

The tool set lacks any creation, retrieval, update, or deletion capabilities, making it incomplete for the domain.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yellowgg2/mcp-bookstack'

If you have feedback or need assistance with the MCP directory API, please join our Discord server