explorer-mcp is a lightweight, read-only MCP server that gives AI quick access to Git repos, folder structures, and context. It cuts time and token usage by handling exploration internally and feeding results to AI agents.
Why should an AI agent collect context piece by piece when an MCP can collect more information faster and present it in a simple, self-explanatory, compact format?
- Explore resources
- Response design
- Requirements
- Getting Started
- Install via go
- Install via wget
- Build requirements
- Build
- Install go
explorer-mcp collects diffrent resources and provides them to the requesting AI Agent.
Resources can be enabled or disabled via CLI flags and environment variables. See explorer-mcp -h or explorer-mcp print -h.
Some resources are omitted at runtime when prerequisites are missing (no git repo, no container CLI, no opencode binary, etc.).
- structure: File tree under
projectRootPathup to scan depth; relative paths,/**for truncated dirs - git: Branch or detached head, dirty files, recent commits, diffstat
- workspace: Parent and sibling projects around
projectRootPath - dependencies: Dependencies from manifests (
go.mod,package.json,requirements.txt, …) - container: Container CLIs in PATH and running containers linked to the project
- tools: Makefile targets,
package.jsonscripts, root shell scripts
- cli: Common CLI tools available in PATH. This could mislead an AI agent and cause complications.
- opencode: Effective OpenCode permission rules and MCP server names via
opencode debug agent build - behavior:
agentBehaviorMainInstructionand per-domainagentBehaviorInstructionsfor present sections
Quick help:
go run github.com/NobleMajo/explorer-mcp@latest -hUse explorer-mcp print [projectRootPath] to dump the same JSON the MCP explore tool returns:
go run github.com/NobleMajo/explorer-mcp@latest printThe explore JSON follows a few consistent rules:
- Only show what is there: lists and maps use
omitempty; empty arrays are omitted when a scan ran but found nothing. - Do not show what is not found: whole sections are omitted when disabled by flag or when prerequisites are missing (e.g. no
gitbinary, not a git repo, no container CLI). - Combine details into string arrays: dependencies, container rows, git status lines, and sibling paths are compact encoded strings instead of nested objects.
- Use small flags for metadata: booleans like
parentScanPerformed,recentCommitsListed, andrepoScanDepthLimittell the agent whether a scan ran vs. what was found. - Behavior hints follow data:
agentBehaviorInstructionsonly includes domains whose section is present and non-empty; use-B/--enable-behaviorto include behavior text. - At least one explore resource required: if every explore resource is disabled,
printandexplorereturn an error.
Depth/count flags (-c, -p, -d) control how much is collected; disable flags (-S, -G, …) skip entire resources.
MCP note: the explore tool requires a mandatory input parameter projectRootPath (absolute or relative path to project root directory). The path is validated and passed through to all explore resource collectors.
Linux- or macos-like systems with go or wget & tar installed.
Start the latest repo version directly without leaving stuff in the current working dir:
go run github.com/NobleMajo/explorer-mcp@latestFor this section go is required, check out the install go guide.
go install https://github.com/NobleMajo/explorer-mcpexport CUSTOM_BIN_DIR="/usr/local/bin" # <- change if needed
export EXPLORER_MCP_VERSION="" # <- set latest version here
rm -rf $CUSTOM_BIN_DIR/explorer-mcp
wget https://github.com/NobleMajo/explorer-mcp/releases/download/v$EXPLORER_MCP_VERSION/explorer-mcp-v$EXPLORER_MCP_VERSION-linux-amd64.tar.gz -O /tmp/explorer-mcp.tar.gz
tar -xzvf /tmp/explorer-mcp.tar.gz -C $CUSTOM_BIN_DIR/ explorer-mcp
rm /tmp/explorer-mcp.tar.gzTo build, you need to install go.
The required go version is in the go.mod file.
For this section go is required, check out the install go guide.
Clone the repo:
git clone https://github.com/NobleMajo/explorer-mcp.git
cd explorer-mcpBuild the explorer-mcp binary from source code:
make build
./explorer-mcpFor this section go is required, check out the install go guide.
This part is work in process, i want use 'AIR' as autoreload tool:
make dev #WIPThe required go version for this project is in the go.mod file.
To install and update go, I can recommend the following repo:
git clone git@github.com:udhos/update-golang.git golang-updater
cd golang-updater
sudo ./update-golang.shContributions to this project are welcome!
Interested users can refer to the guidelines provided in the CONTRIBUTING.md file to contribute to the project and help improve its functionality and features.
This project is licensed under the MIT license, providing users with flexibility and freedom to use and modify the software according to their needs.
This project is provided without warranties.
Users are advised to review the accompanying license for more information on the terms of use and limitations of liability.