@loupekit/mcp 0.14.0-next.82 → 0.14.1-next.83
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 +25 -31
- package/dist/index.js +8 -5
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
The server talks to your MCP client over stdio: the client starts the server as a child process and exchanges messages with it over standard input and output.
|
|
10
10
|
|
|
11
|
-
> **Warning — known issue in 0.14.0:** the published package fails to start with `ERR_MODULE_NOT_FOUND` for `@loupekit/shared`. This affects `npx -y @loupekit/mcp` and the global `loupe-mcp` command. The compiled server imports `@loupekit/shared` at runtime, but the package lists it only as a development dependency, so npm does not install it. Until a fixed release is out, follow [Install from a source checkout](#install-from-a-source-checkout).
|
|
12
|
-
|
|
13
11
|
## Contents
|
|
14
12
|
|
|
15
13
|
- [Prerequisites](#prerequisites)
|
|
@@ -29,13 +27,29 @@ The server talks to your MCP client over stdio: the client starts the server as
|
|
|
29
27
|
- **A running Loupe server.** This is the backend that stores comments and serves the API the MCP server calls, for example the Node server `@loupekit/server`. To run one on your machine, see [Run the local server and dashboard](https://github.com/mohamed-ashraf-elsaed/loupe/blob/main/docs/how-to/run-local-server.md).
|
|
30
28
|
- **A project key and its project secret.** A *project* is the unit Loupe groups comments under. It has a public *project key*, such as `pk_demo_acme`, and a private *project secret*. The project secret is the admin key: the server accepts it in the `X-Loupe-Admin` header. For the demo project that `npm run seed` creates, the key is `pk_demo_acme` and the seed prints the secret as `admin key`.
|
|
31
29
|
- **An MCP client**, such as Claude Code.
|
|
32
|
-
- **
|
|
30
|
+
- **npm**, which includes `npx`. To run the server from a source checkout instead, you also need **git**.
|
|
33
31
|
|
|
34
32
|
## Install
|
|
35
33
|
|
|
34
|
+
### Install from npm
|
|
35
|
+
|
|
36
|
+
Run it without installing:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx -y @loupekit/mcp
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Or install it globally. This adds the `loupe-mcp` command:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm install -g @loupekit/mcp
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
> **Note:** Fixed in 0.14.1. The published 0.14.0 package fails at start with `ERR_MODULE_NOT_FOUND` for `@loupekit/shared`. On 0.14.0, run the server from a source checkout.
|
|
49
|
+
|
|
36
50
|
### Install from a source checkout
|
|
37
51
|
|
|
38
|
-
Use this method for
|
|
52
|
+
Use this method to run the server from the repository, for example while you work on Loupe itself.
|
|
39
53
|
|
|
40
54
|
1. Clone the repository:
|
|
41
55
|
|
|
@@ -75,34 +89,16 @@ Use this method for 0.14.0.
|
|
|
75
89
|
|
|
76
90
|
You should see an absolute path that ends in `/loupe`. You use it as `<ABSOLUTE_PATH_TO_LOUPE>` when you configure your client. Node.js 24 runs the TypeScript entry `packages/mcp/index.ts` directly, so you do not need to build the MCP package.
|
|
77
91
|
|
|
78
|
-
### Install from npm
|
|
79
|
-
|
|
80
|
-
Use this method once a release that fixes the 0.14.0 issue is out.
|
|
81
|
-
|
|
82
|
-
Run it without installing:
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
npx -y @loupekit/mcp
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Or install it globally. This adds the `loupe-mcp` command:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
npm install -g @loupekit/mcp
|
|
92
|
-
```
|
|
93
|
-
|
|
94
92
|
## Configure your MCP client
|
|
95
93
|
|
|
96
94
|
Add a `loupe` server to your client's MCP configuration. For Claude Code, this is `.mcp.json` in your project root.
|
|
97
95
|
|
|
98
|
-
For a source checkout:
|
|
99
|
-
|
|
100
96
|
```json
|
|
101
97
|
{
|
|
102
98
|
"mcpServers": {
|
|
103
99
|
"loupe": {
|
|
104
|
-
"command": "
|
|
105
|
-
"args": ["
|
|
100
|
+
"command": "npx",
|
|
101
|
+
"args": ["-y", "@loupekit/mcp"],
|
|
106
102
|
"env": {
|
|
107
103
|
"LOUPE_API": "<API_URL>",
|
|
108
104
|
"LOUPE_PROJECT_KEY": "<PROJECT_KEY>",
|
|
@@ -113,11 +109,10 @@ For a source checkout:
|
|
|
113
109
|
}
|
|
114
110
|
```
|
|
115
111
|
|
|
116
|
-
For
|
|
112
|
+
For a source checkout, set `"command": "node"` and `"args": ["<ABSOLUTE_PATH_TO_LOUPE>/packages/mcp/index.ts"]` instead, where `<ABSOLUTE_PATH_TO_LOUPE>` is the path that `pwd` printed in step 5 of the install.
|
|
117
113
|
|
|
118
114
|
Replace the placeholders:
|
|
119
115
|
|
|
120
|
-
- `<ABSOLUTE_PATH_TO_LOUPE>`: the path that `pwd` printed in step 5 of the install.
|
|
121
116
|
- `<API_URL>`: the base URL of your Loupe server, for example `http://localhost:8787`.
|
|
122
117
|
- `<PROJECT_KEY>`: the project whose comments the agent works on, for example `pk_demo_acme`.
|
|
123
118
|
- `<PROJECT_SECRET>`: that project's secret. `LOUPE_ADMIN_KEY` holds the project secret, and the server sends it as the `X-Loupe-Admin` header. Keep the file out of version control if it holds a real secret.
|
|
@@ -129,9 +124,11 @@ For other MCP clients, see [Connect Claude Code and other MCP clients](https://g
|
|
|
129
124
|
1. Start the server by hand, with the same values as your client configuration:
|
|
130
125
|
|
|
131
126
|
```bash
|
|
132
|
-
LOUPE_API=<API_URL> LOUPE_PROJECT_KEY=<PROJECT_KEY> LOUPE_ADMIN_KEY=<PROJECT_SECRET>
|
|
127
|
+
LOUPE_API=<API_URL> LOUPE_PROJECT_KEY=<PROJECT_KEY> LOUPE_ADMIN_KEY=<PROJECT_SECRET> npx -y @loupekit/mcp
|
|
133
128
|
```
|
|
134
129
|
|
|
130
|
+
For a source checkout, replace `npx -y @loupekit/mcp` with `node <ABSOLUTE_PATH_TO_LOUPE>/packages/mcp/index.ts`.
|
|
131
|
+
|
|
135
132
|
You should see this line on standard error:
|
|
136
133
|
|
|
137
134
|
```text
|
|
@@ -177,8 +174,6 @@ Terms used in the table:
|
|
|
177
174
|
cp "$HOME/.claude/settings.json.loupe-backup" "$HOME/.claude/settings.json"
|
|
178
175
|
```
|
|
179
176
|
|
|
180
|
-
> **Known issue in 0.14.0:** `get_recent_events` fails on every call with `Cannot access 'events' before initialization`. Use `get_activity_summary` or `get_files_touched` instead, or open the [/monitor page](#the-bridge-and-the-monitor-page).
|
|
181
|
-
|
|
182
177
|
For each tool's arguments and output, see the [MCP reference](https://github.com/mohamed-ashraf-elsaed/loupe/blob/main/docs/reference/mcp.md).
|
|
183
178
|
|
|
184
179
|
## Environment
|
|
@@ -210,10 +205,9 @@ If you run `install_agent_hooks`, Claude Code also reports its tool calls, promp
|
|
|
210
205
|
|
|
211
206
|
| Symptom | Cause | Fix |
|
|
212
207
|
| --- | --- | --- |
|
|
213
|
-
| The server exits at start with `ERR_MODULE_NOT_FOUND` for `@loupekit/shared`. |
|
|
208
|
+
| The server exits at start with `ERR_MODULE_NOT_FOUND` for `@loupekit/shared`. | You run `@loupekit/mcp` 0.14.0, which does not declare `@loupekit/shared` as a runtime dependency. | Use 0.14.1 or later (`npx -y @loupekit/mcp@latest`), or [install from a source checkout](#install-from-a-source-checkout). |
|
|
214
209
|
| A tool fails with an error such as `GET /v1/comments?projectKey=pk_demo_acme → 401`. | `LOUPE_ADMIN_KEY` is empty or is not the project secret. | Set `LOUPE_ADMIN_KEY` to the project secret, then restart the client. |
|
|
215
210
|
| The log shows `[loupe] bridge port 9800 is busy after 6 attempts — continuing without it`. | Another process, often a second Loupe MCP server, holds port 9800. | Stop the other process, or set `LOUPE_BRIDGE_PORT` to a free port. The comment tools work either way. |
|
|
216
|
-
| `get_recent_events` fails with `Cannot access 'events' before initialization`. | A defect in 0.14.0. | Use `get_activity_summary` or `get_files_touched`, or open `/monitor`. |
|
|
217
211
|
| Claude Code does not list `loupe` in `/mcp`. | `.mcp.json` is not in the folder where you started Claude Code, or you declined the trust prompt. | Start Claude Code from the project root and approve the server. |
|
|
218
212
|
|
|
219
213
|
For more cases, see [Troubleshooting in Connect Claude Code and other MCP clients](https://github.com/mohamed-ashraf-elsaed/loupe/blob/main/docs/how-to/connect-mcp-clients.md#troubleshooting).
|
package/dist/index.js
CHANGED
|
@@ -2594,6 +2594,9 @@ async function getComment({ id }) {
|
|
|
2594
2594
|
}
|
|
2595
2595
|
async function updateStatus({ id, status }) {
|
|
2596
2596
|
const stage = normalizeStatus(status);
|
|
2597
|
+
if (stage === "resolved") {
|
|
2598
|
+
return wrap(`#${id} was not changed: only a person resolves a comment. Set in_review, or call mark_thread_addressed, when the change is ready.`);
|
|
2599
|
+
}
|
|
2597
2600
|
await api(`/v1/comments/${encodeURIComponent(id)}`, { method: "PATCH", body: JSON.stringify({ status: stage }) });
|
|
2598
2601
|
bus.publishThread(id, stage === "resolved" ? "thread_resolved" : "status_changed", { status: stage });
|
|
2599
2602
|
return wrap(`#${id} \u2192 ${STAGE_LABELS[stage]}`);
|
|
@@ -2617,7 +2620,7 @@ function hookScriptPath() {
|
|
|
2617
2620
|
];
|
|
2618
2621
|
return candidates.find((c) => existsSync4(c)) ?? candidates[0];
|
|
2619
2622
|
}
|
|
2620
|
-
var server = new McpServer({ name: "loupe", version: "0.14.
|
|
2623
|
+
var server = new McpServer({ name: "loupe", version: "0.14.1" });
|
|
2621
2624
|
function withCompanion(handler) {
|
|
2622
2625
|
return (async (...args) => {
|
|
2623
2626
|
const result = await handler(...args);
|
|
@@ -2770,14 +2773,14 @@ registerTool(
|
|
|
2770
2773
|
type: z.string().optional().describe('Filter to one type, e.g. "tool_use" or "prompt_submit".')
|
|
2771
2774
|
},
|
|
2772
2775
|
async ({ limit, type }) => {
|
|
2773
|
-
const
|
|
2774
|
-
if (!
|
|
2776
|
+
const recent = events.latest(limit ?? 30).filter((e) => !type || e.type === type);
|
|
2777
|
+
if (!recent.length) {
|
|
2775
2778
|
return wrap(
|
|
2776
|
-
|
|
2779
|
+
events.size === 0 && !type ? "No agent events recorded yet. The hooks may not be installed \u2014 install_agent_hooks adds them." : `No events${type ? ` of type ${type}` : ""} recorded.`
|
|
2777
2780
|
);
|
|
2778
2781
|
}
|
|
2779
2782
|
return wrap(
|
|
2780
|
-
|
|
2783
|
+
recent.map((e) => {
|
|
2781
2784
|
const ok = e.payload?.ok === false ? " [FAILED]" : "";
|
|
2782
2785
|
const files = e.files?.length ? ` \u2014 ${e.files.join(", ")}` : "";
|
|
2783
2786
|
return `${e.at} ${e.type}${e.tool ? ` (${e.tool})` : ""}${ok}: ${e.summary ?? ""}${files}`.trimEnd();
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"email": "m.ashraf.saed@gmail.com",
|
|
6
6
|
"url": "https://www.linkedin.com/in/mohamedashrafelsaed/"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.14.
|
|
8
|
+
"version": "0.14.1-next.83",
|
|
9
9
|
"description": "MCP server that exposes Loupe comments to Claude Code as an actionable, fully-contextualized backlog.",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"loupe",
|
|
@@ -43,10 +43,9 @@
|
|
|
43
43
|
"prepublishOnly": "tsup"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
+
"@loupekit/shared": "0.14.1-next.83",
|
|
46
47
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
47
48
|
"zod": "^3.24.1"
|
|
48
49
|
},
|
|
49
|
-
"devDependencies": {
|
|
50
|
-
"@loupekit/shared": "0.14.0-next.82"
|
|
51
|
-
}
|
|
50
|
+
"devDependencies": {}
|
|
52
51
|
}
|