@lore-co/mcp
v0.2.17
Published
Lore MCP server for shared engineering knowledge and prior agent sessions
Readme
@lore-co/mcp
Local stdio MCP server for querying Lore shared knowledge and prior agent sessions.
Configure
For Cowork and other local hosts on the same machine, connect once with the Lore CLI:
lore connect --login --agent cowork --folder .The MCP server then reads the API URL and credential from the CLI's mode-0600
~/.lore/config.json. It rejects symlinks, oversized files, files owned by
another user, and group/world-accessible permissions.
Hosts that do not use the Lore CLI can configure the connection explicitly:
{
"mcpServers": {
"lore": {
"command": "npx",
"args": ["-y", "@lore-co/[email protected]"],
"env": {
"LORE_API_URL": "https://your-lore.example.com",
"LORE_WORKSPACE_TOKEN": "YOUR_WORKSPACE_TOKEN"
}
}
}
}Node.js 22 or newer is required. Use a separate, revocable workspace token for each host. Never commit the token.
Explicit constructor options take precedence over environment variables, which take precedence over the stored CLI config. Overriding the API URL also requires an explicit token or header; the server will not send the stored token to a different endpoint.
The default tool set is read-only:
prepare_contextask_loresearch_learningsget_learningshare_loresearch_approachesprepare_approachlist_skillsread_skill
To register remember_learning, correct_learning, forget_learning, attach_image,
draft_approach, revise_approach, save_approach, use_approach,
report_approach_run, decide_approach_run, preview_skill, and propose_skill, set
LORE_MCP_WRITE_TOOLS=true. Host instructions should still require explicit
user intent before every shared-knowledge mutation.
Approaches turn reviewed work into reusable steps with inputs, prerequisites, and result checks. They appear inside Learnings. A receiving agent uses its ordinary tools to perform the work and records the outcome against the exact saved version. See Make this repeatable.
Skills preserve a complete SKILL.md inside Learnings → Skills. List enabled
skills for the repository, then read a matching skill before using it. Imports
from agents remain proposals until a workspace owner or admin reviews and enables them.
Proposals for all repositories use repo: null and require owner or admin review.
Disabling a skill stops new retrievals. See Repository skills.
For a scanner or tool that only needs context, create a repository-scoped
connection in Connect → Connect a tool and set LORE_MCP_CONTEXT_ONLY=true
alongside its token and API URL. This exposes only prepare_context. Send
task and optional files; the connection supplies the repository. Do not
enable write tools for this connection. See
tool connections for the response and
setup options.
Capability boundary
MCP gives a host explicit Lore tools. It does not provide ambient transcript capture, automatic prompt injection, or Context Guard unless the host itself implements those boundaries. The server returns static, sanitized tool errors and does not expose upstream URLs, response bodies, stack traces, or credentials.
attach_image saves a local raster image to an existing recorded source. Supply
eventId (Lore's event UUID, including a learning's source.eventId), an explicit
local path, and role (user or assistant). It validates the bytes and returns
saved image metadata only after the API acknowledges the upload. The source must
already exist in the current workspace. This works for any MCP host that exposes
the file to the local server; it does not reconstruct images from missing paths.
See the Copilot templates and Claude Cowork plugin.
Private links
Use lore share learning <id>, lore share session <id> --event <event-id>,
or lore share delivery <id> --learning <learning-id> to return an existing
workspace link. The anchor flags are optional. Add --json for structured output.
IDs come from Lore results, such as lore ask --json.
MCP exposes the read-only share_lore tool with kind, id, and optional
eventId or learningId. The SDK offers client.share(...). These resolve the
resource using the current credential before returning a link. They do not
publish content or grant access; recipients must sign in to the same workspace.
Hosted connections use https://uselore.co. For self-hosting, connect with
--dashboard-url https://lore.example.com, set LORE_DASHBOARD_URL for MCP,
or pass dashboardUrl to the SDK. The URL must be an HTTP(S) origin.
