
A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

An MCP server that scans directory structures and serves file contents with token-aware summarization so LLMs can understand codebases within token limits.
TokenScope: token-aware directory explorer MCP server is cataloged as an MCP server attributed to cdgaete. An MCP server that scans directory structures and serves file contents with token-aware summarization so LLMs can understand codebases within token limits. It is categorized under file systems-docs. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for TokenScope: token-aware directory explorer MCP server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
All file operations are validated to stay within a required base directory, attempts to access files outside it are rejected, and the base path is fixed when the server starts.
Yes, it reports full directory statistics with complete counts of all files, directories, and disk usage even for massive directories.
README.md · d53b10a96787 · Fetched 2026-11-13 11:16:54 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
Token-Aware Directory Explorer for Large Language Models (LLMs).
A Model Context Protocol (MCP) server that helps LLMs efficiently explore and understand codebases and directory structures.
TokenScope provides intelligent directory structure analysis and token-aware file content exploration designed for LLMs like Claude. It helps LLMs understand codebases by:
TokenScope provides just three core tools:
explore_directory - Scan and understand directory structuresview_content - Access file contents with token awarenessgenerate_report - Create comprehensive reports (with option to save to file)This is the recommended method for most users who just want to use TokenScope:
# Install from PyPI using uv (recommended)
uv pip install tokenscope
The --base-path argument is mandatory for security reasons. It restricts all file operations to the specified directory.
# Run using the installed package
uv run --with tokenscope tokenscope --base-path /path/to/allowed/directory
Locate Claude Desktop's configuration file (typically ~/.config/claude/config.json)
Add TokenScope to the mcpServers section:
"mcpServers": {
"TokenScope": {
"command": "uv",
"args": [
"run",
"--with",
"tokenscope",
"tokenscope",
"--base-path",
"/your/secure/base/path"
]
}
}
Replace /your/secure/base/path with the directory you want to restrict operations to
Save the configuration file and restart Claude Desktop
The --base-path argument is required for security (it restricts file operations to the specified directory):
tokenscope --base-path /path/to/allowed/directory
TokenScope includes a test mode for trying out tools directly:
# Test directory exploration
tokenscope --base-path /path/to/allowed/directory --test "explore:/path/to/directory"
# Test with custom ignore patterns
tokenscope --base-path /path/to/allowed/directory --test "explore:/path/to/directory?ignore=cache,*.log,tmp/&gitignore=false"
# Test file viewing
tokenscope --base-path /path/to/allowed/directory --test "view:/path/to/file"
# Test report generation
tokenscope --base-path /path/to/allowed/directory --test "report:/path/to/directory"
# Test report generation with file output and custom ignore patterns
tokenscope --base-path /path/to/allowed/directory --test "report:/path/to/directory?ignore=*.bak,temp/ > /path/to/output.md"
Here are some examples of how to use TokenScope with Claude:
Could you explore my project directory at /path/to/project and tell me about its structure?
Can you show me the content of the file at /path/to/file.py?
Please generate a comprehensive report about my project at /path/to/project and save it to /path/to/report.md
TokenScope now provides two levels of directory information:
This dual approach ensures that even for massive directories (with thousands or millions of files), you'll get accurate information about the total number of files, directories, and disk usage. This is especially valuable when working with large codebases where a complete directory listing would exceed token limits.
QUICK SCAN STATISTICS (files visible in tree):
Files shown in tree: 47
Directories shown in tree: 16
Size shown in tree: 185.9 MB
FULL DIRECTORY STATISTICS (all files):
Total files: 16,059
Total directories: 8
Total disk size: 2.1 GB
TokenScope automatically filters out common directories and files that typically don't contribute to understanding a codebase:
.git/, .venv/, venv/, __pycache__/, node_modules/, build/, dist/, etc.ignore_patterns parameterThis functionality helps prevent token waste on irrelevant files and directories like:
node_modules, virtual environments)# Ignore specific patterns
tokenscope --base-path /path --test "explore:/code?ignore=*.log,temp/"
# Disable .gitignore processing
tokenscope --base-path /path --test "explore:/code?gitignore=false"
# Both together
tokenscope --base-path /path --test "explore:/code?ignore=*.tmp&gitignore=false"
TokenScope includes important security features:
This project is licensed under the MIT License - see the LICENSE file for details.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for TokenScope: token-aware directory explorer MCP server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/token-scope-mcp)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

Hosted MCP server for tabletop RPG worlds that organizes messy notes and documents into a private store and lets MCP apps search lore, read documents, find characters, and optionally generate character or world pictures.

An MCP server that gives AI assistants scoped file system operations inside a project directory, with read-only reference projects plus git and GitHub tools.