l-log-mcp-server 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +121 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +54702 -0
- package/dist/index.test.d.ts +2 -0
- package/dist/index.test.d.ts.map +1 -0
- package/package.json +40 -0
- package/scripts/postinstall.js +28 -0
package/README.md
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# l-log-mcp-server
|
|
2
|
+
|
|
3
|
+
The standalone MCP (Model Context Protocol) server for `llm-lean-log`. It allows AI agents to search and access your coding task history.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Global Installation (Recommended)
|
|
8
|
+
|
|
9
|
+
Install globally using `bun`:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bun i -g l-log-mcp-server
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### From Source
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
cd packages/mcp-server
|
|
19
|
+
bun i
|
|
20
|
+
bun run build
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Quick Start Configuration
|
|
24
|
+
|
|
25
|
+
After installing globally, you can get the configuration snippets for your favorite AI client by running:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
l-log-mcp-server --config
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### OpenCode Configuration
|
|
32
|
+
|
|
33
|
+
Add this to your `~/.opencode.json`:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"mcp": {
|
|
38
|
+
"llm-memory": {
|
|
39
|
+
"type": "local",
|
|
40
|
+
"command": ["l-log-mcp-server"],
|
|
41
|
+
"environment": {
|
|
42
|
+
"LLM_LOG_PATH": "/absolute/path/to/your/logs/chat.csv"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Claude Desktop / Claude Code Configuration
|
|
50
|
+
|
|
51
|
+
Add this to your `claude_config.json` (Desktop) or `.claude/settings.json` (Code):
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"mcpServers": {
|
|
56
|
+
"llm-memory": {
|
|
57
|
+
"command": "l-log-mcp-server",
|
|
58
|
+
"env": {
|
|
59
|
+
"LLM_LOG_PATH": "/absolute/path/to/your/logs/chat.csv"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Features
|
|
67
|
+
|
|
68
|
+
### Resources
|
|
69
|
+
|
|
70
|
+
- `memory://recent`: View the last 50 log entries.
|
|
71
|
+
- `memory://stats`: View statistics about your logs.
|
|
72
|
+
|
|
73
|
+
### Tools
|
|
74
|
+
|
|
75
|
+
- `search_logs(query)`: Search for specific topics or errors in your history.
|
|
76
|
+
- `get_task_history(taskName)`: Get all logs related to a specific task.
|
|
77
|
+
|
|
78
|
+
### Prompts
|
|
79
|
+
|
|
80
|
+
- `summarize_recent_work`: A prompt template to summarize recent activities.
|
|
81
|
+
|
|
82
|
+
### Postinstall
|
|
83
|
+
|
|
84
|
+
The package includes a `postinstall` script to streamline the setup process for new users.
|
|
85
|
+
|
|
86
|
+
Why it's needed: Setting up an MCP server requires specific configuration (like environment variables and command paths) that can be easily overlooked. The postinstall script provides an immediate, copy-paste-able configuration snippet tailored for your client (like OpenCode) right after installation.
|
|
87
|
+
|
|
88
|
+
How it runs: This script is triggered automatically by your package manager (`bun`, `npm`, or `yarn`) immediately after the global or local installation of `l-log-mcp-server` finishes.
|
|
89
|
+
|
|
90
|
+
Example output during installation:
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
✨ l-log-mcp-server summary:
|
|
94
|
+
To use this with OpenCode, add the following to your ~/.opencode.json:
|
|
95
|
+
{
|
|
96
|
+
"mcp": {
|
|
97
|
+
"llm-memory": {
|
|
98
|
+
"type": "local",
|
|
99
|
+
"command": [
|
|
100
|
+
"l-log-mcp-server"
|
|
101
|
+
],
|
|
102
|
+
"environment": {
|
|
103
|
+
"LLM_LOG_PATH": "/absolute/path/to/your/logs/chat.csv"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
Note: Replace /absolute/path/to/your/logs/chat.csv with the actual path to your chat.csv file.
|
|
110
|
+
You can also get this config anytime by running: l-log-mcp-server --config
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### CLI Usage
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
l-log-mcp-server --help
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
For more details about the core logic, see [mcp/README.md](../mcp/README.md).
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main function to start the MCP server.
|
|
3
|
+
*
|
|
4
|
+
* @param args - Command line arguments.
|
|
5
|
+
* @param env - Environment variables.
|
|
6
|
+
*/
|
|
7
|
+
export declare function run(args?: string[], env?: Record<string, string | undefined>): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA6CA;;;;;GAKG;AACH,wBAAsB,GAAG,CACxB,IAAI,GAAE,MAAM,EAA0B,EACtC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,iBAsErD"}
|