Serve it to your editor
Expose the knowledge layer over MCP and wire your editors (Claude Code, Windsurf, Kiro) in one command.
The third layer. Once the knowledge layer is built, contextlake serve
exposes it as an MCP server, so any MCP client (Claude Code, Windsurf, Kiro, Cursor,
Postman, …) can query the graph directly instead of grepping.
Start with ask. One tool, natural language: ask("who calls charge_order") /
ask("what breaks if I change OrderService") / ask("what extends BaseController") /
ask("explain the orders-api"). It classifies the question, routes it to the right
substrate below (definition / callers / dependents / subclasses / impact / owners /
explain / search), resolves the symbol or repo, and returns one labeled answer (graph
facts cited; explain returns advisory wiki prose, or the repo's grounded anatomy when
no wiki exists yet). An agent that would rather not choose among the tools can just ask.
Most of it needs no model. The underlying graph tools work on their own ,
search_code, find_definition, find_callers, find_dependents, get_node,
get_neighbors, shortest_path, graph_stats, repo_dependencies, repo_flow,
repo_event_flow, blast_radius, who_knows, get_wiki, get_readme,
get_repo_brief, list_repos, get_repo_links, graph_health, plus a kb://stats
resource with the store counts.
semantic_search / hybrid_search are the two exceptions: they register only when
embeddings exist (an [embeddings] section in kb.toml and a contextlake embed
run). Without that, the server starts fine and says so, the two tools are simply
absent from the tool list, and everything above still works.
The quick way: let contextlake wire your editors#
From your workspace root:
contextlake steer --config ~/.contextlake/kb.toml
This writes the per-tool steering files so agents pick up the workspace context and the MCP server natively:
AGENTS.md(overview, the knowledge tools, and guardrails), a thinCLAUDE.mdthat imports it,.windsurfrules, and.kiro/steering/.- A merged
.mcp.jsonentry for thecontextlake serveserver. - A generic library of agent skills / workflows (
.claude/skills/,.windsurf/workflows/): investigate-root-cause, plan-before-coding, surgical-change, review-before-landing, ship-safely, use-knowledge-graph, a strong operating playbook even for a small-context model.
It never corrupts your existing files. If you already have an AGENTS.md, CLAUDE.md,
.windsurfrules, or .kiro/steering, your content is preserved and only a clearly-delimited
managed block is appended (and just that block is refreshed on re-runs). .mcp.json is merged
so your other servers stay; a skill file you wrote with the same name is kept as-is; custom
layers like .devin/ are left untouched.
Wiring it by hand#
Claude Code:
claude mcp add contextlake-kb -- contextlake serve --config ~/.contextlake/kb.toml
Windsurf / Devin, add the same server in its MCP config (Cascade's MCP Servers panel, or
~/.codeium/windsurf/mcp_config.json):
{
"mcpServers": {
"contextlake-kb": {
"command": "contextlake",
"args": ["serve", "--config", "~/.contextlake/kb.toml"]
}
}
}
Once connected#
Ask the agent things like "where is OrderService defined?", "who calls charge?", or
"which repos depend on shared-core?" and it calls the graph tools directly, you can even
have it draft wiki pages from the graph without the built-in wiki command.
