FileScopeMCP logo

FileScopeMCP

by admica

FileScopeMCP is a TypeScript-based tool that analyzes your codebase to identify important files based on dependency relationships. It provides insights directly to your AI assistant to supercharge code understanding and visualization.

View on GitHub

Last updated: N/A

What is FileScopeMCP?

FileScopeMCP is a server that analyzes a codebase to rank files by importance, track dependencies, and provide summaries, making this information available to AI tools through Cursor's Model Context Protocol.

How to use FileScopeMCP?

To use FileScopeMCP, clone the repository, build the project using the provided build script, configure the mcp.json file in your project's .cursor directory with the correct base directory, and then enable the MCP in Cursor. You can then use the exposed tools to analyze your project, work with summaries, and generate diagrams.

Key features of FileScopeMCP

  • File Importance Analysis: Rank files based on their role in the codebase.

  • Dependency Tracking: Map bidirectional dependency relationships between files.

  • Visualization: Generate Mermaid diagrams to visualize file relationships.

  • File Summaries: Add human or AI-generated summaries to any file.

  • Multiple Project Support: Create and manage multiple file trees for different project areas.

  • Persistent Storage: All data automatically saved to disk in JSON format.

Use cases of FileScopeMCP

  • Quickly understand the structure and dependencies of a large codebase.

  • Identify the most critical files to focus on during development or debugging.

  • Generate visualizations to communicate code structure to other developers.

  • Add summaries to files to quickly grasp their purpose.

  • Integrate with AI tools like Cursor to enhance code understanding and generation.

FAQ from FileScopeMCP

What programming languages are supported?

Python, JavaScript, TypeScript, C/C++, Rust, Lua, and Zig are supported for dependency detection.

How is file importance calculated?

Files are assigned importance scores based on a weighted formula that considers the number of dependents and dependencies, file type, location in the project structure, and file naming.

What diagram styles are available?

Dependency graphs, directory trees, and hybrid views are available for diagram generation.

Where is the file tree data stored?

All file tree data is stored in JSON files.

How do I integrate FileScopeMCP with Cursor?

Configure the mcp.json file in your project's .cursor directory and enable the MCP in Cursor settings.