# Bookstack Mcp

> MCP server for BookStack — connect Claude Code, Codex, OpenCode to your wiki. 25 tools: CRUD books, chapters, pages, shelves. Markdown-native. One command: npx github:h4sht/bookstack-mcp

- **Type:** MCP server
- **Install:** `agentstack add mcp-h4sht-bookstack-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [h4sht](https://agentstack.voostack.com/s/h4sht)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [h4sht](https://github.com/h4sht)
- **Source:** https://github.com/h4sht/bookstack-mcp

## Install

```sh
agentstack add mcp-h4sht-bookstack-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# @h4sht/bookstack-mcp

  

  MCP server for BookStack — connect Claude Code, Codex, OpenCode and any AI assistant to your BookStack wiki.
  One command, zero config files, instant setup.

  
  
  
  =18">

---

## 🚀 Claude Code

```bash
claude mcp add bookstack -- npx github:h4sht/bookstack-mcp
```

Claude Code will prompt you for:
- `BOOKSTACK_BASE_URL` — your BookStack API URL (e.g. `https://wiki.example.com/api`)
- `BOOKSTACK_API_TOKEN` — your API token (`token_id:token_secret`)

Or pass them directly:

```bash
claude mcp add bookstack \
  --env BOOKSTACK_BASE_URL=https://wiki.example.com/api \
  --env BOOKSTACK_API_TOKEN=token_id:token_secret \
  -- npx github:h4sht/bookstack-mcp
```

Then use `/mcp` inside Claude Code to verify it's connected ✔

---

## 🛠️ What you get (25 tools)

| Category | Tools |
|----------|-------|
| 📚 **Books** (6) | list, get, create, update, delete, export |
| 📑 **Chapters** (6) | list, get, create, update, delete, export |
| 📄 **Pages** (6) | list, get, create, update, delete, export |
| 📚 **Shelves** (5) | list, get, create, update, delete |
| 🔍 **Search** (1) | search across all content |
| ⚙️ **System** (1) | instance info |

All `export_*` tools support `markdown`, `html`, `pdf`, `plaintext`.

---

## ✍️ Markdown-powered

BookStack stores pages as HTML but accepts **Markdown input** through its API. This means Claude can create and edit wiki pages in its native format:

```
"Create a page about async Python in book 3"

→ bookstack_create_page({
    book_id: 3,
    name: "Async Python Guide",
    markdown: "# Async Python\n\n`asyncio` is Python's standard library..."
  })
```

Pages are also exported as Markdown, so Claude can read, analyze, and improve existing content.

---

## 📦 Setup for other AI assistants

### OpenAI Codex

```bash
codex mcp add bookstack \
  --env BOOKSTACK_BASE_URL=https://wiki.example.com/api \
  --env BOOKSTACK_API_TOKEN=id:secret \
  -- npx github:h4sht/bookstack-mcp
```

Or add this to `~/.codex/config.toml`:

```toml
[mcp_servers.bookstack]
command = "npx"
args = ["github:h4sht/bookstack-mcp"]

[mcp_servers.bookstack.env]
BOOKSTACK_BASE_URL = "https://wiki.example.com/api"
BOOKSTACK_API_TOKEN = "id:secret"
```

Verify with: `codex mcp list`

### OpenCode

```bash
opencode mcp add
# Select "local", then enter: npx github:h4sht/bookstack-mcp
```

Or add to `opencode.json`:

```jsonc
{
  "mcp": {
    "bookstack": {
      "type": "local",
      "command": ["npx", "github:h4sht/bookstack-mcp"],
      "enabled": true,
      "environment": {
        "BOOKSTACK_BASE_URL": "https://wiki.example.com/api",
        "BOOKSTACK_API_TOKEN": "id:secret"
      }
    }
  }
}
```

### Cline (VS Code)

Add to Cline MCP settings file:

```json
{
  "mcpServers": {
    "bookstack": {
      "command": "npx",
      "args": ["github:h4sht/bookstack-mcp"],
      "env": {
        "BOOKSTACK_BASE_URL": "https://wiki.example.com/api",
        "BOOKSTACK_API_TOKEN": "id:secret"
      }
    }
  }
}
```

### Any MCP-compatible assistant (stdio)

The server command is always the same:

```bash
npx github:h4sht/bookstack-mcp
```

Set `BOOKSTACK_BASE_URL` and `BOOKSTACK_API_TOKEN` as environment variables.

---

## 🔧 Config reference

| Variable | Required | Description |
|----------|----------|-------------|
| `BOOKSTACK_BASE_URL` | Yes | Full URL including `/api` |
| `BOOKSTACK_API_TOKEN` | Yes | Format: `token_id:token_secret` |
| `BOOKSTACK_TIMEOUT` | No | Request timeout ms (default: `30000`) |

---

## 🔒 Security

- **4 auditable files** — read the whole source in 10 minutes
- **One dependency** — only `@modelcontextprotocol/sdk` (official Anthropic)
- **Native fetch()** — no HTTP libraries, no hidden requests
- **Stdio only** — no open ports, no network surface
- **Zero telemetry** — no analytics, no tracking, no calls home
- **Stderr logging** — never writes to stdout (MCP protocol integrity)

---

## 🧪 Tests

```bash
npm test   # 32 tests, all passing ✅
```

---

## 📁 Structure

```
@h4sht/bookstack-mcp/
├── src/
│   ├── index.ts      # MCP server, stdio transport, config
│   ├── client.ts     # BookStack REST client (native fetch)
│   ├── tools.ts      # 25 MCP tool definitions + handlers
│   └── types.ts      # TypeScript types
├── dist/             # Compiled JS (ready to run)
├── tests/            # 32 unit + integration tests
├── package.json
└── README.md
```

---

## 📝 License

MIT © [h4sht](https://github.com/h4sht)

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [h4sht](https://github.com/h4sht)
- **Source:** [h4sht/bookstack-mcp](https://github.com/h4sht/bookstack-mcp)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-h4sht-bookstack-mcp
- Seller: https://agentstack.voostack.com/s/h4sht
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
