repo-inspector-mcp
Click on "Install 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-mcpSearch 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.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | . | |
| max_depth | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the full burden. It conveys a read-only listing action and a 'readable' filter, but it does not disclose recursion behavior, whether directories are included, symlink handling, or permission-related limits. For a simple listing tool this is a minimal but not rich disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one concise front-loaded sentence. It states the action, resource, and scope immediately, with no filler. For a simple listing tool this is well-structured and appropriately sized.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, the return shape is covered. However, the description lacks details about max_depth semantics, hidden/file types, and usage relative to siblings. Given the low complexity of the tool, this is adequate but leaves some context gaps an agent would need to disambiguate during invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It implies 'path' refers to a repository path, but it does not explain max_depth or add meaning beyond the schema defaults. The description adds almost no parameter semantics beyond what the agent can infer from the parameter names and defaults.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action: listing readable source files below a repository path. The verb 'list' plus the resource 'source files below a repository path' clearly differentiates it from sibling tools read_file (content reading) and search_in_repo (searching).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no guidance on when to use list_files rather than read_file or search_in_repo. It neither names alternatives nor states conditions for exclusion. The only context is the sibling tool names, which require the agent to infer relationships.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_fileA
Read a UTF-8 text file within the configured repository root.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| max_chars | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the disclosure burden. It usefully discloses the UTF-8 encoding requirement and the repository-root confinement, which set agent expectations about path handling. It does not disclose behavior on missing files, non-UTF-8 content, or how max_chars truncation affects the returned content, though the output schema partially covers return values.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single 12-word sentence that leads with the verb, states the resource, and closes with the scope constraint. Every word earns its place with zero redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-file tool with an output schema, the description is mostly adequate, covering target resource and path scope. However, with 0% schema parameter coverage and no annotations, the missing explanation of max_chars and edge-case behavior leaves noticeable gaps an agent must resolve elsewhere.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, but it only does so for path via the 'repository root' scoping hint. The max_chars parameter receives no explanation beyond its title and default, leaving the agent to guess at truncation semantics and units.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb (Read), a precise resource (UTF-8 text file), and a scope constraint (within the configured repository root). This clearly distinguishes it from siblings list_files and search_in_repo, which cover enumeration and content search respectively.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage context is implied: an agent reads a file when it needs its contents, rather than listing files or searching for matches. However, there is no explicit guidance about when to prefer this over search_in_repo, which could also surface file content, and no mention of prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_in_repoB
Search text files and return file, line, and matching text.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | . | |
| query | Yes | ||
| max_results | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral disclosure burden. It does convey that the tool searches text files and returns file/line/matching-text results, and the word 'text' implies non-text files are ignored. However, it does not explain match semantics, case sensitivity, regex support, max_results behavior, or path interpretation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single front-loaded sentence with no filler words. It communicates the core operation and return format economically, earning its place without unnecessary detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The presence of an output schema reduces the need to document return values, and this is a simple search tool with obvious read semantics. However, with no annotations, no parameter descriptions, and no usage guidance, the definition is only minimally viable and leaves several practical details for the agent to infer.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for the three parameters. It only loosely implies that 'query' is the search text; 'path' and 'max_results' receive no explanatory context. This is a partial but insufficient compensation for the schema's lack of descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Search') and a clear resource ('text files'), and it defines the return shape as 'file, line, and matching text.' This clearly differentiates it from siblings list_files and read_file, though it does not explicitly name those alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus list_files or read_file, and no exclusions are mentioned. The only implied context is that search is useful for finding text matches across files, but the description does not make this explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v0.1.0- First observed
list_files - First observed
read_file - First observed
search_in_repo
TDQS
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.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.
Read-only AI coding tools for change verification, release readiness, capacity, and guidance.
Read-only tools over the Safer Agentic AI framework: 238 patterns + 14 heuristics.
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 gradedqualityBmaintenanceEnables AI assistants to securely browse, search, inspect, and understand local project files through Model Context Protocol tools.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mi6gin/repo-inspector-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server