
Grasp — Code Architecture & Dependency Analysis
io.github.ashfordeOU由 GitHub 帳號 ashfordeOU 發布v3.21.3更新於 Nov 3, 2026
程式碼庫分析:面向 GitHub 和 GitLab 的依賴圖、安全掃描和重構計劃。
AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。
原文描述
Codebase analysis: dependency graphs, security scanning, and refactor plans for GitHub and GitLab.
概覽
Grasp — Code Architecture & Dependency Analysis 的本機 MCP 服務;無需登入;STDIO。
暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Grasp — Code Architecture & Dependency Analysis,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Grasp MCP Server
Expose Grasp's codebase analysis engine as MCP tools for Claude Code and other LLM agents.
Supports GitHub repositories and local directories. Analyzes dependency graphs, architecture layers, circular deps, security issues, design patterns, dead code, code metrics, git history, duplicate detection, cross-repo comparison, monorepo workspaces, runtime call graphs, database schema coupling, API surface maps, and migration planning.
[Grasp dependency graph]
Force-directed dependency graph — the same data the MCP server exposes via grasp_analyze, grasp_dependents, graph_query, etc.
Table of Contents
- Setup
- Configure in Claude Code
- Tools
- Example Usage
- GitHub Token
- GitLab Support
- CLI
- JetBrains Plugin
- Claude Code Slash Commands
- Privacy
Current version: 3.21.3 — 150 tools + 8 MCP Resources + 2 guided Prompts.
New in v3.21.0 — Multimodal Knowledge Graph: ingest any artifact (code, Markdown, PDF, Word .docx, Excel .xlsx, HTML, images via OCR, audio/video via local Whisper, YouTube) into a queryable semantic knowledge graph, then ask it in natural language. New tools: grasp_ingest, grasp_kg_ask, grasp_kg_trace, grasp_kg_explain, grasp_kg_stats, grasp_kg_export (Cypher/Neo4j/GraphML/JSON/Mermaid), grasp_llm_status. Pluggable LLM backends (Anthropic, OpenAI, Gemini, DeepSeek, Kimi, Azure, Bedrock, Ollama — local-first, cloud opt-in; extraction falls back to a deterministic local extractor with zero credentials). Optional MCP-over-HTTP transport for shared team access (GRASP_HTTP_MCP=1, optional API key). Three new AST languages (Bash, Elixir, Julia → 19 tree-sitter-backed). See ## Multimodal Knowledge Graph below.
v3.20.0 added: Full security scanning suite — grasp_vulnerabilities covers five threat vectors (OSV.dev dependency CVEs, NIST NVD container/runtime CVEs, local supply-chain integrity checks, Socket.dev behavioral analysis, and scheduled grasp_vuln_watch monitoring), plus skip_container / skip_socket / skip_integrity fast-scan flags.
v3.19.0 added: Team Dashboard visual parity with the Grasp app — teal brand sweep, Lucide SVG icon system, multi-provider auth (GitLab, GitHub Enterprise, Bitbucket, Azure DevOps, Gitea), mobile More menu, keyboard shortcut popover.
v3.18.0 added: 10 new MCP tools (grasp_hub_nodes, grasp_bridge_nodes, grasp_surprising_connections, grasp_knowledge_gaps, grasp_suggested_questions, grasp_minimal_context, grasp_traverse, grasp_semantic_search, grasp_apply_refactor, grasp_architecture_overview); 3 graph export formats (grasp_export_graphml, grasp_export_cypher, grasp_export_obsidian); TS-config path-alias and Jedi-style Python import resolvers; Claude Code slash commands; token-reduction eval harness (scripts/eval-token-reduction.mjs); localized READMEs (Hindi/Japanese/Korean/Simplified Chinese).
Recent additions (see CHANGELOG.md for full history):
- v3.17.1 — per-directory lockfile scoping in the OSV scanner; test-fixture manifests skipped; CWS-token rotation script.
- v3.17.0 — OSV.dev SCA scanner (
grasp_vulnerabilities+grasp vulnsCLI); architecture drift detection (grasp_snapshot+grasp_diff_snapshots+grasp driftCLI); org-level dashboard (grasp_org_summary+grasp orgCLI); test-coverage gap map; graph schema v3 (TestFile nodes, TESTS/COVERS edges). - v3.16.0 — PR Impact GitHub Action; Brain context tools (
grasp_diff_symbols,grasp_exec_flow,grasp_skillmd,grasp_hooks,grasp_mro,grasp_communities,grasp_contracts); confidence scoring; wiki generator; registry tools. - v3.15.0 — Kuzu graph schema v2; cross-file type propagation; ORM tracker;
grasp_detect_changes; 8 MCP Resources; 2 MCP Prompts;grasp setupone-command editor auto-config.
Verticals shipped before v3.15: aerospace/safety-critical (requirement traceability, MISRA, DO-178C, ECSS-E-ST-40C, Ada/SPARK), AI research (safety-constraint tracing, eval coverage, ML pipeline DAG, Jupyter notebooks), enterprise (SBOM CycloneDX/SPDX, DORA, AI-powered ADR, PII trace, separation of duties, finance latency / model risk), OS/kernel (subsystem boundaries, ABI stability, Kconfig, IRQ graph, patch series impact), open source (good-first-issues, fork divergence, OpenSSF scorecard, deps.dev), and a hosted SaaS API (saas/).
Verify Provenance
Every release is signed. Verify before installing:
npm package (SLSA provenance):
Docker image (Cosign keyless signature):
Signatures are stored transparently in the Sigstore Rekor public ledger.
Multimodal Knowledge Graph
Beyond code analysis, Grasp can ingest any artifact into a queryable semantic knowledge graph and answer natural-language questions grounded with citations.
Local-first, cloud opt-in. Code parsing stays deterministic (tree-sitter AST). Semantic entity/relationship extraction uses whichever LLM you configure and auto-detects a local Ollama before any cloud key; with no LLM at all it falls back to a deterministic extractor so everything still works offline. Every edge is tagged EXTRACTED (stated in the source) vs INFERRED (derived), with a source locator.
Select explicitly with GRASP_LLM_PROVIDER + GRASP_LLM_MODEL, or per-call via the provider/model/api_key tool args. Run grasp_llm_status to see what's available.
Optional parsers (installed on demand, keeping the core install lean): npm i pdf-parse mammoth xlsx tesseract.js youtube-transcript. Audio/video transcription additionally needs ffmpeg on PATH.
Shared team access (MCP over HTTP)
Point any MCP client at http://host:7333/mcp (send the key as Authorization: Bearer … or x-api-key). /health returns liveness. Grasp's tools are stateless, so one endpoint serves a team's agents.
Where it lives
The multimodal pipeline is MCP-server-side (Node) and does not run in the browser app — see the source layout under mcp/src/:
ingest/*— artifact parsers (PDF, Word.docx, Excel.xlsx, HTML, image OCR, audio/video, URL, YouTube; heavy parsers lazy-loaded on demand)llm/provider.ts— pluggable multi-provider LLM layer (local-first Ollama auto-detect → cloud key → deterministic fallback)semantic/*— SQLite knowledge-graph store, hybrid BM25 + vector retrieval, BFS path-tracing, hub/god-node detectiontree-sitter/*— deterministic AST parsing across 19 languages
Setup
Configure in Claude Code
Add to ~/.claude/claude_mcp_settings.json:
Or install globally via npm:
Tools
Core Analysis
History & Comparison
Code Quality
Ecosystem Integration
Runtime & Infrastructure Intelligence
GitHub Activity
Codebase Intelligence (v2.4–v2.9)
Aerospace / Safety-Critical
AI Research / AI Safety
Enterprise / Compliance
Multi-Repo / Platform (v3.4.x)
Finance / Compliance (v3.5.x)
OS / Kernel (v3.6.x)
Open Source (v3.7.x)
Ada / Heritage (v3.8.x)
Graph Tools (New in v3.11.0)
Requires grasp_brain_index to be run first.
Example: find all functions that eventually call anything returning AuthToken:
Brain & Persistent Intelligence (v3.10+)
Semantic Search & Rename (v3.14+)
Graph Intelligence (v3.15.0)
v3.20.0 — Team Dashboard Parity
Team Dashboard brought to full visual and UX parity with the Grasp app — teal brand tokens, Lucide SVG icons throughout, multi-provider auth (GitLab, GitHub Enterprise, Bitbucket, Azure DevOps, Gitea) with shared localStorage keys, mobile More-menu at ≤860px, auth-bar flex-wrap, and a keyboard shortcut popover (kbd-fab).
v3.18.0 — Graph Analytics & LLM Context
MCP Resources (v3.15.0)
8 live data URIs consumable directly by MCP clients without tool calls:
MCP Prompts (v3.15.0)
Example Usage
GitHub Token
For large repos (>100 files), pass a GitHub PAT to avoid rate limiting:
Without a token: 60 req/hour. With a token: 5,000 req/hour.
GitLab Support
Grasp works with gitlab.com and self-hosted GitLab instances.
Token auth (quickest)
Self-hosted Docker bot (automated MR comments)
Then register a GitLab webhook pointing to http://your-host:7332/webhook with your WEBHOOK_SECRET.
Tunnel agent (internal GitLab, no inbound ports needed)
CLI
Grasp ships a grasp CLI alongside the MCP server:
JetBrains Plugin
A JetBrains IDE plugin (IntelliJ IDEA, WebStorm, PyCharm, GoLand) is available under jetbrains-plugin/. It adds:
- Tool window — interactive dependency graph rendered in JCEF, falls back to text summary
- Status bar widget — live health score (e.g.
⬡ 87 B) with click-to-open - Editor annotations — inline warnings for layer violations and circular deps
- File-save re-analysis — automatic re-analysis on save for watched extensions
- Settings — configurable CLI path, annotation toggles
Build with ./gradlew buildPlugin from jetbrains-plugin/.
SaaS API Server
A lightweight hosted analysis API lives under saas/. It wraps Grasp analysis behind:
- Redis/LRU cache — identical requests served instantly, configurable TTL
- Sliding-window rate limiter — per-key, configurable limits
- Async job queue — POST returns 202 immediately; analysis runs in background
POST /analyze— accepts{ repo: "owner/repo" }or{ repo: "https://github.com/..." }
Slack / Teams Bot
Automated health alerts and weekly digests live under slack-bot/. Features:
- Hourly regression alerts — fires when score drops ≥10 points, new security issues, or new circular deps appear
- Weekly digest — configurable cron (default Monday 09:00) with multi-repo summary
- Slack Block Kit and MS Teams Adaptive Cards (v1.4) formatting
- Configurable via environment variables (
SLACK_WEBHOOK_URL,TEAMS_WEBHOOK_URL,GRASP_REPOS, etc.)
GitHub Actions Workflows
Claude Code Slash Commands
Three pre-built slash commands ship under .claude/commands/ so any Claude Code workspace can invoke Grasp's most common flows in one step:
Each command is a markdown file (.claude/commands/grasp-*.md) with allowed-tools and a template body — edit them in-repo to customize.
Workflow Tip
Always call grasp_analyze first — it returns a session_id that all other tools require. Sessions are held in memory and expire when the MCP server restarts.
In-app help: when running the browser app, press ? to open a floating popover listing every shortcut, tab, and overlay. The Team Dashboard (team-dashboard.html) ships its own help modal.
Privacy
Grasp does not collect any data. The MCP server runs as a local subprocess; the only outbound calls are to the GitHub/GitLab API, OSV.dev for CVE lookups, and (optionally) the AI provider you configure. Your code never passes through an Ashforde server. Full privacy policy: PRIVACY.md.
來源:mcp/README.md,提交 4bf1b59
工具
0版本歷史
2- v3.21.3最新Nov 3, 2026
- v3.21.0Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。