pathgate 0.2.2__tar.gz → 0.2.4__tar.gz
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.
- {pathgate-0.2.2 → pathgate-0.2.4}/PKG-INFO +19 -12
- {pathgate-0.2.2 → pathgate-0.2.4}/README.md +18 -11
- {pathgate-0.2.2 → pathgate-0.2.4}/pathgate/install.py +8 -4
- {pathgate-0.2.2 → pathgate-0.2.4}/pathgate/server.py +1 -0
- {pathgate-0.2.2 → pathgate-0.2.4}/pyproject.toml +1 -1
- {pathgate-0.2.2 → pathgate-0.2.4}/.gitignore +0 -0
- {pathgate-0.2.2 → pathgate-0.2.4}/LICENSE +0 -0
- {pathgate-0.2.2 → pathgate-0.2.4}/pathgate/__init__.py +0 -0
- {pathgate-0.2.2 → pathgate-0.2.4}/pathgate/__main__.py +0 -0
- {pathgate-0.2.2 → pathgate-0.2.4}/pathgate/config.py +0 -0
- {pathgate-0.2.2 → pathgate-0.2.4}/pathgate/prompts.py +0 -0
- {pathgate-0.2.2 → pathgate-0.2.4}/pathgate/resources.py +0 -0
- {pathgate-0.2.2 → pathgate-0.2.4}/pathgate/tool_schemas.py +0 -0
- {pathgate-0.2.2 → pathgate-0.2.4}/pathgate/tools.py +0 -0
- {pathgate-0.2.2 → pathgate-0.2.4}/tests/test_server.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pathgate
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Filesystem MCP server with allow-listed directories
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -8,6 +8,8 @@ Requires-Python: >=3.10
|
|
|
8
8
|
Requires-Dist: mcp<3,>=2
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
|
|
11
|
+
<!-- mcp-name: io.github.geekgod382/pathgate -->
|
|
12
|
+
|
|
11
13
|
# Pathgate
|
|
12
14
|
|
|
13
15
|
`pathgate` is a Python Model Context Protocol (MCP) server that exposes a controlled filesystem interface to MCP clients such as Claude Desktop, Cursor, VS Code, and inspector tools. The server only permits access to directories that are explicitly allow-listed at startup.
|
|
@@ -31,14 +33,14 @@ Access is restricted by allow-listed paths. At startup, the server resolves the
|
|
|
31
33
|
|
|
32
34
|
## Installation
|
|
33
35
|
|
|
34
|
-
Pathgate package is published on PyPI. To use it, for example with Claude Desktop, add this in the
|
|
36
|
+
Pathgate package is published on PyPI. To use it, for example with Claude Desktop, add this in the claude_desktop_config.json
|
|
35
37
|
|
|
36
38
|
```json
|
|
37
39
|
{
|
|
38
40
|
"mcpServers": {
|
|
39
41
|
"pathgate": {
|
|
40
42
|
"command": "uvx",
|
|
41
|
-
"args": ["pathgate", "C:\\Users\\me\\Documents"]
|
|
43
|
+
"args": ["pathgate@latest", "C:\\Users\\me\\Documents"]
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
}
|
|
@@ -50,7 +52,7 @@ Or, you can use the install command to directly write the config file
|
|
|
50
52
|
uvx pathgate install <paths>
|
|
51
53
|
```
|
|
52
54
|
|
|
53
|
-
|
|
55
|
+
Paths should be separated by spaces
|
|
54
56
|
|
|
55
57
|
```bash
|
|
56
58
|
uvx pathgate install C:\Users\me\Documents C:\Users\me\Projects
|
|
@@ -60,31 +62,35 @@ When no paths are given, it prompts you for them.
|
|
|
60
62
|
|
|
61
63
|
### Options
|
|
62
64
|
|
|
63
|
-
`--read-only:` writes the safer variant of the entry.
|
|
64
|
-
`--dry-run`: shows what it would write and changes nothing.
|
|
65
|
-
`--yes`: skips the confirmation prompt.
|
|
66
|
-
`--name`: sets a different entry name (default pathgate).
|
|
67
|
-
`--config PATH`: I build this mcp server for Claude primarily. Using this option edits a specific file, which also works for other clients that use the same mcpServers shape.
|
|
65
|
+
- `--read-only:` writes the safer variant of the entry.
|
|
66
|
+
- `--dry-run`: shows what it would write and changes nothing.
|
|
67
|
+
- `--yes`: skips the confirmation prompt.
|
|
68
|
+
- `--name`: sets a different entry name (default pathgate).
|
|
69
|
+
- `--config PATH`: I build this mcp server for Claude primarily. Using this option edits a specific file, which also works for other clients that use the same mcpServers shape.
|
|
70
|
+
|
|
71
|
+
### Updating
|
|
72
|
+
|
|
73
|
+
You don't need to manually update it. The command does that for you.
|
|
68
74
|
|
|
69
75
|
## Usage
|
|
70
76
|
|
|
71
77
|
### Start with allowed directories
|
|
72
78
|
|
|
73
79
|
```bash
|
|
74
|
-
pathgate "C:\Users\<username>\Documents" "C:\Users\<username>\Projects"
|
|
80
|
+
uvx pathgate "C:\Users\<username>\Documents" "C:\Users\<username>\Projects"
|
|
75
81
|
```
|
|
76
82
|
|
|
77
83
|
### Read-only mode
|
|
78
84
|
|
|
79
85
|
```bash
|
|
80
|
-
pathgate --read-only "C:\Users\<username>\Documents"
|
|
86
|
+
uvx pathgate --read-only "C:\Users\<username>\Documents"
|
|
81
87
|
```
|
|
82
88
|
|
|
83
89
|
### Environment variable alternative
|
|
84
90
|
|
|
85
91
|
```bash
|
|
86
92
|
$env:FS_MCP_ALLOWED_PATHS = "C:\Users\<username>\Documents;C:\Users\<username>\Projects"
|
|
87
|
-
pathgate
|
|
93
|
+
uvx pathgate
|
|
88
94
|
```
|
|
89
95
|
|
|
90
96
|
On macOS/Linux, use `:` instead of `;` for the path separator.
|
|
@@ -133,6 +139,7 @@ pathgate/
|
|
|
133
139
|
│ ├── __init__.py
|
|
134
140
|
│ ├── __main__.py
|
|
135
141
|
│ ├── config.py
|
|
142
|
+
│ ├── install.py
|
|
136
143
|
│ ├── prompts.py
|
|
137
144
|
│ ├── resources.py
|
|
138
145
|
│ ├── server.py
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<!-- mcp-name: io.github.geekgod382/pathgate -->
|
|
2
|
+
|
|
1
3
|
# Pathgate
|
|
2
4
|
|
|
3
5
|
`pathgate` is a Python Model Context Protocol (MCP) server that exposes a controlled filesystem interface to MCP clients such as Claude Desktop, Cursor, VS Code, and inspector tools. The server only permits access to directories that are explicitly allow-listed at startup.
|
|
@@ -21,14 +23,14 @@ Access is restricted by allow-listed paths. At startup, the server resolves the
|
|
|
21
23
|
|
|
22
24
|
## Installation
|
|
23
25
|
|
|
24
|
-
Pathgate package is published on PyPI. To use it, for example with Claude Desktop, add this in the
|
|
26
|
+
Pathgate package is published on PyPI. To use it, for example with Claude Desktop, add this in the claude_desktop_config.json
|
|
25
27
|
|
|
26
28
|
```json
|
|
27
29
|
{
|
|
28
30
|
"mcpServers": {
|
|
29
31
|
"pathgate": {
|
|
30
32
|
"command": "uvx",
|
|
31
|
-
"args": ["pathgate", "C:\\Users\\me\\Documents"]
|
|
33
|
+
"args": ["pathgate@latest", "C:\\Users\\me\\Documents"]
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
36
|
}
|
|
@@ -40,7 +42,7 @@ Or, you can use the install command to directly write the config file
|
|
|
40
42
|
uvx pathgate install <paths>
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
Paths should be separated by spaces
|
|
44
46
|
|
|
45
47
|
```bash
|
|
46
48
|
uvx pathgate install C:\Users\me\Documents C:\Users\me\Projects
|
|
@@ -50,31 +52,35 @@ When no paths are given, it prompts you for them.
|
|
|
50
52
|
|
|
51
53
|
### Options
|
|
52
54
|
|
|
53
|
-
`--read-only:` writes the safer variant of the entry.
|
|
54
|
-
`--dry-run`: shows what it would write and changes nothing.
|
|
55
|
-
`--yes`: skips the confirmation prompt.
|
|
56
|
-
`--name`: sets a different entry name (default pathgate).
|
|
57
|
-
`--config PATH`: I build this mcp server for Claude primarily. Using this option edits a specific file, which also works for other clients that use the same mcpServers shape.
|
|
55
|
+
- `--read-only:` writes the safer variant of the entry.
|
|
56
|
+
- `--dry-run`: shows what it would write and changes nothing.
|
|
57
|
+
- `--yes`: skips the confirmation prompt.
|
|
58
|
+
- `--name`: sets a different entry name (default pathgate).
|
|
59
|
+
- `--config PATH`: I build this mcp server for Claude primarily. Using this option edits a specific file, which also works for other clients that use the same mcpServers shape.
|
|
60
|
+
|
|
61
|
+
### Updating
|
|
62
|
+
|
|
63
|
+
You don't need to manually update it. The command does that for you.
|
|
58
64
|
|
|
59
65
|
## Usage
|
|
60
66
|
|
|
61
67
|
### Start with allowed directories
|
|
62
68
|
|
|
63
69
|
```bash
|
|
64
|
-
pathgate "C:\Users\<username>\Documents" "C:\Users\<username>\Projects"
|
|
70
|
+
uvx pathgate "C:\Users\<username>\Documents" "C:\Users\<username>\Projects"
|
|
65
71
|
```
|
|
66
72
|
|
|
67
73
|
### Read-only mode
|
|
68
74
|
|
|
69
75
|
```bash
|
|
70
|
-
pathgate --read-only "C:\Users\<username>\Documents"
|
|
76
|
+
uvx pathgate --read-only "C:\Users\<username>\Documents"
|
|
71
77
|
```
|
|
72
78
|
|
|
73
79
|
### Environment variable alternative
|
|
74
80
|
|
|
75
81
|
```bash
|
|
76
82
|
$env:FS_MCP_ALLOWED_PATHS = "C:\Users\<username>\Documents;C:\Users\<username>\Projects"
|
|
77
|
-
pathgate
|
|
83
|
+
uvx pathgate
|
|
78
84
|
```
|
|
79
85
|
|
|
80
86
|
On macOS/Linux, use `:` instead of `;` for the path separator.
|
|
@@ -123,6 +129,7 @@ pathgate/
|
|
|
123
129
|
│ ├── __init__.py
|
|
124
130
|
│ ├── __main__.py
|
|
125
131
|
│ ├── config.py
|
|
132
|
+
│ ├── install.py
|
|
126
133
|
│ ├── prompts.py
|
|
127
134
|
│ ├── resources.py
|
|
128
135
|
│ ├── server.py
|
|
@@ -80,15 +80,19 @@ def resolve_config_path(explicit: str | None) -> Path:
|
|
|
80
80
|
# --------------------------------------------------------------------------
|
|
81
81
|
|
|
82
82
|
def build_server_entry(paths: list[str], read_only: bool) -> dict:
|
|
83
|
-
"""The `mcpServers` entry that launches Pathgate.
|
|
83
|
+
"""The `mcpServers` entry that launches Pathgate.
|
|
84
|
+
|
|
85
|
+
`pathgate@latest` makes uv check PyPI on every launch, so users always
|
|
86
|
+
run the newest release without doing anything.
|
|
87
|
+
"""
|
|
84
88
|
uvx = shutil.which("uvx")
|
|
85
89
|
uv = shutil.which("uv")
|
|
86
90
|
if uvx:
|
|
87
|
-
command, args = uvx, ["pathgate"]
|
|
91
|
+
command, args = uvx, ["pathgate@latest"]
|
|
88
92
|
elif uv:
|
|
89
|
-
command, args = uv, ["tool", "run", "pathgate"]
|
|
93
|
+
command, args = uv, ["tool", "run", "pathgate@latest"]
|
|
90
94
|
else:
|
|
91
|
-
command, args = sys.executable, ["-m", "pathgate"]
|
|
95
|
+
command, args = sys.executable, ["-m", "pathgate"] # no uv: can't auto-update
|
|
92
96
|
args = args + paths
|
|
93
97
|
if read_only:
|
|
94
98
|
args.append("--read-only")
|
|
@@ -38,6 +38,7 @@ def parse_args(argv=None):
|
|
|
38
38
|
)
|
|
39
39
|
p.add_argument("paths", nargs="*", help="Directories the server may access")
|
|
40
40
|
p.add_argument("--read-only", action="store_true", help="Disable write/delete/move/copy tools")
|
|
41
|
+
p.add_argument("--version", action="version", version=f"pathgate {_version()}")
|
|
41
42
|
args = p.parse_args(argv)
|
|
42
43
|
|
|
43
44
|
env_paths = [x for x in os.environ.get("FS_MCP_ALLOWED_PATHS", "").split(os.pathsep) if x]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|