Biblos
Biblos is a multi-agent MCP server providing shared documented memory and a persistent inter-agent message bus, enabling agents to persist knowledge and hand off work verifiably. It features hybrid searchable Markdown memories, a knowledge graph, agent registry, and identity-verified request queue.
README
Biblos
Biblos is a multi-agent MCP server that gives your agents a shared, documented memory and a persistent inter-agent message bus. It is not a central brain: every agent keeps its own LLM and local memory. Biblos is the shared library and interconnect that lets otherwise independent agents (e.g. OpenClaw, OpenCode, Claude Code) persist knowledge in one place and hand work to each other in a verifiable way.
- Documented vectorized memory — every memory is a readable Markdown document plus structured metadata, searchable with hybrid semantic + keyword ranking.
- Inter-agent bus — a persistent request queue with recipient identity verification, so agents can ask each other for work and confirm the outcome.
Implements the Model Context Protocol over Streamable HTTP using the official @modelcontextprotocol/sdk@1.30.0. Persistence is a single SQLite file (better-sqlite3 + sqlite-vec 768-dim vectors + FTS5 keyword index). Tested with 130 passing tests (vitest).
Features
Biblos exposes 14 MCP tools across 5 domains.
| Domain | Tools | What it does |
|---|---|---|
| Memory documents | save_document, get_document, update_document, delete_document, list_documents, search_documents |
Store/read/edit/delete Markdown memories with metadata (author, tags, project, type). search_documents blends semantic (vector) and keyword (FTS5) hits with a configurable fusion weight. |
| Knowledge graph | graph_edit, graph_query, graph_render |
Add/remove typed relations between documents, traverse the graph by type and depth, and render it as Mermaid (default) or Graphviz. |
| Agent registry | register_agent |
Explicitly register agent identities (name, type, capabilities). Names are unique; registration is required before an agent can use the bus. |
| Inter-agent bus | request_send, request_poll, request_respond, request_status |
A persistent request queue: send → poll → respond → status. The caller's identity comes from the X-Biblos-Agent header and is verified against the registered recipient on every hop. |
| MCP server core | (transport + auth + health) | The stateless Streamable HTTP endpoint, Bearer + Origin auth on every request, and registry/health behavior of the server itself. |
Architecture
Clients (OpenClaw / OpenCode / Claude Code)
│ MCP Streamable HTTP + Bearer + Origin + X-Biblos-Agent
▼
┌─────────────────────────────────────────────────────┐
│ src/index.ts (Node http, stateless, no sessions) │
│ ┌─────────────────────────────────────────────┐ │
│ │ src/auth.ts │ │
│ │ Origin not allowlisted → 403 │ │
│ │ Bearer key mismatch (timing-safe) → 401 │ │
│ └──────────────────┬──────────────────────────┘ │
│ ▼ │
│ McpServer — Streamable HTTP on /mcp (14 tools) │
│ └── domains: documents · graph · bus · registry │
└──────────┬─────────────────────────────┬──────────┘
│ │ HTTP (fetch)
SQLite (single file) embeddings/client.ts
better-sqlite3 → POST {ROUTER_URL}/v1/embeddings
sqlite-vec vec0 (768d) ▼
FTS5 + sync triggers llama.cpp router
Design principles:
- Stateless Streamable HTTP. The server does not use
MCP-Session-Idsessions. Each request is handled by a fresh transport +McpServerinstance, which makes proxying trivial and avoids session-affinity issues. - Auth first. Every request passes through
src/auth.tsbefore reaching any tool: anOriginnot inBIBLOS_ALLOWED_ORIGINS(or missing on non-GET) is rejected with 403; a wrongBIBLOS_API_KEYis rejected with 401 (compared withcrypto.timingSafeEqual). The server refuses to start without both variables set. - Identity from the header, never from tool arguments. The
X-Biblos-Agentheader fixes the caller's identity at the HTTP boundary, so callers cannot spoof the recipient checks that the bus enforces. - No web framework. The Streamable HTTP transport is a single JSON-RPC endpoint, so the native
node:httpserver is enough — no Express/Hono needed, one less dependency surface. - Explicit embed seam. All router traffic is confined to
src/embeddings/client.tsbehind anEmbeddingClientinterface; domain services mock at that seam in tests.
Requirements
- Node.js >= 22 (ESM,
NodeNext). - External dependency — an embeddings router.
save_document,update_document(on content change) andsearch_documentsneed an OpenAI-style/v1/embeddingsendpoint serving a 768-dim model. The default target is a llama.cpp server running in router mode atROUTER_URLwithBIBLOS_EMBED_MODEL(nomic-embed-text-v1.5.Q8_0by default). If the router is unreachable, embedding-dependent tools fail with anembedding_service_unavailabletool error (isError: true) and never write partial data; all other tools keep working.
Configuration
All configuration comes from environment variables (see .env.example, read by src/config.ts).
| Variable | Default | Purpose |
|---|---|---|
BIBLOS_API_KEY |
— (required) | Bearer API key. The server refuses to start without it. |
BIBLOS_ALLOWED_ORIGINS |
— (required) | Comma-separated Origin allowlist. Requests with a missing/disallowed Origin get 403. |
ROUTER_URL |
http://127.0.0.1:8085 |
Base URL of the llama.cpp-compatible embeddings router. |
BIBLOS_EMBED_MODEL |
nomic-embed-text-v1.5.Q8_0 |
Embedding model served by the router. |
BIBLOS_EMBED_TIMEOUT_MS |
10000 |
Total per-attempt budget (ms) for one embedding call. |
BIBLOS_EMBED_CONNECT_TIMEOUT_MS |
3000 |
Fast-fail budget (ms) for the connect phase of an embedding call. |
BIBLOS_FUSION_WEIGHT |
0.5 |
Hybrid fusion weight w in [0,1]; 0.5 is a 50/50 blend of semantic and keyword scores. |
BIBLOS_MIN_SCORE |
0 |
Drop merged search hits below this score. |
DB_PATH |
/opt/biblos/biblos.db |
SQLite database file path. |
BIBLOS_HOST |
127.0.0.1 |
HTTP bind host. |
BIBLOS_PORT |
8199 |
HTTP bind port. |
Quick start (local)
npm ci
cp .env.example .env
# fill in BIBLOS_API_KEY (e.g. `openssl rand -hex 32`) and BIBLOS_ALLOWED_ORIGINS
npm run build
npm start
The server now listens on http://127.0.0.1:8199/mcp. It will start even if the embeddings router is down — only embedding-dependent tools will fail until the router is reachable.
Connecting clients
Biblos speaks MCP Streamable HTTP and requires three things on every request:
| Header | Value |
|---|---|
Authorization |
Bearer <BIBLOS_API_KEY> |
Origin |
one of the BIBLOS_ALLOWED_ORIGINS values |
X-Biblos-Agent |
the agent's registered name (never in tool arguments) |
See docs/clients.md for step-by-step configuration for OpenClaw (streamable-http transport), OpenCode (type: remote, Bearer header, oauth: false), and Claude Code, plus the registration-first rule and a curl smoke test.
Development
npm run test # vitest run — full suite (130 tests)
npm run typecheck # tsc --noEmit
npm run build # tsc -p tsconfig.build.json + copy src/db/schema.sql → dist/
Repository layout:
src/
config.ts env config loader (loadConfig)
index.ts node:http server + stateless Streamable HTTP transport
auth.ts Bearer + Origin middleware (every request)
server/tools.ts 14 MCP tool registrations (zod schemas)
domain/ documents, graph, bus, registry, types
db/ store.ts (better-sqlite3 facade), migrate.ts, schema.sql
embeddings/client.ts EmbeddingClient — the only llama.cpp boundary
hybrid/fusion.ts weighted semantic + FTS5 fusion
tests/ unit, integration (mocked router), and E2E suites
docs/clients.md client integration guide
deploy/ systemd unit, env example, Apache vhost template
openspec/ SDD artifacts (proposal, specs, design, tasks)
Tests never require the embeddings router — it is always mocked at the fetch seam.
License
MIT — © 2026 juanvs23.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.