TokenScope: Token-Aware Directory Explorer

Created By
cdgaetea year ago
A tool to analyze directory structures while being mindful of token limitations for LLMs. Customize ignore files like gitignore patterns, such as .venv or node_modules
Overview

TokenScope helps LLMs like Claude efficiently explore and understand codebases by providing token-optimized directory structure analysis and content extraction. Key features include:

  • Token-aware directory scanning with configurable depth and intelligent summaries
  • File content analysis with smart token limitations and special handling for formats like JSON
  • Token usage statistics to estimate processing requirements
  • Comprehensive reporting with directory structure, token statistics, and important file samples
  • Security features restricting operations to a specified base directory

TokenScope is built with FastMCP and uses tiktoken for accurate token counting. It requires Python 3.10+ and can be installed via PyPI or directly from GitHub for development.

Server Config

{
  "mcpServers": {
    "TokenScope": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "tokenscope",
        "tokenscope",
        "--base-path",
        "/your/secure/base/path"
      ]
    }
  }
}
Project Info
Created At
a year ago
Updated At
a year ago
Author Name
cdgaete
Star
-
Language
-
License
-
Category

Recommend Servers

View All
Tavily Mcp
@tavily-ai

JavaScript
a year ago