Setup
Get a Logic Bee API workspace ready so coding-agent skills can run.
Outcome
MCP tools are visible in the client. A slash name starts one skill.
Assumptions
- You work in a Logic Bee API repo, not in this documentation repo.
- The repo contains
.agents/skills/,.agents/rules/catalog.md, andscripts/mcp/server.ts. - This site does not host the skill files.
Prerequisites
- Installation: Git, Node.js 22.x or newer, pnpm 10.x, clone,
.env,pnpm i - A client that can spawn a local stdio MCP server (Cursor, Claude Code, or another stdio client)
taronPATHwhen a packaged SQLite index must unpack from.logic/*.tar.gz
Goal
Register the logic-bee MCP server. Rebuild workspace indexes. Confirm a skill starts.
Procedure
1. Open the Logic Bee workspace
Open the Logic Bee API repository in the client.
Confirm these paths exist:
.agents/skills/logic-discovery/SKILL.md.agents/rules/catalog.mdscripts/mcp/server.ts
2. Confirm Node and the install
From the repo root:
node -v
pnpm -v
Expected result: Node.js 22.x or newer. pnpm 10.x.
If node_modules is missing, run pnpm i.
Native module better-sqlite3 must match this Node. hook_graph search and impact need FTS5.
3. Rebuild workspace indexes
pnpm update-workspace writes generated files. Run it from the repo root before the first MCP call.
pnpm update-workspace
Expected result: Exit code 0. Interface registry, hook barrels, canonical imports, and the hook-graph index rebuild.
4. Confirm MCP registration
The client must spawn the server with this workspace as cwd.
Checked-in files:
| File | Typical command |
|---|---|
.mcp.json | node --import tsx scripts/mcp/server.ts |
.cursor/mcp.json | the same server entry, sometimes through a shell wrapper |
Equivalent: npx tsx scripts/mcp/server.ts.
The registration key is logic-bee in the checked-in files. Some clients also use bobWorkspace. The server internal name stays logic-bee.
If you register the server in a user-scoped file, set an absolute cwd to this repo.
5. Enable the server in the client
- Open MCP settings in the client.
- Enable
logic-beeorbobWorkspace. - Refresh MCP, or reload the window.
If the tools are not visible, stop. Do not grep the tree for catalogs MCP owns.
Expected result: The session lists logic-bee tools, including flow_documents and hook_graph.
6. Ping MCP
After tools are visible, a skill preflight calls:
flow_documents { op: "list" }
For hook work, the skill also calls hook_graph { op: "stats" }.
Do not run npx tsx scripts/logic-bee-*.ts as a substitute. Do not pipe JSON-RPC in the shell.
Most tools do not need .env. query_db and list_collections need Mongo Atlas variables in the project-root .env. Do not open .env to diagnose a tool error.
7. Start a skill
If the slash name does not start the skill, put the file on line 1:
Load rules by exact path from .agents/rules/catalog.md. Do not glob .agents/rules/.
Expected result: The skill asks for type if type is missing, or it starts a broad MCP sweep.
Verification
node -vreports 22.x or newer.pnpm update-workspaceexits 0.- An MCP json file exists.
- The client shows logic-bee tools.
/logic-discoverystarts, or the@.agents/skills/logic-discovery/SKILL.mdpath starts.
Recovery
| Symptom | Diagnosis | Resolution |
|---|---|---|
| Tools are not in the session | MCP json, cwd, or client cache | Confirm the server command and cwd. Enable the server. Refresh MCP. |
NODE_MODULE_VERSION or missing better-sqlite3 bindings | Native module built for another Node | Use Node 22.x. Run pnpm i, then pnpm rebuild better-sqlite3. |
project_graph index not found | No CFP project index | Need .logic-index/project-index.db or .logic/project-index.tar.gz. MCP cannot create that index. |
query_db or list_collections fails on env | Mongo variables missing | Get a project-root .env from the team. Do not read .env in the agent. |
Skill greps apps/api/src/app/hooks for MCP facts | Tools missing and the agent fell back | Stop. Fix MCP. Call the skill again. |