repo-inspector-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., "@repo-inspector-mcp Search the repo for TODO comments and show the files they're in."
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.
Repository Inspector MCP
A small read-only MCP server for inspecting a local source repository from an AI client. The project is designed as a portfolio and learning example. It exposes a narrow set of tools instead of giving the model unrestricted shell access.
Features
list_files: list source files below the configured root;read_file: read UTF-8 text files with a size limit;search_in_repo: search text files and return matching lines;path traversal protection and symlink rejection;
sensitive-file filtering for
.envand private-key filenames;ignored generated directories such as
.git,.venv,vendor, andnode_modules;deterministic unit tests for the security boundaries.
Related MCP server: Local Code MCP Server
Requirements
Python 3.10 or newer;
an MCP-compatible client such as Codex.
Local setup
python3.12 -m venv .venv
. .venv/bin/activate
python -m pip install -e ".[dev]"
pytestRun the server over MCP stdio:
MCP_REPO_ROOT=/absolute/path/to/target/repository repo-inspector-mcpThe server is intentionally read-only. It does not execute shell commands, write files,
or expose files outside MCP_REPO_ROOT.
Codex configuration
Use the example in docs/codex-config.toml. Replace the executable path and the repository
root with absolute paths. After restarting the client, the following tools are available:
list_files(path, max_depth);read_file(path, max_chars);search_in_repo(query, path, max_results).
Design notes
The MCP layer in server.py is intentionally thin. Path validation, file-size limits,
binary-file detection, and search behavior live in the dependency-free core.py, which
makes the security-sensitive behavior easy to test without starting an MCP client.
License
MIT
Available Tools
3 toolslist_filesB
List readable source files below a repository path.
Inputs: path, max_depth. Returns: result
read_fileA
Read a UTF-8 text file within the configured repository root.
Inputs: path (required), max_chars. Returns: result
search_in_repoB
Search text files and return file, line, and matching text.
Inputs: query (required), path, max_results. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a distinct action: listing files, reading a single file, and searching content. There is no overlap between these operations.
All tool names follow a consistent verb_noun snake_case pattern: list_files, read_file, search_in_repo. The naming style is uniform and predictable.
Three tools is an appropriate size for a repository inspection server. Each tool covers a core need without unnecessary bloat.
The server covers the essential inspection workflow: discover files, read their contents, and search across them. For its stated purpose, there are no significant missing operations.
Related MCP Connectors
Securely search and manage workspace context files for AI agents and teams.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Safe folder access for ChatGPT and Claude: read, write and search files, risky tools opt-in.
Read-only AI coding tools for change verification, release readiness, capacity, and guidance.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables LLMs to search and read files in local and GitHub repositories, analyze pull request diffs, and grep code content with built-in security protections.6-
- FlicenseBqualityDmaintenanceProvides LLMs with safe, read-only access to local codebases for searching, reading files, and finding function definitions. All source code remains local, ensuring privacy while enabling AI assistants to explore project structures and functionality.4-
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with secure, read-only file system access to analyze and understand project codebases, enabling multi-repository context aggregation and cross-project code tracing.5MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to securely browse, search, inspect, and understand local project files through Model Context Protocol tools.1MIT