SCAST

by davidkingzyb

15 stars
363 downloads
Not rated
GitHub Website

About

Static Code Analysis and Visualization. Convert Code to UML and Flow Diagram and explain by AI.

Details

Author
davidkingzyb
Repository
davidkingzyb/SCAST
GitHub stars
15
Downloads
363
License
MIT License
Categories
Developer Tools, Knowledge Base, AI, Design, File Management, Other
Tags
#visualization

- Converts code into UML diagrams and flowcharts.
- Supports C#, JavaScript, Python, TypeScript, C, and C++.
- Uses TreeSitter for parsing and Mermaid/D3 for visualization.
- Offers two MCP tools: analysis and retrieval.
- Can be tried online or run locally as an MCP server.
- Integrates with Ollama for AI-assisted analysis.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name SCAST
    Command (node, npx, python, etc.) node
    Arguments
    • Argument 1 /YOUR_INSTALL_DIR/SCAST/mcp/index.js
    • Argument 2 /YOUR_WORKSPACE/
    • Argument 3 C:\Users\DKZ\OTHER_ALLOWED_DIR\

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, run npm install, then configure the MCP server in your AI client with the command node and the path to /YOUR_INSTALL_DIR/SCAST/mcp/index.js followed by one or more allowed workspace directories. The server exposes two tools: scast_analysis for generating diagrams and keyword explanations, and scast_retriever for searching code definitions.

scast_analysis

Assist users in analyzing and summarizing code through visualization by providing the folder path. Generates an AST tree, various visual charts (UML diagrams, AST tree diagrams, and Mermaid flowcharts), and returns a keyword list containing all class and method names with functionality explanations.

scast_retriever

Helps users analyze and summarize code by providing the file path of the source code folder. Performs static analysis and generates an AST tree. Allows searching using keywords (class name, method name, or field name) in the AST tree to find the source code at its definition.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "scast": {
            "env": {},
            "args": [
                "/YOUR_INSTALL_DIR/SCAST/mcp/index.js",
                "/YOUR_WORKSPACE/",
                "C:\\Users\\DKZ\\OTHER_ALLOWED_DIR\\"
            ],
            "shell": false,
            "command": "node"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "/YOUR_INSTALL_DIR/SCAST/mcp/index.js",
        "/YOUR_WORKSPACE/",
        "C:\\Users\\DKZ\\OTHER_ALLOWED_DIR\\"
    ],
    "shell": false,
    "command": "node"
}

Macos

{
    "env": [],
    "args": [
        "/YOUR_INSTALL_DIR/SCAST/mcp/index.js",
        "/YOUR_WORKSPACE/",
        "C:\\Users\\DKZ\\OTHER_ALLOWED_DIR\\"
    ],
    "shell": false,
    "command": "node"
}

Windows

{
    "env": [],
    "args": [
        "/YOUR_INSTALL_DIR/SCAST/mcp/index.js",
        "/YOUR_WORKSPACE/",
        "C:\\Users\\DKZ\\OTHER_ALLOWED_DIR\\"
    ],
    "shell": false,
    "command": "node"
}

🔱SCASTis a programmatic tool that converts code into UML diagrams and flowcharts.

- csharp
- javascript
- python
- typescript
- c
- cpp
- use
TreeSitteryou can find more language or customize your language.

The underlying principle involves leveraging a parser to parse the code into an Abstract Syntax Tree (AST), followed by static analysis, and finally utilizingMermaidandD3for visualization.

You can try itonlineor just download this repo and open SCAST.html with browser.
For Developers it can be deployed on servers usingnpm run server. Or use it asMCPserver integrate it into your AI client.
- git clone https://github.com/davidkingzyb/SCAST.gitdownload the source code.
- npm install
- config at your client

{ "mcpServers": { "scast":{ "command":"node", "args":[ "/YOUR_INSTALL_DIR/SCAST/mcp/index.js", "/YOUR_WORKSPACE/", "C:\\Users\\DKZ\\OTHER_ALLOWED_DIR\\", ] } } }

SCAST is a tool designed to assist users in analyzing and summarizing code through visualization. By simply providing the folder path where the code is located, SCAST can perform static analysis on the code, generating an AST tree to helping users understand the code structure and explain its functionality. Generate various visual charts such as UML diagrams, AST tree diagrams and Mermaid flowcharts. Finally return a keyword list containing all class and method names along with their functionality explanations, and include a link to allow users to view the chart details in their browser.

SCAST is a tool that helps users analyze and summarize code and provides visualizations. You need to provide the file path of the source code folder. SCAST will perform static analysis on the source codes in the folder, generating an AST tree to help users understand the code structure and explain its functionality. After analyzing the code directory with SCAST, you can use keywords in the AST tree for searching, better answering user questions using a RAG method. This keyword can be a class name, method name, or field name. SCAST will find the source code at its definition and return it.

installollamafirst
see
ai.jsfor more details

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Automatically generates documentation for code repositories by analyzing directory structures and code files using the OpenRouter API.

A coding assistant server that provides context-aware code suggestions, documentation integration, and technology detection.

Generate draw.io system architecture diagrams from text descriptions using the ZhipuAI large model.

Provides educational content, model information, and read-only API interactions for Lerian developers.

Integrates LLM applications with documentation sources using the Model Context Protocol.

An MCP server for query generation and documentation assistance using Claude AI.

Search Metal Framework documentation and generate code.

A lightweight Model Context Protocol (MCP) server that brings RAG (Retrieval-Augmented Generation) capabilities to your LLM over Markdown documentation stored on S3.

An MCP server providing searchable access to multiple AI/ML SDK documentation and source code.

Manage user feedback, roadmap, changelog and user surveys all from your favorite LLM

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.