workspace-kb
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@workspace-kbsearch the knowledge base for payment failure issues"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
workspace-kb
English · 中文文档
Local LanceDB knowledge base for agent-friendly markdown workspaces.
Index curated docs / skills / wiki — not your full source tree. Agents use MCP (kb_search → kb_read); scripts use the CLI. Search returns short snippets; reads open one heading.
Version | 1.5 |
License | MIT |
Repo |
Why
Cut token waste: agents get snippets + one section, not whole manuals.
Route multi-repo workspaces: find the right doc/repo first, then
rglocally.Project memory: share ops/triage facts across Cursor · Codex · CLI — tags, redaction, TTL, dashboard audit.
Dashboard tracks proxy savings (
chars/4) and MCP health — not LLM billing.
Related MCP server: kb-mcp
Requirements
Node.js >= 20
One embedding backend:
Ollama (default):
ollama pull bge-m3OpenAI / compatible:
"embedProvider": "openai"+OPENAI_API_KEY
ollama pull bge-m3
# low VRAM alternative:
# WORKSPACE_KB_MODEL=nomic-embed-text # set matching embedDim in configQuick start
npx workspace-kb init
npm install
npx workspace-kb ingest
# one command: sync MCP/port config + start dashboard (auto incremental ingest on)
npx workspace-kb up --port 8700
# open http://127.0.0.1:8700/
npx workspace-kb search "payment failure"
npx workspace-kb downNew/changed markdown under configured paths is auto-ingested while the dashboard runs (~2s debounce). Also:
npx workspace-kb watch # auto-ingest only
npx workspace-kb up --no-watch # start without watchingConfig: "autoIngest": false to disable; "watchDebounceMs": 3000 to tune.
Existing project:
npm install github:phuhao00/workspace-kb#master # pin #master — old builds lack up/start
npx workspace-kb up --port 8700
# first time / big doc changes: npx workspace-kb up --port 8700 --ingestInstall / upgrade
npm install github:phuhao00/workspace-kb#masterAuto-setup (install · update · ingest · setup)
If workspace-kb.config.json is found (cwd or parent, or INIT_CWD on postinstall), the package writes:
Path | Purpose |
| MCP server (default HTTP → |
|
|
| Cursor skill for architecture/ops questions |
| Continue.dev merge snippet |
| Agent routing (skip if |
Disable: WORKSPACE_KB_SKIP_SETUP=1 or "setup": { "enabled": false }.
After upgrade: restart start/serve, then click 重启 MCP on the dashboard (or reload Cursor MCP).
CLI reference
workspace-kb <command>
up [--port <n|auto>] [--ingest|--full] [--no-watch] # ★ sync+start+auto-ingest
down [--port <n>] # ★ stop
watch # auto-ingest only (foreground)
init [--force] [--name app] [--port <n>]
setup [--port <n>]
ingest [--full]
start | stop | serve [--port <1-65535|auto>] [--no-watch]
search | read | status | health | stats | projects | memory | feedbackDay-to-day: up / down. While the dashboard runs, markdown under configured paths is watched and incrementally ingested.
Dashboard
npx workspace-kb start # detached (pid under ~/.workspace-kb/)
# or foreground:
npx workspace-kb serve --port 8787Panel | What you can do |
控制 | Restart MCP · re-setup · incremental/full ingest · restart server |
健康检查 | config · workspaceRoot · index · embed · MCP · hit rate |
项目记忆 | Put / delete by key·id / prune expired; audit list |
多项目 | Local registered instances + ports |
Metrics | calls · hit rate · est. returned/saved tokens |
Recent events | 👍/👎 feedback → path boost in search |
HTTP MCP: http://127.0.0.1:<port>/mcp — Cursor/Continue need start/serve running.
Local HTTP APIs
Method | Path | Notes |
GET |
| Health checks + hit-rate summary |
GET |
| Status, projects, feedback, ingest job, memory preview |
GET |
| List project memory facts |
GET |
| Token proxy dashboard payload |
GET |
| Multi-project registry |
GET |
| Feedback summary |
POST |
| Drop MCP sessions (clients reconnect) |
POST |
| Re-run auto-setup |
POST |
| Body |
POST |
|
|
POST |
|
|
POST |
|
|
POST |
| Remove expired rows from disk |
POST |
| Respawn dashboard |
* |
| Streamable HTTP MCP |
Project memory (v1.5)
Shared project ops facts across Cursor + Codex + CLI (env topology, staging ports, redacted triage conclusions).
Not IDE personal Memories, and not a substitute for AGENTS.md or the doc index.
What belongs where
Store | Use for | Example |
Cursor / Codex Memories | Personal preferences | “I prefer TypeScript” |
| Team hard rules (git-committed) | Branch model, no prod config edits |
| Docs · skills · wiki | One section of a payment runbook |
| Shared ops facts (redacted, TTL, dashboard audit) | “Staging hallapi HTTP :8080” |
Good writes: staging hosts/ports, redacted incident conclusions, temporary feature flags.
Never write: passwords / API keys / tokens, ID numbers / PII, pure personal preferences.
CLI
# upsert by --key; default TTL 90 days; --ttl 0 = never expire
npx workspace-kb memory put "staging hallapi HTTP :8080" \
--key staging-hallapi --tags ops,test-env --ttl 90
npx workspace-kb memory search "hallapi"
npx workspace-kb memory list
npx workspace-kb memory delete --key staging-hallapi
# or: npx workspace-kb memory delete --id <uuid>
npx workspace-kb memory prune # drop expired rowsSubcommand | Notes |
|
|
| Score against key / text / tags |
| Recent non-expired (default limit 50) |
|
|
| Remove expired lines from |
MCP tools
Tool | Role |
| Write; required |
| Search; optional |
| List; optional |
| Delete by |
kb_search also returns relatedMemories (up to ~3 matching ops facts).kb_status includes a short recent-memory peek.
Validation and TTL
Same checks for dashboard / CLI / MCP:
Non-empty text, max 2000 characters
Looks like a preference (“I prefer…”, “我喜欢…”) → rejected — use IDE Memories
Looks like secrets / Bearer / private key / ID card → rejected — redact first
TTL: default 90 days;
0= never; max 3650 daysSame
keyupserts (replaces the previous row)
Data shape
Path: .workspace-kb/memory/facts.jsonl (one JSON object per line; git-ignore dataDir).
{
"id": "uuid",
"ts": "2026-09-02T09:00:00.000Z",
"key": "staging-hallapi",
"text": "staging hallapi HTTP :8080",
"tags": ["ops", "test-env"],
"source": "cli",
"ttlDays": 90,
"expiresAt": "2026-12-01T09:00:00.000Z"
}expiresAt: null means never. Expired rows are hidden from search/list by default; use prune or the dashboard button to delete them from disk.
Agent workflow
Before re-investigating:
kb_memory_search(or checkrelatedMemoriesonkb_search).After a durable, redacted conclusion:
kb_memory_putwith tags (ops, service, env).Drop stale facts on the 项目记忆 panel, or use a short TTL then
prune.
Features (v1.4+)
Area | Behavior |
Hybrid search | Vector + lexical (incl. CJK bigrams) + kind boost + feedback boost |
Query rewrite | Builtin CN/EN synonyms; extend via |
Incremental ingest | File fingerprints + vector cache; unchanged files skip embed; |
Project memory |
|
Daemon |
|
Cloud embed |
|
Continue | Auto snippet + |
Configure
Put workspace-kb.config.json at the workspace root (or set WORKSPACE_KB_CONFIG):
{
"workspaceRoot": ".",
"dataDir": ".workspace-kb",
"model": "bge-m3",
"embedDim": 1024,
"embedProvider": "ollama",
"incremental": true,
"rewriteQuery": true,
"hybridVectorWeight": 0.65,
"hybridLexicalWeight": 0.35,
"synonyms": {
"登不进": ["登录", "login", "token"],
"充值未到账": ["支付", "pay", "订单", "callback"]
},
"paths": [".agents", "docs", "openwiki", "*.md", ".cursor/skills"],
"childRepos": ["api", "web"],
"childGlobs": ["README*.md", "docs/**/*.md"],
"skipDirs": ["node_modules", "vendor", ".git", ".next", "Library", "logs", ".workspace-kb"],
"setup": {
"mcpServerId": "my-project-kb",
"dashboardPort": 19090,
"mcpMode": "http",
"agentsMd": true,
"cursorSkill": true,
"continueConfig": true
}
}OpenAI / compatible embeddings
{
"embedProvider": "openai",
"model": "text-embedding-3-small",
"embedDim": 1536,
"openaiBaseUrl": "https://api.openai.com/v1"
}set OPENAI_API_KEY=sk-...
npx workspace-kb ingest --fullData layout (git-ignore dataDir)
.workspace-kb/
lancedb/ # LanceDB table
meta.json
usage.jsonl # search/read proxy metrics
feedback.jsonl # 👍/👎
fingerprints.json # incremental ingest
cache/vectors.json # embedding cache
memory/
facts.jsonl # project ops memory (shared across tools)MCP modes
|
| Notes |
|
| Needs |
|
| No dashboard required; pin config path (Cursor often ignores |
Multiple projects on one machine
Each workspace has its own config + .workspace-kb/. Use any free TCP port (1–65535). 8787 / 8788 are examples only — not a hard limit.
Resolution order: --port → WORKSPACE_KB_PORT → setup.dashboardPort → local registry → default 8787.
# pin any port in config:
# "setup": { "dashboardPort": 19090 }
npx workspace-kb start # config port (also syncs MCP URL)
npx workspace-kb start --port 19091 # override + rewrite config + `.cursor/mcp.json`
npx workspace-kb start --port auto # OS free port + sync bindings
npx workspace-kb stop # stops config/registry port
npx workspace-kb setup --port 19090 # rewrite MCP URL + persist config only
npx workspace-kb projectsstart / serve sync after the listen port is chosen: setup.dashboardPort, .cursor/mcp.json, and .continue/workspace-kb.mcp.json.
Prefer project-local .cursor/mcp.json. Examples: examples/multi-a, examples/multi-b, examples/multi-project.mcp.json.
Indexing Chinese docs
Keep
"*.md"inpathsso rootREADME.md/README.zh-CN.mdare ingested.Prefer clear Chinese
##headings underdocs/forkb_read.Add spoken symptoms to
synonyms(e.g. 登不进, 充值未到账). Full guide: README.zh-CN.md.
Cursor / agent tips
Keep
npx workspace-kb startrunning (HTTP MCP).Ask architecture/ops questions — rule + skill should trigger
kb_search.Before re-triage:
kb_memory_search; after a durable conclusion:kb_memory_put(redact + tags + TTL).Confirm usage:
Get-Content .workspace-kb/usage.jsonlor dashboard Recent events.If
kb_statusshowsworkspaceRootunder your home directory, MCP is mis-bound — use HTTP mode or pinWORKSPACE_KB_CONFIG.
Troubleshooting
Symptom | Fix |
| Instance already on that port — use it, |
Dashboard old UI / no 项目记忆 / 404 | Kill old node on that port; reinstall |
| Only search/read/MCP write usage — |
Empty search / low hit rate |
|
| Preferences → IDE Memories; redact secrets then put |
Memory file has lines but search is empty | Likely expired — check |
Ollama errors |
|
Agent never calls KB | Restart MCP; confirm rule/skill exist; ask explicitly “先 kb_search …” |
Env
Variable | Meaning |
| Absolute path to config JSON |
| Override workspace root |
| Embedding model id |
| Expected dimension |
|
|
| Cloud embeddings |
| Default |
| Dashboard port (any |
|
|
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Knowledge base MCP for AI agents on iknow.dev. Search, read, and maintain via OAuth.
Make your knowledge agent-ready. One MCP endpoint, 5 connectors, 3 search modes.
Team docs served to AI agents over MCP - search, Markdown reads, version pinning, read audit.
Shared, peer-validated knowledge archive for AI agents — search, contribute, and validate via MCP
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search, deep-read, and build knowledge bases from Markdown, PDF, DOCX, and PPTX documents via MCP tools for retrieval, document navigation, and ingestion.50627MIT
- AlicenseNot gradedqualityBmaintenanceProvides LLM agents with a structured, queryable, local-first knowledge base with typed documents and full-text search via MCP.MIT
- AlicenseAqualityAmaintenanceEnables AI agents to discover, read, search, and install Markdown-based knowledge (rules, skills, workflows) from a local directory via MCP tools.1229MIT
- FlicenseNot gradedqualityBmaintenanceA CLI tool and MCP server that turns markdown documentation into a searchable, queryable knowledge base.22
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/phuhao00/workspace-kb'
If you have feedback or need assistance with the MCP directory API, please join our Discord server