token-scope-mcp

token-scope-mcp

1

TokenScope is a directory explorer designed specifically for Large Language Models (LLMs), offering token-aware exploration and reporting capabilities. It provides intelligent summarization and security features that ensure efficient and safe codebase analysis.

TokenScope

Token-Aware Directory Explorer for Large Language Models (LLMs).

Overview

TokenScope provides intelligent directory structure analysis and token-aware file content exploration designed for LLMs like Claude. It helps LLMs understand codebases by:

  • Exploring directory structures with token-aware summarization
  • Viewing file contents with token limitations in mind
  • Generating comprehensive reports about directories

Key Features

  • Token-Aware Directory Exploration: Automatic summarization for large directories, token limit respect, built-in security, smart filtering, and accurate directory statistics.
  • Simple, Intuitive Tools: Includes explore_directory, view_content, and generate_report tools.

Installation

  • Requires Python 3.10 or higher and uv.
  • Install via PyPI using uv pip install tokenscope.

Usage

  • The --base-path argument is required for security, restricting operations to a specified directory.
  • TokenScope offers testing tools directly for directory exploration, file viewing, and report generation.

Smart Filtering with Ignore Patterns

  • Default and custom ignore patterns supported, with .gitignore support.

Security Features

  • All operations are validated to be within the base directory, ensuring security.

License

Licensed under the MIT License.