MCP Usage Guide
Complete guide for using Lore MCP server with Claude Code.
Overviewβ
Lore MCP is a cloud-based API system that allows Claude to interact with your coding context history. All data is stored in the cloud, enabling:
- Team context sharing - Share coding context with team members working on the same project
- Cross-device sync - Access your context history from anywhere
- Persistent storage - Context survives beyond local session
Lore MCP requires an API key. All operations (except lore_init) call the cloud API.
Architectureβ
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Claude Code ββββββΆβ Lore MCP ββββββΆβ Lore API β
β (Client) β β (Server) β β (Cloud) β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β
βΌ
LORE_API_KEY
(Required)
Available Toolsβ
Lore MCP provides 5 tools:
lore_commitβ
Create a context commit to record AI coding decisions.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
intent | string | Yes | Primary goal of the coding session |
files_changed | string[] | No | List of modified file paths |
decision | string | No | The approach taken |
assumptions | string[] | No | Assumptions made |
alternatives | string[] | No | Alternative approaches considered |
Example:
User: "Record this authentication implementation"
Claude: [Uses lore_commit]
{
"intent": "Implement JWT authentication for API",
"files_changed": ["src/auth/jwt.py", "src/middleware/auth.py"],
"decision": "Used PyJWT with RS256 algorithm",
"assumptions": ["Redis available for token blacklist"],
"alternatives": ["Session-based auth", "OAuth2 only"]
}
lore_blameβ
Find the AI context that led to code changes. For team users, includes context from team members on the same project.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
file_path | string | Yes | Path to the file |
line_number | int | No | Specific line number |
Example:
User: "Why was src/auth/jwt.py written this way?"
Claude: [Uses lore_blame with file_path="src/auth/jwt.py"]
lore_searchβ
Search context commits by keywords. For team users, includes results from team members on the same project.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search query |
limit | int | No | Max results (default: 10) |
lore_initβ
Initialize Lore by setting up Claude Code hooks for automatic context capture.
- MCP Server:
~/.claude.json(global, one-time setup) - Hooks:
.claude/settings.local.json(per-project, each init)
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
force | bool | No | Re-setup even if already configured |
lore_statusβ
Get Lore status and usage information.
Parameters: None
Team Context Sharingβ
Lore automatically shares context with team members working on the same git repository.
How It Worksβ
- When you commit context, Lore records your project's git remote URL
- Team members with the same git remote URL can see each other's contexts
lore_blameandlore_searchautomatically include team results
Requirementsβ
- All team members must be on the same team in the dashboard
- Projects must have the same git remote URL (e.g.,
git@github.com:company/repo.git) - Each team member needs their own API key
Best Practicesβ
1. Be Specific About Intentβ
Bad: "Fixed bugs"
Good: "Fixed race condition in session handling causing duplicate orders"
2. Record Alternativesβ
The most valuable context for future developers:
{
"alternatives": [
"Polling (rejected: server load)",
"Long polling (rejected: complexity)",
"WebSockets (chosen: real-time needed)"
]
}
3. Record After Significant Workβ
Don't wait until end of session. Record after each major decision.
4. Search Before Implementingβ
User: "Search for any authentication contexts"
Check if similar work was done before.
Error Handlingβ
"API key not configured"β
Set LORE_API_KEY in your MCP server config.
"Invalid API key"β
Check your API key at dashboard.
"Usage limit exceeded"β
You've reached your plan's monthly limit. Upgrade or wait for reset.
Automatic Context Captureβ
With hooks enabled (lore init --hooks):
- PostToolUse: Tracks file changes during session
- Stop: Auto-creates context commit when session ends
No manual lore_commit needed!
Pricingβ
| Plan | Commits/Month | Team Members | Price |
|---|---|---|---|
| Free | 100 | 1 | $0 |
| Pro | 1,000 | 5 | $9/mo |
| Team | Unlimited | Unlimited | $20/mo |
Visit dashboard to manage your plan.