Ground

Grounded claims for code

An MCP server that prevents AI hallucination in code analysis. You can't claim something until you've checked it.

npm install @createsomething/ground-mcp

The Problem

AI agents are confident. Too confident. They'll tell you two files are "95% similar" without ever comparing them. They'll declare code "dead" without checking who uses it.

This is hallucination dressed up as analysis.

The Solution

You can't claim something until you've checked it.

  • Duplicates → You have to compare the files first
  • Dead code → You have to count the uses first
  • Orphans → You have to check the connections first

This prevents AI hallucination by requiring computation before synthesis.

Installation

Claude Code (CLI)

npm install @createsomething/ground-mcp
claude mcp add --scope user --transport stdio ground -- npx @createsomething/ground-mcp

Cursor (One-Click)

Install in Cursor →

Other Tools

Add to your MCP config (.mcp.json, claude_desktop_config.json, etc.):

{
  "mcpServers": {
    "ground": {
      "command": "npx",
      "args": ["@createsomething/ground-mcp"]
    }
  }
}

Available Tools

Core Analysis

ground_compare Compare two files for similarity (0.0-1.0 score)
ground_count_uses Count symbol uses; distinguishes runtime vs type-only usages
ground_check_connections Check if module is connected (understands Cloudflare Workers)
ground_find_duplicate_functions Find duplicates across AND within files; supports monorepos

Verified Claims (Audit Trail)

ground_claim_dead_code Claim code is dead — blocked until you've counted uses
ground_claim_orphan Claim module is orphaned — blocked until you've checked connections

Discovery Tools

ground_find_orphans Find modules nothing imports
ground_find_dead_exports Find exports never imported elsewhere
ground_check_environment Detect Workers/Node.js API leakage
ground_suggest_fix Get suggestions for fixing duplications

Graph-Based Analysis

ground_build_graph Build symbol graph for repo-wide analysis
ground_query_dead Query graph for dead exports (filters framework conventions)

AI-Native Tools

ground_analyze Batch analysis: duplicates + dead exports + orphans + environment
ground_diff Incremental analysis vs git baseline (only NEW issues)
ground_verify_fix Verify a fix was applied correctly

Design System Analysis

ground_find_drift Find design token violations (hardcoded colors, spacing, etc.)
ground_adoption_ratio Calculate token adoption percentage with health thresholds
ground_suggest_pattern Suggest tokens to replace hardcoded values
ground_mine_patterns Discover implicit patterns that should become tokens
ground_explain AI-native traceability — explain why files are excluded

Usage Examples

Ask your AI assistant:

Find duplicate functions in src/ with at least 10 lines
Check if the old-utils module is still connected to anything
Run ground_analyze on packages/sdk to find dead code
What's the CSS token adoption ratio in packages/components?

Configuration

Ground loads .ground.yml from your project root for:

  • Ignore patterns (functions, files, directories)
  • Known drift exceptions with documented reasons
  • Context declarations for intentional exclusions
  • Similarity thresholds