@booboo-brain/serve
Query a Booboo snapshot over REST and MCP. One in-memory index
(BoobooIndex) powers both: search, neighbours, shortest-path, layer stats. Read-only.
REST
booboo serve --snapshot my.booboo.json --port 8787
GET /graph | meta + counts |
GET /stats | { nodes, links, byLayer } |
GET /search?q=&limit= | ranked nodes (exact > prefix > substring) |
GET /nodes?layer=&cluster=&type=&q=&limit=&offset= | { total, nodes } |
GET /nodes/:id | one node (404 if missing) |
GET /neighbors/:id?depth=&limit= | { center, nodes, links } |
GET /path/:from/:to | { path } (chain of nodes, or null) |
CORS is open, so a browser viewer can fetch a live graph directly.
MCP
booboo mcp --snapshot my.booboo.json
Speaks MCP over stdio. Point any client at it (Claude Desktop / Claude Code):
{ "mcpServers": { "booboo": { "command": "booboo", "args": ["mcp", "--snapshot", "/abs/path/my.booboo.json"] } } }
Tools: booboo_stats · booboo_search · booboo_node · booboo_neighbors · booboo_path.
API
import { BoobooIndex, loadSnapshot, createRestServer, runMcp } from "@booboo-brain/serve";
const ix = new BoobooIndex(loadSnapshot("my.booboo.json"));
ix.search("invoice");
ix.neighbors("dionisos", 2);
ix.path("a", "b");
createRestServer(ix).listen(8787);
BoobooIndex is pure (no Node/network deps), so it also runs in the browser.