File tree Expand file tree Collapse file tree 6 files changed +21
-25
lines changed Expand file tree Collapse file tree 6 files changed +21
-25
lines changed Original file line number Diff line number Diff line change @@ -41,22 +41,16 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio
41
41
- Features:
42
42
- Line-based and multi-line content matching
43
43
- Whitespace normalization with indentation preservation
44
- - Fuzzy matching with confidence scoring
45
44
- Multiple simultaneous edits with correct positioning
46
45
- Indentation style detection and preservation
47
46
- Git-style diff output with context
48
47
- Preview changes with dry run mode
49
- - Failed match debugging with confidence scores
50
48
- Inputs:
51
49
- ` path ` (string): File to edit
52
50
- ` edits ` (array): List of edit operations
53
51
- ` oldText ` (string): Text to search for (can be substring)
54
52
- ` newText ` (string): Text to replace with
55
53
- ` dryRun ` (boolean): Preview changes without applying (default: false)
56
- - ` options ` (object): Optional formatting settings
57
- - ` preserveIndentation ` (boolean): Keep existing indentation (default: true)
58
- - ` normalizeWhitespace ` (boolean): Normalize spaces while preserving structure (default: true)
59
- - ` partialMatch ` (boolean): Enable fuzzy matching (default: true)
60
54
- Returns detailed diff and match information for dry runs, otherwise applies changes
61
55
- Best Practice: Always use dryRun first to preview changes before applying them
62
56
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ const allowedDirectories = args.map(dir =>
42
42
// Validate that all directories exist and are accessible
43
43
await Promise . all ( args . map ( async ( dir ) => {
44
44
try {
45
- const stats = await fs . stat ( dir ) ;
45
+ const stats = await fs . stat ( expandHome ( dir ) ) ;
46
46
if ( ! stats . isDirectory ( ) ) {
47
47
console . error ( `Error: ${ dir } is not a directory` ) ;
48
48
process . exit ( 1 ) ;
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ export const GitHubLabelSchema = z.object({
157
157
name : z . string ( ) ,
158
158
color : z . string ( ) ,
159
159
default : z . boolean ( ) ,
160
- description : z . string ( ) . optional ( ) ,
160
+ description : z . string ( ) . nullable ( ) . optional ( ) ,
161
161
} ) ;
162
162
163
163
export const GitHubMilestoneSchema = z . object ( {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " redis" ,
3
- "version" : " 1.0.0" ,
4
- "main" : " index.js" ,
2
+ "name" : " @modelcontextprotocol/server-redis" ,
3
+ "version" : " 0.1.0" ,
4
+ "description" : " MCP server for using Redis" ,
5
+ "license" : " MIT" ,
6
+ "author" : " Anthropic, PBC (https://anthropic.com)" ,
7
+ "homepage" : " https://modelcontextprotocol.io" ,
8
+ "bugs" : " https://github.com/modelcontextprotocol/servers/issues" ,
5
9
"type" : " module" ,
6
10
"bin" : {
7
11
"redis" : " ./build/index.js"
8
12
},
9
- "scripts" : {
10
- "build" : " tsc && node -e \" require('fs').chmodSync('build/index.js', '755')\" "
11
- },
12
13
"files" : [
13
14
" build"
14
15
],
15
- "keywords" : [],
16
- "author" : " " ,
17
- "license" : " ISC" ,
18
- "description" : " " ,
19
- "devDependencies" : {
20
- "@types/node" : " ^22.10.2" ,
21
- "typescript" : " ^5.7.2"
16
+ "scripts" : {
17
+ "build" : " tsc && shx chmod +x build/*.js" ,
18
+ "prepare" : " npm run build" ,
19
+ "watch" : " tsc --watch"
22
20
},
23
21
"dependencies" : {
24
- "@modelcontextprotocol/sdk" : " ^0.4.0" ,
22
+ "@modelcontextprotocol/sdk" : " ^1.7.0" ,
23
+ "@types/node" : " ^22.10.2" ,
25
24
"@types/redis" : " ^4.0.10" ,
26
25
"redis" : " ^4.7.0"
26
+ },
27
+ "devDependencies" : {
28
+ "shx" : " ^0.3.4" ,
29
+ "typescript" : " ^5.7.2"
27
30
}
28
31
}
You can’t perform that action at this time.
0 commit comments