@leo000001/claude-code-mcp 2.8.0 → 2.8.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/CHANGELOG.md +1 -0
- package/README.md +4 -0
- package/dist/index.js +26 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
- Add OpenCode-specific setup and usage guidance, including local MCP config examples and async polling recommendations.
|
|
15
15
|
- Sync README and DESIGN option/message matrices with the current SDK 0.2.81 surface.
|
|
16
|
+
- Add usage reminders in model-visible guidance: long Claude Code runs are normal, and follow-up questions should use `claude_code_reply` with the existing session.
|
|
16
17
|
|
|
17
18
|
## 2.5.0 (2026-02-27)
|
|
18
19
|
|
package/README.md
CHANGED
|
@@ -174,6 +174,8 @@ Notes:
|
|
|
174
174
|
|
|
175
175
|
- `resumeToken` is omitted by default, and is only returned when `CLAUDE_CODE_MCP_RESUME_SECRET` is set on the server.
|
|
176
176
|
- On error: `{ sessionId: "", status: "error", error }`
|
|
177
|
+
- `model` is optional. If omitted, Claude Code chooses the effective model from its own defaults/settings; inspect session/result metadata if you need to know what actually ran.
|
|
178
|
+
- If you plan to continue with `claude_code_reply`, keep the session persistent (`advanced.persistSession=true`, which is already the default).
|
|
177
179
|
|
|
178
180
|
Use `claude_code_check` to poll events and obtain the final `result`.
|
|
179
181
|
|
|
@@ -254,10 +256,12 @@ Use `claude_code_check` to poll events and obtain the final `result`.
|
|
|
254
256
|
Gotchas:
|
|
255
257
|
|
|
256
258
|
- Permission approvals have a timeout (default 60s via `permissionRequestTimeoutMs`) and will auto-deny; watch `actions[].expiresAt` / `actions[].remainingMs`.
|
|
259
|
+
- `claude_code_reply` requires a persistent session or an enabled disk-resume setup; one-shot/non-persistent sessions cannot be resumed later.
|
|
257
260
|
- `Read` has a per-call size cap in practice (often ~256KB); for large files use `offset`/`limit` or chunk with `Grep`.
|
|
258
261
|
- `Edit` with `replace_all=true` is substring replacement; if no match is found the tool returns a clear error.
|
|
259
262
|
- On Windows, this server normalizes common MSYS-style paths (e.g. `/d/...`, `/mnt/c/...`, `/cygdrive/c/...`, `//server/share/...`) for `cwd`, `additionalDirectories`, and tool inputs that include `file_path`.
|
|
260
263
|
- On Windows, POSIX home paths like `/home/user/...` are **not** rewritten to drive paths; prefer absolute Windows paths under your current `cwd` to avoid out-of-bounds permission prompts.
|
|
264
|
+
- On Windows, Claude Code itself needs Git Bash; set `CLAUDE_CODE_GIT_BASH_PATH` in your MCP client config if auto-detection is unreliable.
|
|
261
265
|
- `TeamDelete` may require members to reach `shutdown_approved` (otherwise you may see "active member" errors); cleanup can be asynchronous during shutdown.
|
|
262
266
|
- Skills may become available later in the same session (early calls may show "Unknown", later succeed after skills are loaded/registered).
|
|
263
267
|
- `toolCatalogCount` and `availableTools` are different views: catalog is server-known tools, while `availableTools` comes from each session's runtime `system/init.tools`.
|
package/dist/index.js
CHANGED
|
@@ -2553,7 +2553,7 @@ function groupByCategory(tools) {
|
|
|
2553
2553
|
function buildInternalToolsDescription(tools) {
|
|
2554
2554
|
const grouped = groupByCategory(tools);
|
|
2555
2555
|
const categories = Object.keys(grouped).sort((a, b) => a.localeCompare(b));
|
|
2556
|
-
let desc = "Start a Claude Code session and return sessionId.\nUse claude_code_check to poll events/results and handle permissions.\n\n";
|
|
2556
|
+
let desc = "Start a Claude Code session and return sessionId.\nUse claude_code_check to poll events/results and handle permissions.\nAdjust polling cadence to progress: poll faster while new events/actions are arriving, and slower when the session is quietly thinking.\nLong-running work is normal: Claude Code can keep working for 10+ minutes, especially with high/max effort, so wait for polling to settle before assuming it is stuck.\nIf you want to continue after a run pauses or finishes, use claude_code_reply with the same sessionId instead of starting a brand-new claude_code session.\n\n";
|
|
2557
2557
|
desc += "Internal tools (authoritative list: includeTools=true in claude_code_check):\n";
|
|
2558
2558
|
for (const category of categories) {
|
|
2559
2559
|
desc += `
|
|
@@ -3437,6 +3437,18 @@ function registerResources(server, deps) {
|
|
|
3437
3437
|
"3. If actions are returned, respond with `claude_code_check(action='respond_permission')`.",
|
|
3438
3438
|
"4. Continue polling until status becomes `idle` / `error` / `cancelled`.",
|
|
3439
3439
|
"",
|
|
3440
|
+
"Usage reminders:",
|
|
3441
|
+
"- Claude Code may keep working for 10+ minutes on larger tasks, especially with `effort='high'` or `effort='max'`; keep polling and be patient before treating it as stuck.",
|
|
3442
|
+
"- Adjust poll intervals to the current progress: poll faster while new events or permission actions are arriving, and slower while the session is quietly thinking with no new output.",
|
|
3443
|
+
"- If Claude Code stops and you want to keep going, call `claude_code_reply` with the existing `sessionId` instead of starting a fresh `claude_code` session.",
|
|
3444
|
+
"",
|
|
3445
|
+
"Common mistakes:",
|
|
3446
|
+
"- Do not call `claude_code_reply` on a non-persistent session; if you plan to continue later, start with `advanced.persistSession=true`.",
|
|
3447
|
+
"- `model` is optional. If omitted, Claude Code chooses the effective model from its own defaults/settings.",
|
|
3448
|
+
"- Store `nextCursor` and feed it back into the next `claude_code_check(action='poll')`; otherwise you will keep replaying old events.",
|
|
3449
|
+
"- On Windows, set `CLAUDE_CODE_GIT_BASH_PATH` or Claude Code may fail before the session starts.",
|
|
3450
|
+
"- If `decision='allow_for_session'` still shows a permission request, inspect `actions[].suggestions` / `blockedPath`; directory access may need a more specific permission update.",
|
|
3451
|
+
"",
|
|
3440
3452
|
"Notes:",
|
|
3441
3453
|
"- `respond_user_input` is not supported on this backend.",
|
|
3442
3454
|
"- `allowedTools` is pre-approval by default; set `strictAllowedTools=true` for strict allowlist behavior.",
|
|
@@ -3783,7 +3795,7 @@ function registerResources(server, deps) {
|
|
|
3783
3795
|
}
|
|
3784
3796
|
|
|
3785
3797
|
// src/server.ts
|
|
3786
|
-
var SERVER_VERSION = true ? "2.8.
|
|
3798
|
+
var SERVER_VERSION = true ? "2.8.1" : "0.0.0-dev";
|
|
3787
3799
|
function createServerContext(serverCwd) {
|
|
3788
3800
|
const sessionManager = new SessionManager();
|
|
3789
3801
|
const server = new McpServer(
|
|
@@ -3964,7 +3976,9 @@ function createServerContext(serverCwd) {
|
|
|
3964
3976
|
{
|
|
3965
3977
|
description: buildInternalToolsDescription(toolCache.getTools()),
|
|
3966
3978
|
inputSchema: {
|
|
3967
|
-
prompt: z.string().describe(
|
|
3979
|
+
prompt: z.string().describe(
|
|
3980
|
+
"Prompt. Long runs are normal; keep polling, adapt poll cadence to current progress, and reuse sessionId with claude_code_reply if you want to continue."
|
|
3981
|
+
),
|
|
3968
3982
|
cwd: z.string().optional().describe("Working dir. Default: server cwd"),
|
|
3969
3983
|
allowedTools: z.array(z.string()).optional().describe("Default: []"),
|
|
3970
3984
|
disallowedTools: z.array(z.string()).optional().describe("Default: []"),
|
|
@@ -4028,10 +4042,12 @@ function createServerContext(serverCwd) {
|
|
|
4028
4042
|
server.registerTool(
|
|
4029
4043
|
"claude_code_reply",
|
|
4030
4044
|
{
|
|
4031
|
-
description: "Send a follow-up to an existing session. Returns immediately; use claude_code_check to poll.",
|
|
4045
|
+
description: "Send a follow-up to an existing session. Reuse the same sessionId instead of starting a new claude_code session when you want to continue. Returns immediately; use claude_code_check to poll, and adjust poll cadence to current progress.",
|
|
4032
4046
|
inputSchema: {
|
|
4033
|
-
sessionId: z.string().describe(
|
|
4034
|
-
|
|
4047
|
+
sessionId: z.string().describe(
|
|
4048
|
+
"Session ID from the existing conversation you want to continue; prefer this over starting a fresh claude_code session."
|
|
4049
|
+
),
|
|
4050
|
+
prompt: z.string().describe("Follow-up prompt for the existing session."),
|
|
4035
4051
|
forkSession: z.boolean().optional().describe("Default: false"),
|
|
4036
4052
|
effort: effortOptionSchema.describe("Default: SDK"),
|
|
4037
4053
|
thinking: thinkingOptionSchema.describe("Default: SDK"),
|
|
@@ -4134,12 +4150,14 @@ function createServerContext(serverCwd) {
|
|
|
4134
4150
|
server.registerTool(
|
|
4135
4151
|
"claude_code_check",
|
|
4136
4152
|
{
|
|
4137
|
-
description: "Poll session events or respond to permission requests.",
|
|
4153
|
+
description: "Poll session events or respond to permission requests. Long Claude Code runs are normal, especially with high/max effort; poll faster when progress is active and slower when the session is quietly thinking.",
|
|
4138
4154
|
inputSchema: {
|
|
4139
4155
|
action: z.enum(CHECK_ACTIONS),
|
|
4140
4156
|
sessionId: z.string().describe("Session ID"),
|
|
4141
4157
|
cursor: z.number().int().nonnegative().optional().describe("Default: 0"),
|
|
4142
|
-
responseMode: z.enum(CHECK_RESPONSE_MODES).optional().describe(
|
|
4158
|
+
responseMode: z.enum(CHECK_RESPONSE_MODES).optional().describe(
|
|
4159
|
+
"Default: 'minimal'. Use 'delta_compact' for lightweight polling, especially for faster adaptive polling loops."
|
|
4160
|
+
),
|
|
4143
4161
|
maxEvents: z.number().int().positive().optional().describe("Default: 200 (minimal), unlimited (full/delta_compact)"),
|
|
4144
4162
|
requestId: z.string().optional().describe("Default: none"),
|
|
4145
4163
|
decision: z.enum(["allow", "deny", "allow_for_session"]).optional().describe("Default: none"),
|