TokenScope icon

TokenScope

1

Enables large language models to efficiently explore and understand codebases by providing token-aware directory exploration and file content viewing.

About

TokenScope is a Model Context Protocol (MCP) server designed to enhance the ability of Large Language Models (LLMs) like Claude to understand and navigate codebases. It provides intelligent directory structure analysis, token-aware file content exploration, and comprehensive report generation, ensuring that LLMs can effectively glean insights from code repositories while respecting token limits. By offering functionalities such as automatic directory summarization, smart filtering with `.gitignore` support, and accurate directory statistics, TokenScope helps LLMs focus on relevant information and avoid token waste on irrelevant files and directories.

Key Features

  • Accurate directory statistics for even the largest directories
  • 1 GitHub stars
  • Built-in security with base path validation
  • Respect for token limits to maximize information within constraints
  • Token-aware directory exploration with automatic summarization
  • Smart filtering with default patterns and .gitignore support

Use Cases

  • Generating comprehensive reports about a project's structure and content for LLMs.
  • Enabling LLMs to explore project directories and understand their structure.
  • Providing LLMs with file content while respecting token limitations.