project-explorer-mcp
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., "@project-explorer-mcp Show me the directory tree of my project"
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.
project-explorer-mcp
MCP server toolkit for analyzing the structure of a Python project.
Installation and Launch
Prerequisites
Install to Cursor IDE
{
"mcpServers": {
"project-explorer": {
"command": "uv",
"args": [
"--directory",
"path/to/project-explorer-mcp",
"run",
"project-explorer-mcp"
]
}
}
}All tools are enabled by default: dir_tree, python_outline, markdown_outline, openapi_list_operations, openapi_get_operation_details
Related MCP server: MCP Codebase Symbols Server
Configuration
The server can be configured using environment variables with the prefix PROJECT_EXPLORER_MCP__:
PROJECT_EXPLORER_MCP__DEFAULT_OUTPUT_FORMAT: Set the default output format for all tools (jsonormarkdown). Default ismarkdown.
Example:
export PROJECT_EXPLORER_MCP__DEFAULT_OUTPUT_FORMAT=jsonOutput Formats
All tools support two output formats:
markdown (default): Returns structured markdown text that is more token-efficient for AI models to understand
json: Returns structured JSON data for programmatic processing
You can override the default format per tool call using the output_format parameter.
Server Tools
dir_tree
Description: Returns a file and folder tree with depth limitation.
Parameters:
root_path: str— path to the root of the treemax_depth: int— maximum traversal depth (default: 1)output_format: str | None— output format:jsonormarkdown(default: server setting)
Output Example (markdown format):
## Directory Tree: /path/to/projecttests/test_sample.py tests/test_sample.md tests/test_dir_tree.md
Output Example (json format):
{ "root": "/path/to/project/tests", "tree": [ { "name": "test_dir_tree.md", "type": "file" }, { "name": "test_sample.md", "type": "file" }, { "name": "test_sample.py", "type": "file" } ] }
python_outline
Description: Returns an outline for each Python file (imports, classes, functions, docstrings).
Parameters:
paths: list[str]— list of paths to Python filesoutput_format: str | None— output format:jsonormarkdown(default: server setting)
Output Example (markdown format):
## tests/test_sample.py **Module docstring:** Module for outline test. The module contains an example class and function. ### Imports - `os` (line 3) - `sys` (line 4) ### Classes #### `Example` (line 7) Example class. **Methods:** - `method` (line 9) - Class method. ### Functions #### `func` (line 15) Example function.Output Example (json format):
{'tests/test_sample.py': {'docstring': 'Module for outline test.\n\nThe module contains an example class and function.', 'imports': [{'name': 'os', 'line': 3}, {'name': 'sys', 'line': 4}], 'classes': [{'name': 'Example', 'line': 7, 'docstring': 'Example class.', 'methods': [{'name': 'method', 'line': 9, 'docstring': 'Class method.'}]}], 'functions': [{'name': 'func', 'line': 15, 'docstring': 'Example function.'}]}}
markdown_outline
Description: Returns an outline for each Markdown file (headings, levels, line).
Parameters:
paths: list[str]— list of paths to Markdown filesoutput_format: str | None— output format:jsonormarkdown(default: server setting)
Output Example (markdown format):
## tests/test_sample.md ### Document Structure - **H1:** Heading 1 (line 1) - **H2:** Heading 2 (line 3) - **H3:** Heading 3 (line 5) - **H2:** Second H2 (line 9)Output Example (json format):
{'tests/test_sample.md': [{'level': 1, 'text': 'Heading 1', 'line': 1}, {'level': 2, 'text': 'Heading 2', 'line': 3}, {'level': 3, 'text': 'Heading 3', 'line': 5}, {'level': 2, 'text': 'Second H2', 'line': 9}]}
openapi_list_operations
Description: Lists all operations from an OpenAPI specification file.
Parameters:
spec_path: str— absolute path to the OpenAPI JSON or YAML fileoutput_format: str | None— output format:jsonormarkdown(default: server setting)
Output Example (markdown format):
# OpenAPI Operations | Method | Path | Operation ID | Summary | | ------ | -------- | ------------ | ----------------- | | GET | `/users` | listUsers | List all users | | POST | `/users` | createUser | Create a new user |Output Example (json format):
{ "operations": [ { "method": "GET", "path": "/users", "operation_id": "listUsers", "summary": "List users" } ], "count": 1, "error": null }
openapi_get_operation_details
Description: Gets detailed information for specific OpenAPI operations.
Parameters:
spec_path: str— absolute path to the OpenAPI JSON or YAML fileselectors: list[str]— list of selectors (operationId, "METHOD /path", or path)expand_refs: bool— whether to resolve $ref references (default: false)format_output: str | None— output format:jsonormarkdown(default: server setting)
Output Example (markdown format):
# OpenAPI Operation Details ## GET /users **Operation ID:** listUsers **Summary:** List all users **Description:** Get a list of all users ### Responses #### 200 Successful response **Content Types:** - `application/json`: `{'type': 'array', 'items': {'type': 'object'}}` ---Output Example (json format):
{ "details": [ { "method": "GET", "path": "/users", "operation_id": "listUsers", "summary": "List users", "description": "Retrieve a list of users", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": {"type": "integer"}, "description": "Maximum number of results" } ], "responses": { "200": { "description": "Success", "content": { "application/json": {"type": "array", "items": {"type": "object"}} } } } } ], "count": 1, "error": null }
Available Tools
5 toolsdir_treeA
Returns a compact file and folder tree with depth limitation.
Agent usage guidelines: - Use this tool when you need to get a quick overview of the file and folder structure of a project or directory. - Use when you need to display or analyze the hierarchy of files and folders up to a certain depth. - Do not use for reading file contents or for non-existent/relative paths.
Path requirements: - The path must not contain URL-encoding (e.g., '%'). - The path must be absolute. - The path must exist on disk. Example paths: - Windows: "C:\Users\User\project" - Linux: "/home/user/project"
Args: root_path (str): Absolute path to the root directory. max_depth (int): Maximum nesting depth. Default is 1. output_format (str | None): Output format ('json' or 'markdown'). Defaults to server setting (markdown by default).
Returns: str | dict: File and folder tree in the requested format or error dict.
Inputs: root_path (required), max_depth, output_format. Returns: result
markdown_outlineA
Returns an outline for each Markdown file: headings, levels, line.
Agent usage guidelines: - Use this tool when you need to extract or display the structure of Markdown documents, such as for navigation, summary, or documentation analysis. - Use when you need to list headings, their levels, and line numbers in Markdown files. - Do not use for non-Markdown files or for reading the full content of the file.
Path requirements: - Paths must not contain URL-encoding (e.g., '%'). - Paths must be absolute. - Paths must exist on disk. Example paths: - Windows: "C:\Users\User\project\README.md" - Linux: "/home/user/project/README.md"
Args: paths (list[str]): List of absolute paths to Markdown files. output_format (str | None): Output format ('json' or 'markdown'). Defaults to server setting (markdown by default).
Returns: dict | str: Outline for each file in the requested format.
Inputs: paths (required), output_format. Returns: result
openapi_get_operation_detailsA
Get detailed information for specific OpenAPI operations.
Agent usage guidelines: - Use this tool when you need detailed information about specific API operations. - Use selectors to target specific operations by operationId, method+path, or path. - Set expand_refs=True to resolve schema references for full schema details. - Choose format_output="json" for structured data, "markdown" for formatted output.
Path requirements: - The path must not contain URL-encoding (e.g., '%'). - The path must be absolute. - The path must exist on disk and be a valid OpenAPI JSON or YAML file.
Args: spec_path (str): Absolute path to the OpenAPI JSON or YAML file. selectors (list[str]): List of selectors. Each selector can be: - operationId (exact match) - "METHOD /path" (e.g. "GET /users/{id}") - just a path (e.g. "/users/{id}") to match all methods on that path expand_refs (bool): Whether to resolve local $ref references in schemas. Defaults to False. format_output (str | None): Output format ('json' or 'markdown'). Defaults to server setting.
Returns: dict | str: For format_output="json": Dictionary containing operation details and metadata. - details: list of detailed operation records - count: number of matching operations - error: error message if any, None otherwise For format_output="markdown": formatted markdown string
Inputs: selectors (required), spec_path (required), expand_refs, format_output. Returns: result
openapi_list_operationsA
List operations from an OpenAPI specification file.
Agent usage guidelines: - Use this tool when you need to explore the available API operations in an OpenAPI spec. - Use when you want to see endpoints, methods, and summaries without detailed schemas. - Do not use for getting detailed parameter or response information.
Path requirements: - The path must not contain URL-encoding (e.g., '%'). - The path must be absolute. - The path must exist on disk and be a valid OpenAPI JSON or YAML file.
Args: spec_path (str): Absolute path to the OpenAPI JSON or YAML file. output_format (str | None): Output format ('json' or 'markdown'). Defaults to server setting. filter_by_tag (str | None): Filter operations by tag. Only operations with this tag will be included. filter_by_method (str | None): Filter operations by HTTP method (e.g., 'GET', 'POST'). filter_by_path (str | None): Filter operations by path containing this substring (case-insensitive). limit (int): Maximum number of operations to return. Defaults to 50. offset (int): Number of operations to skip from the start. Defaults to 0.
Examples: - To get operations related to users: {"spec_path": "/path/to/spec.json", "filter_by_path": "user"} - To get all GET operations: {"spec_path": "/path/to/spec.json", "filter_by_method": "GET"} - To get operations with a specific tag: {"spec_path": "/path/to/spec.json", "filter_by_tag": "users"} - To paginate through results: {"spec_path": "/path/to/spec.json", "limit": 20, "offset": 40}
Returns: dict | str: For format_output="json": Dictionary containing operations list and metadata. - operations: list of operation dicts with method, path, operation_id, summary, tags - count: number of operations returned (after filtering and pagination) - total_count: total number of operations matching filters (before pagination) - error: error message if any, None otherwise For format_output="markdown": formatted markdown string
Inputs: spec_path (required), limit, offset, filter_by_tag, +3 more. Returns: result
python_outlineA
Returns an outline for each Python file: imports, classes, functions, docstrings.
Agent usage guidelines: - Use this tool when you need to understand the structure of Python code files, such as for code review, navigation, or documentation generation. - Use when you need to extract or display the list of imports, classes, functions, and their docstrings from Python files. - Do not use for non-Python files or for reading file contents in detail.
Path requirements: - Paths must not contain URL-encoding (e.g., '%'). - Paths must be absolute. - Paths must exist on disk. Example paths: - Windows: "C:\Users\User\project\main.py" - Linux: "/home/user/project/main.py"
Args: paths (list[str]): List of absolute paths to Python files. output_format (str | None): Output format ('json' or 'markdown'). Defaults to server setting (markdown by default). Returns: dict | str: Outline for each file in the requested format.
Inputs: paths (required), output_format. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct resource: directory tree, Python code structure, Markdown structure, and OpenAPI operations (list vs. details). There is no overlap in purpose, and the descriptions clearly specify when to use each tool.
Most tools follow a descriptive prefix (dir, python, markdown, openapi), but the verb placement differs: 'python_outline' and 'markdown_outline' are noun-phrases, while 'openapi_list_operations' and 'openapi_get_operation_details' use verb + object. This is readable and somewhat predictable, but not perfectly consistent.
With 5 tools, the server is well-scoped for a project explorer, covering directory trees, Python and Markdown outlines, and OpenAPI exploration. Each tool serves a distinct purpose without redundancy.
The server provides good coverage of structural exploration for a project, including directory hierarchy, Python and Markdown outlines, and OpenAPI operations with both listing and detailed views. It lacks support for other file types (e.g., JavaScript, JSON), but this appears to be an intentional scope limitation.
Maintenance
Related MCP Connectors
Ask what your product does, triage requests and publish the changelog, from a map of your code.
Generate SBOMs, scan vulnerabilities, and analyze dependencies from local projects or Git repos.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
AI-powered codebase analysis — call graphs, security, dead code, complexity. 150+ tools.
Related MCP Servers
- AlicenseBqualityBmaintenanceAnalyzes source code structure across multiple languages using tree-sitter, extracting classes, functions, methods, and metadata with precise line numbers for efficient codebase exploration and AI-assisted development.133MIT
- AlicenseAqualityDmaintenanceAnalyzes codebases and extracts all symbols (functions, classes, methods, interfaces, etc.) from 10+ programming languages into LLM-optimized markdown format. Enables AI assistants to understand entire project structures efficiently without processing full source code.29 npmMIT
- AlicenseNot gradedqualityDmaintenanceAnalyzes codebases to automatically generate README, API docs, architecture diagrams, and CHANGELOG.10 npmMIT
- FlicenseAqualityDmaintenanceAnalyzes any codebase to detect project type, languages, frameworks, entry points, API routes, controllers, services, components, tests, and more.5-