scanner-mcp

mcp
Guvenlik Denetimi
Uyari
Health Uyari
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 7 GitHub stars
Code Uyari
  • Code scan incomplete — No supported source files were scanned during light audit
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

MCP server that scans C++ repositories. File listing, AST code extraction, dependency graph, and importance ranking for AI coding agents.

README.md

scanner-mcp

scanner-mcp

An MCP server that scans C++ repositories and exposes 4 tools for AI agents

C++17 tree-sitter MCP Linux


Features

  • scan_files — list all files (path, extension, size) via lightweight filesystem walk
  • scan_code — extract includes, classes, structs, functions, namespaces via tree-sitter AST
  • get_file_connections — forward/reverse dependency graph between files
  • get_file_rankings — importance scoring by deps, symbols, and include frequency
  • Shared cache — first call to any tool parses the repo; subsequent calls return instantly

Setup for agents

Clone and build (requires CMake ≥ 3.14 — install from https://cmake.org/download/):

git clone <repo-url>
cd scanner-mcp
cmake -B build && cmake --build build

Then add to opencode.json:

{
  "mcp": {
    "scanner-mcp": {
      "type": "local",
      "command": ["/absolute/path/to/scanner-mcp/build/scanner-mcp"],
      "enabled": true
    }
  }
}

Tools

Tool Arguments Returns
scan_files path (req) { files: [{ path, extension, size }] }
scan_code path (req), refresh { code: [{ file, includes, classes, structs, functions, namespaces }] }
get_file_connections path (req), refresh { file_connections: { forward, reverse } }
get_file_rankings path (req), refresh { file_rankings: [{ path, score, incoming_deps, outgoing_deps, symbols, include_freq }] }

scan_files walks the filesystem only — no parsing, no cache, always fast.
scan_code, get_file_connections, and get_file_rankings share a cache keyed by absolute path. The first call parses the repo once; subsequent calls return instantly. Set refresh: true to bust the cache when files change.

Requirements

  • CMake ≥ 3.14
  • C++17 compiler (GCC 9+, Clang 10+, Apple Clang 14+)
  • Linux (x86_64)

Architecture

FILE DISCOVERY      → walk, filter, metadata                   scan_files
CODE EXTRACTION      → includes, symbols via tree-sitter AST   scan_code
DEPENDENCY ANALYSIS  → forward/reverse connections             get_file_connections
IMPORTANCE RANKING   → scoring heuristics                      get_file_rankings

License

MIT

Yorumlar (0)

Sonuc bulunamadi