Context Book logo

Context Book

Stores searchable Books and Pages for AI agents, with semantic retrieval backed by PostgreSQL, pgvector, and Voyage AI.

Install Context Book

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for Context Book, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

Context Book MCP server gives AI clients a persistent library of user-scoped Books and Pages instead of relying on conversation history. It exposes Bearer-authenticated MCP tools for creating, listing, reading, updating, deleting, and semantically searching stored content. Pages are embedded through Voyage AI and stored in PostgreSQL with pgvector and pg_trgm. Reach for it when agents need on-demand project, product, or workflow context without loading an entire knowledge base into every prompt.

Use cases

  • Store project documentation for agent retrieval
  • Search saved context across multiple Books
  • Update product or workflow notes as they change
  • Give AI clients user-scoped reference material on demand

Key features

  • Persistent Books and Pages
  • Semantic search across Books
  • Immediate Page embeddings
  • Bearer-authenticated MCP tools
  • PostgreSQL with pgvector storage
  • Optional browser dashboard

Tools8

What Context Book lets your agent do. Expand a tool for its parameters.

Self-reported~97 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

23/27 checks healthy over the last 112d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars5Stargazers on the source repository.
Last commit5mo agoMost recent push to the default branch.
Tools exposed8Callable tools this server registers over MCP.

How Context Book works

What Context Book MCP server does

Context Book MCP server provides a persistent knowledge library that AI clients can query through MCP. Information is organized into Books containing individual Pages. Agents can create Books, manage their metadata, retrieve complete Books, and search across all Books for semantically relevant content.

The system separates the MCP data plane from its control plane. The MCP service exposes tools for agents, while a separate Go API server handles login, OAuth 2.0, the dashboard, and Book/Page CRUD. Both services use the same PostgreSQL database.

How it works

Each MCP request requires a valid Bearer token and is limited to the authenticated user. When a Page is inserted or updated, the content is embedded immediately through Voyage AI. PostgreSQL stores the resulting vectors with the Book and Page data; the project also enables pg_trgm for text-search support.

The MCP endpoint is served by the Go binary at /mcp, using the default local port 8081. The API and dashboard use port 8080. A browser-based frontend is available separately and runs on port 5173 during development.

Setup and configuration

Running Context Book MCP server locally requires Go 1.26 or newer, Node.js 22 or newer, and PostgreSQL 16 or newer. The database must have the vector and pg_trgm extensions enabled. A Voyage AI API key is also required for embedding content.

Set the backend configuration from the project’s .env.example file. The documented variables include:

  • DATABASE_URL for the PostgreSQL connection
  • API_KEY_SALT for API key handling
  • VOYAGE_API_KEY for Voyage AI access

Start the API with go run ./cmd/api/main.go, then start the MCP process with go run ./cmd/mcp/main.go from the backend directory. Configure an MCP-compatible client with the server URL http://localhost:8081/mcp. The frontend is optional.

Tools and capabilities

Context Book MCP server exposes eight tools:

  • book_create_or_update creates a Book or changes its metadata.
  • book_list returns paginated Book metadata.
  • book_get returns every Page in a Book.
  • page_insert adds an atomic Page and embeds it immediately.
  • page_update replaces Page content and creates a new embedding.
  • page_delete removes a Page without renumbering later indices.
  • page_search performs semantic search across the user’s Books.
  • readme returns the usage guide and is intended to be called once per session.

Limitations and notes

The service depends on PostgreSQL, pgvector, pg_trgm, and Voyage AI, so semantic Page operations require those components to be configured. All MCP tools require Bearer authentication. Deleting a Page does not renumber the remaining Page indices. The repository provides separate API and MCP processes rather than a single runtime command.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Context Book

Context Book is an MCP server that connects AI clients to a persistent PostgreSQL-backed library of Books and Pages, using Voyage AI for embeddings. Its main tools create, list, retrieve, update, delete, and semantically search Pages and Books, with Bearer-token access scoped to the authenticated user.

Install Go 1.26+, Node.js 22+, PostgreSQL 16+, the pgvector and pg_trgm extensions, and a Voyage AI API key. Configure the backend environment, start the API and MCP Go processes, then point an MCP client to http://localhost:8081/mcp.

Yes, Context Book works with Cursor through its MCP URL. Add http://localhost:8081/mcp as the server URL in .cursor/mcp.json, then provide the required authentication and backend configuration for the running service.

Context Book documents DATABASE_URL, API_KEY_SALT, and VOYAGE_API_KEY for backend configuration. DATABASE_URL points to PostgreSQL, API_KEY_SALT supports API key handling, and VOYAGE_API_KEY enables Voyage AI embeddings.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewContext Book AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/context-book?style=directory)](https://allmcps.com/mcp/context-book)
HTML Embed
<a href="https://allmcps.com/mcp/context-book"><img src="https://allmcps.com/api/badge/context-book?style=directory" alt="Context Book on AllMCPs" /></a>