davidkingzyb_scast

davidkingzyb_scast

by davidkingzyb
Converts code into UML diagrams and flowcharts for better understanding and AI-assisted explanation.

SCAST Code Analysis and Visualization Tool

Overview

SCAST is a programmatic tool designed to convert code into UML diagrams and flowcharts. It leverages static code analysis to generate visual representations of code structures, making it easier for developers to understand and explain their code. The tool supports multiple programming languages, including JavaScript, TypeScript, C#, and Python, with plans to add support for Vue in the future.

Features

  • Static Code Analysis: Parses code into an Abstract Syntax Tree (AST) for detailed analysis.
  • Visualization: Uses Mermaid and D3 to generate UML diagrams, flowcharts, and other visual representations.
  • AI Integration: Explains code functionality using AI, with support for Ollama AI.
  • Multiple Programming Languages: Supports JavaScript, TypeScript, C#, and Python, with future support for Vue.
  • MCP Server Integration: Can be deployed as an MCP server for integration into AI clients.

Tools

scast_analysis

SCAST performs static analysis on code, generating an AST tree to help users understand the code structure and explain its functionality. It produces various visual charts, including UML diagrams, AST tree diagrams, and Mermaid flowcharts. The tool also returns a keyword list containing all class and method names along with their functionality explanations.

scast_retriever

This tool helps users analyze and summarize code by providing visualizations. It performs static analysis on the source code folder, generating an AST tree to explain the code structure. Users can search the AST tree using keywords (class names, method names, or field names) to retrieve relevant source code.

Configuration

To configure SCAST as an MCP server:

  1. Clone the repository:
    bash git clone https://github.com/davidkingzyb/SCAST.git
  2. Install dependencies:
    bash npm install
  3. Configure your client:
    json { "mcpServers": { "scast": { "command": "node", "args": [ "/YOUR_INSTALL_DIR/SCAST/mcp/index.js", "/YOUR_WORKSPACE/", "C:\\Users\\DKZ\\OTHER_ALLOWED_DIR\\" ] } } }

Usage

You can try SCAST online by visiting SCAST.html or download the repository and open SCAST.html in your browser. For developers, SCAST can be deployed on servers using npm run server.

Visualizations

SCAST generates various types of visualizations, including:

  • UML Diagrams: Visualize class relationships and method interactions.
  • Flowcharts: Understand the flow of control within the code.
  • Force Directed Graphs: Explore the relationships between different code elements.
  • D3 Graphs: Includes Indented Tree, Tidy Tree, Cluster Tree, Radial Tidy Tree, Radial Cluster Tree, Force Directed Tree, and Edge Bundling.

Integration with Ollama AI

SCAST integrates with Ollama AI to provide code explanations. Install Ollama and refer to ai.js for more details.

License

SCAST is licensed under the MIT License.

Resources

Contributors

Languages

  • JavaScript: 97.0%
  • HTML: 1.7%
  • CSS: 1.0%
  • C#: 0.1%
  • TypeScript: 0.1%
  • Dockerfile: 0.1%

Features & Capabilities

Categories
mcp_server model_context_protocol javascript typescript python visualization ai d3 mermaid ollama api_integration docker

Implementation Details

Stats

0 Views
5 GitHub Stars

Repository Info

davidkingzyb Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300