mcp-dependency-explorer
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-dependency-explorer list the TypeScript interfaces exported by fastify"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-dependency-explorer
MCP (Model Context Protocol) server that provides intelligent access to your project's installed dependencies - explore documentation and source code directly from node_modules.
Features
Documentation Cache: One-time initialization to cache all module documentation (README, docs/) for faster access
List Modules: Discover all installed npm packages across your project, including monorepo workspaces
Search: Regex-powered search through module source files (.ts, .tsx, .jsx, .d.ts, .css, .md, etc.)
Read Files: Read module files with optional line range support
TypeScript Symbols: List and inspect functions, classes, interfaces, types, enums, and variables
Workspace Support: Automatically detects and scans monorepo structures (pnpm, yarn workspaces)
Related MCP server: Augments MCP Server
Installation
Via npm (Recommended)
npm install -g @kozer/mcp-dependency-explorerFrom Source
git clone https://github.com/kozer/mcp-dependency-explorer.git
cd mcp-dependency-explorer
pnpm install
pnpm buildUsage
As MCP Server
Add to your MCP client configuration:
{
"mcpServers": {
"dependency-explorer": {
"type": "local",
"command": ["npx", "-y", "@kozer/mcp-dependency-explorer"]
}
}
}Or if installed from source:
{
"mcpServers": {
"dependency-explorer": {
"type": "local",
"command": ["node", "/path/to/mcp-dependency-explorer/dist/server.js"]
}
}
}Available Tools
1. list_modules
List all installed Node modules from all node_modules directories.
Parameters:
root(optional): Project root directory (defaults to cwd)filter(optional): Filter by module name substring
Example:
// List all modules
list_modules();
// Filter by name
list_modules({ filter: "react" });2. search
Search for patterns in module files with code snippets.
Parameters:
module: Module name (exact or substring match)pattern: Regex pattern to searchflags(optional): Regex flags (e.g., 'i' for case-insensitive)context(optional): Lines of context around match (default: 5)limit(optional): Max results (default: 20, max: 100)root(optional): Project root directory
Example:
// Search for useState in React
search({
module: "react",
pattern: "function useState",
flags: "i",
context: 10,
});3. read_file
Read a file from a module with optional line range.
Parameters:
module: Module namefile: File path relative to module rootstartLine(optional): Start line (1-based)count(optional): Number of lines to read (max: 2000)root(optional): Project root directory
Example:
read_file({
module: "fastify",
file: "fastify.d.ts",
startLine: 100,
count: 50,
});4. list_symbols
List TypeScript symbols (functions, classes, interfaces, etc.) from a module.
Parameters:
module: Module namekind(optional): Filter by symbol type (function,class,interface,type,enum,namespace,variable)name(optional): Filter by symbol name (substring)limit(optional): Max results (default: 100, max: 500)root(optional): Project root directory
Example:
// List all symbols
list_symbols({ module: "fastify" });
// List only interfaces
list_symbols({ module: "fastify", kind: "interface" });
// Search for specific symbol name
list_symbols({ module: "fastify", name: "Request" });5. get_symbol
Get the full code for a specific symbol with context.
Parameters:
module: Module namefile: File path relative to module rootname: Symbol namepadding(optional): Lines of padding around symbol (default: 10)root(optional): Project root directory
Example:
get_symbol({
module: "fastify",
file: "types/instance.d.ts",
name: "FastifyInstance",
padding: 15,
});6. list_cached_docs
List all cached documentation files for a module.
Parameters:
module: Module nameroot(optional): Project root directory
Response includes:
cacheDir: Full path to cache directorymoduleHash: Base64-encoded hash used as folder nametotalDocs: Number of cached documentation filesdocs: Array of cached file paths
Example:
list_cached_docs({
module: "react",
});How It Works
Project Detection: Automatically finds your project root by looking for
package.jsonandnode_modulesDocumentation Caching: On server initialization, caches all module documentation (README, CHANGELOG, LICENSE, docs/) to
/tmp/mcp-node-modules-docs/for faster accessWorkspace Scanning: Detects monorepos (pnpm-workspace.yaml, yarn workspaces) and scans all workspace packages
TypeScript Analysis: Uses TypeScript compiler API to extract symbols with accurate type information
Intelligent Caching: Caches symbol indexes for fast repeated queries
Supported File Types
TypeScript:
.ts,.tsx,.d.tsJavaScript:
.jsxStyles:
.css,.scss,.sass,.lessDocumentation:
.md,README.md
Development
# Install dependencies
pnpm install
# Build
pnpm build
# Run server
pnpm startRequirements
Node.js 18+
TypeScript 5+
Project with
node_modulesdirectory
License
MIT
Available Tools
5 toolsget_symbolGet symbol codeC
Get the full code for a specific symbol
Inputs: file (required), name (required), module (required), root, +1 more.
list_modulesList modulesB
List all installed Node modules from all node_modules directories (including workspace packages)
Inputs: root, filter.
list_symbolsList TypeScript symbolsC
List TypeScript symbols (functions, classes, interfaces, etc.) from a module
Inputs: module (required), kind, name, root, +1 more.
read_fileRead module fileB
Read a file from a module with optional line range
Inputs: file (required), module (required), root, count, +1 more.
searchSearch module filesB
Search for pattern in module's .d.ts/.ts/.tsx/.jsx/.css/.scss/.sass/.less/.md files with code snippets
Inputs: module (required), pattern (required), root, flags, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
list_modules, list_symbols, search, and read_file each target a clearly distinct operation. The only mild overlap is get_symbol vs. list_symbols + read_file, since a symbol's code could be fetched either way, but the descriptions make the intended split (discovery vs. extraction) reasonably clear.
Four of five names follow a clean verb_noun snake_case pattern (list_modules, list_symbols, get_symbol, read_file). The bare verb 'search' is the lone deviation, though it remains unambiguous in context.
Five tools is a tight, focused set that matches the narrow exploration workflow of browsing modules, searching, and reading symbols. It is slightly thin—no module metadata or cross-module lookup—but nothing feels redundant.
The surface covers listing, searching, file reading, and symbol extraction well, but despite the 'dependency explorer' name there is no tool to inspect the dependency graph, a module's package.json/version, or which module exports a given symbol. These are notable gaps for dependency exploration, though agents can partially work around them with list_modules and search.
Maintenance
Related MCP Connectors
Live npm and UNPKG data for AI agents: resolution, audits, import maps, malware/CVE checks.
Provide AI-powered real-time analysis and intelligence on NPM packages, including security, depend…
Search public open-source code, documentation, metadata, vulnerabilities, changelogs, and examples.
Real-time package and vulnerability data (Python, npm, Cargo, Go, and more) for AI coding agents.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceEnables Claude Code and other MCP clients to retrieve real-time TypeScript types, prose documentation, and code examples for any npm package, with intent-aware formatting, BM25 documentation search, version migration guides, error diagnosis, and dependency scanning. Works across the entire npm ecosystem without curation while providing enhanced results for popular frameworks.-
- FlicenseNot gradedqualityAmaintenanceEnables coding assistants to pull on-demand documentation for any npm package — TypeScript signatures, prose docs, and code examples formatted to match the user's intent (how-to, reference, or migration). It also supports version comparison with real changelog-backed breaking changes, cross-version migration guides, error diagnosis, side-by-side package comparison, and project dependency scanning for outdated, deprecated, or insecure packages.-
- AlicenseNot gradedqualityAmaintenanceEnables MCP clients to access real-time, context-aware documentation, TypeScript types, code examples, version and migration guidance, error diagnosis, package comparison, and dependency scanning for any npm package.MIT
- AlicenseNot gradedqualityAmaintenanceEnables Claude Code and other compatible clients to retrieve real-time, context-aware documentation, TypeScript types, examples, migration guides, error diagnoses, package comparisons, and dependency scans for any npm package.MIT