GraphCare — Structural Database Health Scanner

👤 nlr-ai 📦 v1.0.0 ⭐ 4.4 ⬇️ 668 下载
🔒 IT运维与安全 免费

📖 技能介绍


name: graphcare description: "Structural database health scanner. Audits schema topology for orphaned tables, missing indexes, nullable FKs, circular dependencies — without ever reading row data. Supports PostgreSQL, MySQL, SQLite." version: 1.0.0 metadata: openclaw: requires: bins: - node env: [] emoji: "\U0001F6E1" homepage: https://github.com/mind-protocol/graphcare


GraphCare — Structural Database Health Scanner

The first structural antivirus for AI databases. Scans your schema topology for hidden problems — without ever touching your data.

Why

AI agents evolve schemas at speed. But nobody audits the structure. Over time:

  • Foreign keys lose their indexes (JOINs slow to a crawl)
  • Tables drift into isolation (orphaned, unreachable data)
  • Primary keys go missing (replication breaks, ORMs fail)
  • Nullable FKs create silent referential gaps
  • Circular dependencies make inserts impossible
  • Redundant indexes waste disk and slow writes

GraphCare catches all of this in one scan.

Zero-Trust by Design

GraphCare only queries metadata (information_schema, PRAGMA, pg_indexes). It is structurally impossible for it to read, leak, or mutate your row data.

  • READ-ONLY: Zero writes, zero mutations
  • NO ROW DATA: Only schema metadata is accessed
  • STATELESS: Memory purged after every scan

Setup

GraphCare is an MCP server. Add it to your MCP client config:

{
  "mcpServers": {
    "graphcare": {
      "command": "node",
      "args": ["/path/to/graphcare/index.js"]
    }
  }
}

Or run via Docker:

docker build -t graphcare .
docker run -i graphcare

Or install from npm:

npm install -g graphcare-mcp
graphcare-mcp

Tools

audit_db_structure

Full structural scan. Pass a connection string, get a complete health report.

Parameters: - connection_string (required) — Database URI: postgresql://, mysql://, sqlite:///path/to/db, or just file.db

Returns: JSON report with: - db_type — Database engine detected - tables[] — All tables found - findings[] — Each structural issue with type, severity, table, and message - metrics{} — Counts per finding type + computed health_score (0-100)

Example:

Use graphcare to audit my database at postgresql://localhost:5432/myapp

The agent calls audit_db_structure with the connection string and receives a structured JSON report.

explain_finding

Plain-language explanation of any finding type. Includes severity, impact, and recommended fix.

Parameters: - finding_type (required) — One of: orphaned_table, missing_fk_index, duplicate_index, nullable_fk, no_primary_key, circular_dependency - context (optional) — Table or column name for specific advice

What GraphCare Detects

Finding Severity Impact
Orphaned Tables Warning Structurally isolated dead weight
Missing FK Indexes Critical #1 cause of slow JOINs and DELETEs
No Primary Key Critical Breaks replication and ORMs
Nullable Foreign Keys Warning Hidden referential integrity gaps
Circular Dependencies Warning Makes clean inserts impossible
Duplicate Indexes Info Wasted disk, slower writes

Supported Databases

  • PostgreSQL — Full 6-finding detection via information_schema + pg_indexes
  • MySQL — Full detection via information_schema
  • SQLite — Full detection via sqlite_master + PRAGMA

Security

This tool runs read-only queries against database metadata catalogs only. It never executes SELECT on user tables, never writes, and holds no state between invocations. Connection strings are received via MCP JSON-RPC over stdin — never exposed in process listings.

访问小葱技能站7w4.net,解锁更多实用的AI技能插件。


Built by Mind Protocol.

🤖 AI 评测

这是一个专业且实用的数据库审计工具,专注于检查表结构问题而非数据本身,安全性设计得当。文档清晰、错误提示友好、支持主流数据库是其亮点。但作为代码产品存在明显短板:缺少测试保障、依赖版本有安全漏洞、某些实现细节存在风险。总体质量中等偏上,核心功能扎实但工程实践方面有提升空间,适合对安全性要求不极端的场景使用。

📊 多维度评分

适应性4.5
规范性4.3
有效性4.7
可靠性4.5
可信度4.3

📁 包含文件 (7 个)

📄 LISTING.md 2.8 KB
📄 SKILL.md 3.8 KB
📄 _meta.json 128 B
📄 index.js 30.8 KB
📄 package-lock.json 49.3 KB
📄 package.json 513 B
📄 skill-card.md 2 KB