# Context Book [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/aditya201551/context-book  
**GitHub Stars:** 5  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/context-book

## Description
Stop re-explaining yourself to Agents. Give it the right context, right when it needs it.

## Tools
Capabilities this server exposes over MCP:

- **book_create_or_update** — Create a Book or update its metadata
- **book_list** — Paginated list of Book metadata
- **book_get** — Retrieve all pages of a Book
- **page_insert** — Push an atomic page into a Book; embeds immediately
- **page_update** — Replace a page's content; re-embeds
- **page_delete** — Remove a page (indices not re-numbered)
- **page_search** — Semantic search across all Books
- **readme** — Returns the usage guide (call once per session)

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/context-book/readme_

