
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 分
请在仓库或注册中心条目中声明许可证。