Start

Connect your agent

Lore is an MCP server that speaks over standard input and output. Any MCP client can use it; this page covers the ones people use and how to check the connection.

The quick way python3 install.py configures Claude Code and Copilot CLI for you. Read on if you want to do it by hand, use VS Code, or understand what it changed.

Two things every client needs

  1. The server entry: a command the client runs to start Lore, python3 /absolute/path/to/lore/mcp_server.py.
  2. Instructions telling the model to call the tools. Lore sends them itself when a client connects (about 300 tokens), and the wording follows your approval setting, so the agent never claims a waiting rule is active. Clients that do not show server instructions need the same text in an instruction file; install.py writes it for Copilot CLI.
Use absolute paths Give the client the absolute path to mcp_server.py, and have the agent pass absolute file paths to the tools. Relative paths are resolved against the folder the server was started in, which may not be the project.

Claude Code

claude mcp add --scope user lore -- python3 /home/YOU/projects/lore/mcp_server.py

--scope user makes Lore available in every project; the default local scope covers only the current one. Then:

claude mcp list          # lore should show as Connected
claude mcp get lore      # scope, command, status
claude mcp remove lore -s user     # to undo

Start a new session afterwards. Claude Code asks permission before using an MCP tool the first time; get_rules and search_rules only read, and the tools that save rules write only to ~/.lore.

GitHub Copilot CLI

Copilot CLI reads ~/.copilot/mcp-config.json. Add the server interactively (/mcp add, type STDIO, command python3, argument the path to mcp_server.py) or edit the file:

{
  "mcpServers": {
    "lore": {
      "type": "local",
      "command": "python3",
      "args": ["/home/YOU/projects/lore/mcp_server.py"],
      "env": {},
      "tools": ["*"]
    }
  }
}

If the file already lists servers, add lore next to them instead of replacing the file. Restart copilot, then check:

copilot mcp list
copilot mcp get lore     # type, status and the eight tools

Instructions go in a user-level file so they apply to every repository. install.py maintains a marked block in ~/.copilot/copilot-instructions.md; if you write it yourself, use the text core/instructions.py produces. Repository-level files (.github/copilot-instructions.md, .github/instructions/*.instructions.md, AGENTS.md) are also read by the CLI.

Moving target Copilot CLI changes quickly. If a path or key stops working, check the "custom instructions" and "add MCP servers" pages of its documentation.

VS Code (Copilot agent mode)

Add the server to your user MCP configuration so it applies to every workspace (Command Palette → MCP: Open User Configuration):

{
  "servers": {
    "lore": {
      "type": "stdio",
      "command": "python3",
      "args": ["/home/YOU/projects/lore/mcp_server.py"]
    }
  }
}

Note the differences from Copilot CLI: the top-level key is servers and the type is stdio. Then add the instructions to a user-level instructions file (Command Palette → Chat: New Instructions File → User):

---
applyTo: "**"
---
(paste the text printed by:  python3 -c "from core import instructions; print(instructions.text())" )

Run that command from the Lore folder. Menu names vary by version. Use agent mode: MCP tools are not available in plain completions.

Any other MCP client

Run python3 /absolute/path/to/mcp_server.py as a stdio server. The protocol details are on the mcp_server.py page.

Verify the server by itself

If a client misbehaves, test the server without it:

printf '{"jsonrpc":"2.0","id":1,"method":"tools/list"}\n' | python3 mcp_server.py

The web UI offers the same check in Tools → Project → MCP check.

No MCP? The static fallback

If your client cannot use MCP, export the approved rules as instruction files it loads natively:

python3 review.py --name myapp sync

This writes <project>/.github/instructions/lore-*.instructions.md with matching applyTo globs. Copilot (VS Code and CLI) loads them. The files are marked as generated, are rewritten on every sync, stale ones are removed, and they are never imported back as rules, so edit the rules, not the files. Rules whose text hides characters are not exported, and a target that is a symlink, or a folder that resolves outside the project, is refused.

Trade-offs of the fallback It writes into your repository, so you may or may not want to commit the files. Everything approved is exported with no per-task selection, so it costs more tokens than the MCP route. Section-scoped rules need the section to exist in the project map: re-run memorize.py after adding folders.