cf-memory-mcp 3.8.6 → 3.8.8
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/bin/cf-memory-mcp.js +18 -4
- package/package.json +1 -1
package/bin/cf-memory-mcp.js
CHANGED
|
@@ -155,7 +155,7 @@ const TOOLS_LIST = [
|
|
|
155
155
|
file_filter: { type: 'array', items: { type: 'string' }, description: 'Limit to files matching path substrings' },
|
|
156
156
|
all_projects: { type: 'boolean', description: 'Search across ALL your indexed projects (overrides project_id). Useful for "find X in any of my repos".' },
|
|
157
157
|
expand_context: { type: 'boolean', description: 'Include file_imports (the file\'s module/imports chunk) with each result. Default: true.' },
|
|
158
|
-
exclude_docs: { type: 'boolean', description: 'Filter out markdown/docs from code queries. Default: true (auto-disabled if query mentions docs/readme/tutorial).' }
|
|
158
|
+
exclude_docs: { type: 'boolean', description: 'Filter out markdown/docs from code queries. Default: true (auto-disabled if query mentions docs/readme/tutorial). Response includes docs_filtered_count when chunks were dropped — flip to false to surface them.' }
|
|
159
159
|
},
|
|
160
160
|
required: ['query']
|
|
161
161
|
}
|
|
@@ -1084,6 +1084,13 @@ class CFMemoryMCP {
|
|
|
1084
1084
|
this.logDebug(`Found ${files.length} files to index.`);
|
|
1085
1085
|
|
|
1086
1086
|
if (files.length === 0) {
|
|
1087
|
+
// Verify the path actually exists so we can tell the user
|
|
1088
|
+
// whether it's "path wrong" or "everything was filtered out".
|
|
1089
|
+
let pathExists = false;
|
|
1090
|
+
try { pathExists = fs.existsSync(resolvedPath); } catch (_) { pathExists = false; }
|
|
1091
|
+
const hint = !pathExists
|
|
1092
|
+
? `Path "${resolvedPath}" does not exist. Check the project_path argument.`
|
|
1093
|
+
: `Path exists but every file was filtered out. The bridge excludes node_modules, dist, build, .git, *.lock, *.min.js, *.d.ts, .augment, .kiro, .intent, .husky, .claude, and generated/ directories. Pass include_patterns to override, or check that the project actually has source files at this path.`;
|
|
1087
1094
|
const response = {
|
|
1088
1095
|
jsonrpc: '2.0',
|
|
1089
1096
|
id: message.id,
|
|
@@ -1097,7 +1104,8 @@ class CFMemoryMCP {
|
|
|
1097
1104
|
files_indexed: 0,
|
|
1098
1105
|
chunks_created: 0,
|
|
1099
1106
|
status: 'complete',
|
|
1100
|
-
message: 'No matching files found in directory'
|
|
1107
|
+
message: 'No matching files found in directory',
|
|
1108
|
+
hint
|
|
1101
1109
|
}, null, 2)
|
|
1102
1110
|
}]
|
|
1103
1111
|
}
|
|
@@ -1695,13 +1703,19 @@ class CFMemoryMCP {
|
|
|
1695
1703
|
const response = JSON.parse(body);
|
|
1696
1704
|
resolve(response);
|
|
1697
1705
|
} catch (error) {
|
|
1706
|
+
// Include HTTP status + body snippet so callers can
|
|
1707
|
+
// see whether they got a 404, a Cloudflare HTML error
|
|
1708
|
+
// page, or some other non-JSON response. Without this,
|
|
1709
|
+
// "Invalid JSON" alone hides whether the worker is
|
|
1710
|
+
// even reachable.
|
|
1711
|
+
const bodyPreview = body.slice(0, 200).replace(/\s+/g, ' ');
|
|
1698
1712
|
resolve({
|
|
1699
1713
|
jsonrpc: '2.0',
|
|
1700
1714
|
id: message.id || null,
|
|
1701
1715
|
error: {
|
|
1702
1716
|
code: -32603,
|
|
1703
|
-
message:
|
|
1704
|
-
data: error.message
|
|
1717
|
+
message: `Invalid JSON response from server (HTTP ${res.statusCode})`,
|
|
1718
|
+
data: `${error.message}; body[0..200]=${bodyPreview}`
|
|
1705
1719
|
}
|
|
1706
1720
|
});
|
|
1707
1721
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cf-memory-mcp",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.8",
|
|
4
4
|
"description": "Cloudflare-hosted MCP server for code indexing, retrieval, and assistant memory with a direct remote MCP endpoint and local stdio bridge.",
|
|
5
5
|
"main": "bin/cf-memory-mcp.js",
|
|
6
6
|
"bin": {
|