Extract file and directory paths from config files and code, with their kind and position.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Pull every file path out of the current file in one keystroke
JavaScript, TypeScript, JSON, YAML, HTML, CSS, TOML, CSV and Environment files β and every other file, by text scan
Useful? A star or rating is how other developers find it β β GitHub Β· β Open VSX Β· β Marketplace
Open a file, press Ctrl+Alt+P (Cmd+Alt+P on Mac), and every file path in the document lands in a new editor β deduplicate and sort it from there. Works in VS Code and in VS Codeβbased editors like Cursor and VSCodium (installable from Open VSX).
src, href, srcset, url(), and @import in HTML/CSS.env files| Where | What you get | Install |
|---|---|---|
| VS Code | The extraction, in your editor, on a keystroke | Marketplace |
| Cursor, VSCodium, Windsurf | The same extension | Open VSX |
| A terminal or a CI step | The same run over a whole tree, with exit codes | cargo install paths-le Β· crates.io |
| Any MCP agent, via Node | extract_paths over stdio β the same tool this binary offers | npx paths-le-mcp Β· npm |
| Zed | The MCP server as a context server | add it by hand (no listing yet) |
The same engine runs as an MCP server, so an agent can call it directly instead of you running a command.
| Editor | How |
|---|---|
| VS Code 1.101+ | Nothing to install β the extension registers extract_paths with agent mode |
| Zed | No listing yet β add the MCP server by hand |
| Claude Code | claude mcp add paths-le -- npx -y paths-le-mcp |
| Cursor, Windsurf, anything else | point it at npx paths-le-mcp |
Returns every path classified as file, relative, absolute or url, with its 1-based line and column. Paths are reported exactly as written β nothing is resolved against a workspace or touched on disk.
The server takes content and returns data β it reads no files and makes no network requests of its own. Published as paths-le-mcp on npm and as io.github.nolindnaidoo/paths-le in the MCP registry.
Most hosts read a JSON config. Add one entry:
-y skips the install prompt on first run. Pin a version if you would rather not track releases β paths-le-mcp@2.3.1.
Prefer not to go through npx on every launch? Install it once and point at the binary instead:
It speaks MCP over stdio and needs no environment variables, no API key and no configuration of its own. To check it before wiring it into anything:
That prints the tool list and exits β if you see extract_paths, the server works.
The same extraction runs from a terminal or an agent loop: a Rust CLI in
crate/ of this repository, sharing one corpus with the extension β
crate/fixtures/ β so CI fails if the two ever read a
document differently.
It also does the half an editor cannot: resolve what it found against the filesystem it is standing in. Every path gets a verdict β exists, missing, escapes the audited tree, non-canonical, or a symlink with its target named.
The exit code is the answer: 0 clear Β· 1 findings Β· 2 the question was
malformed β so paths-le --strict . is a CI step as it stands.
| Format | Language IDs | What gets extracted |
|---|---|---|
| JavaScript / TypeScript | javascript, javascriptreact, typescript, typescriptreact | import/export β¦ from, side-effect imports, dynamic import(), require() β file paths only, package names excluded |
| JSON / JSONC | json, jsonc | Path-like string values (comments and trailing commas supported) |
| HTML | html | src, href, srcset (each entry), action, poster, and similar attributes |
| CSS / SCSS / LESS | css, scss, less | url() and @import |
| TOML | toml | Path-like values and keys |
| CSV | csv | Path-like cells |
| Environment | dotenv, env | Path-like variable values and names |
| YAML | yaml | Path-like scalar values and keys, across every document in the file |
| Everything else | any other language ID | A text scan: quoted tokens, and undelimited runs that carry a path separator |
Positions are real source positions for JS/TS, JSON/JSONC, HTML, CSS and the text scan (exact line and column of the path); TOML and YAML positions are located in the source text and can be approximate for repeated identical values; CSV positions are row/cell coordinates. Version strings (1.8.1) and IP addresses are never treated as paths, and data:/javascript: URLs are excluded from HTML/CSS extraction. Known limitation: bare domains like example.com are indistinguishable from filenames and are extracted.
The text scan claims a bare name.ext only inside quotes. os.path in a Python file and main.py are the same shape, and no rule short of a dictionary separates them β but source quotes its filenames and does not quote its attribute access, so the quoting does. A YAML scalar holding a shell command (run: node ./scripts/build.js) is one token containing spaces, so no path is claimed from it, exactly as in JSON and TOML.
| Command | Description |
|---|---|
Paths-LE: Extract Paths (Ctrl+Alt+P / Cmd+Alt+P) | Extract all paths from the active document |
Paths-LE: Deduplicate Paths | Remove duplicate lines from the results |
Paths-LE: Sort Paths | Sort results alphabetically or by length |
Paths-LE: Open Settings | Open Paths-LE settings |
Paths-LE: Help | Built-in documentation |
| Setting | Default | Description |
|---|---|---|
paths-le.openResultsSideBySide | true | Open results beside the current editor |
paths-le.postProcess.openInNewFile | true | Open results in a new file (when not side-by-side) |
paths-le.copyToClipboardEnabled | false | Also copy results to the clipboard |
paths-le.notificationsLevel | silent | all = every notification, important = warnings + errors, silent = errors only |
paths-le.safety.enabled | true | Guardrails for very large files |
paths-le.safety.fileSizeWarnBytes | 1000000 | Refuse extraction above this file size |
paths-le.safety.largeOutputLinesThreshold | 50000 | Warn above this line count |
paths-le.statusBar.enabled | true | Show the status bar item |
paths-le.telemetryEnabled | false | Local-only event log (see Privacy) |
paths-le.resolution.resolveSymlinks | false | β οΈ Resolve symlinks to canonical paths |
paths-le.resolution.resolveWorkspaceRelative | false | β οΈ Resolve paths against workspace folders |
Twelve languages besides English:
German Β· Spanish Β· French Β· Indonesian Β· Italian Β· Japanese Β· Korean Β· Portuguese (Brazil) Β· Russian Β· Ukrainian Β· Vietnamese Β· Chinese (Simplified)
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/paths-le)<a href="https://allmcps.com/mcp/paths-le"><img src="https://allmcps.com/api/badge/paths-le?style=directory" alt="Paths Le on AllMCPs" /></a>