New:Socket for Asana Is Now Available.Learn more
Get Started

@cocaxcode/ai-context-inspector

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cocaxcode/ai-context-inspector

Scan any project to discover its complete AI ecosystem: MCP servers, tools, context files, skills, memories. Generates an interactive HTML dashboard. Works as CLI and MCP server.

Source
npmnpm
Version
0.3.3
Version published
Maintainers
1
Created
Source

@cocaxcode/ai-context-inspector

See everything your AI tools know about your project.
19 AI tools · 6 scanners · 3 MCP tools · Dual mode: CLI + MCP server

npm version npm downloads License Node 19 AI tools 33 tests

The Problem · The Solution · Installation · CLI Usage · MCP Server · What It Detects · HTML Dashboard · Architecture

The Problem

Your project has AI configuration scattered everywhere:

  • CLAUDE.md with project instructions, .cursorrules with coding rules, AGENTS.md with universal guidelines
  • MCP servers configured in .mcp.json, ~/.claude.json, .vscode/mcp.json — each with different tools
  • Custom skills installed via npx skills add, custom agents in ~/.claude/agents/
  • Persistent memories in engram, Claude memory files, agent-specific memory stores
  • You don't know the full picture. Each tool sees only its own slice.

The Solution

AI Context Inspector scans your entire AI ecosystem in one shot:

npx @cocaxcode/ai-context-inspector

It discovers every AI configuration file, MCP server (with live introspection), installed skill, custom agent, and persistent memory — then generates a beautiful HTML dashboard or exposes the data as an MCP server for your AI tools to consume.

Zero config. Zero dependencies. Just run it.

Installation

CLI (one-shot, no install)

npx @cocaxcode/ai-context-inspector

Claude Code (MCP server)

claude mcp add ai-context-inspector -- npx -y @cocaxcode/ai-context-inspector@latest --mcp

Or add to your .mcp.json:

{
  "mcpServers": {
    "ai-context-inspector": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@cocaxcode/ai-context-inspector@latest", "--mcp"]
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "ai-context-inspector": {
      "command": "npx",
      "args": ["-y", "@cocaxcode/ai-context-inspector@latest", "--mcp"]
    }
  }
}

Cursor / Windsurf

Add to .cursor/mcp.json or equivalent:

{
  "mcpServers": {
    "ai-context-inspector": {
      "command": "npx",
      "args": ["-y", "@cocaxcode/ai-context-inspector@latest", "--mcp"]
    }
  }
}

Codex CLI

codex mcp add ai-context-inspector -- npx -y @cocaxcode/ai-context-inspector@latest --mcp

VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "ai-context-inspector": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@cocaxcode/ai-context-inspector@latest", "--mcp"]
    }
  }
}

CLI Usage

# Scan current directory → generates HTML report
npx @cocaxcode/ai-context-inspector

# Scan a specific directory
npx @cocaxcode/ai-context-inspector --dir /path/to/project

# Include user-level configs (~/.claude, ~/.gemini, etc.)
npx @cocaxcode/ai-context-inspector --user

# Enable live MCP server introspection (connects to each server)
npx @cocaxcode/ai-context-inspector --introspect

# Set introspection timeout (default: 10000ms)
npx @cocaxcode/ai-context-inspector --introspect --timeout 15000

# Output raw JSON instead of HTML
npx @cocaxcode/ai-context-inspector --json

# Run as MCP server (for AI tool integration)
npx @cocaxcode/ai-context-inspector --mcp

# All flags combined
npx @cocaxcode/ai-context-inspector --dir ./my-project --user --introspect --timeout 15000

CLI Flags Reference

FlagDescriptionDefault
--dir <path>Directory to scan. (current)
--userInclude user-level configs (~/)false
--introspectConnect to MCP servers and list toolsfalse
--timeout <ms>Introspection timeout per server10000
--jsonOutput JSON instead of HTMLfalse
--mcpRun as MCP server (stdio transport)false

MCP Server

When running as an MCP server (--mcp), three tools are exposed:

scan

Scan a project directory to discover its complete AI ecosystem.

Parameters:

ParameterTypeRequiredDescription
directorystringNoPath to scan (default: cwd)
include_userbooleanNoInclude user-level configs
introspectbooleanNoLive-connect to MCP servers
timeoutnumberNoIntrospection timeout (ms)

Example prompt: "Scan this project and tell me what AI tools are configured"

introspect_mcp

Connect to a specific MCP server and list its tools, resources, and prompts.

Parameters:

ParameterTypeRequiredDescription
commandstringYes*Command to launch the server
argsstring[]NoArguments for the command
envobjectNoEnvironment variables
urlstringYes*URL for HTTP/SSE servers
transportstringNostdio (default) or http
timeoutnumberNoConnection timeout (ms)

*Either command (stdio) or url (http) is required.

Example prompt: "Introspect the MCP server at npx @anthropic/mcp-server-memory"

generate_report

Generate a standalone HTML dashboard from scan results.

Parameters:

ParameterTypeRequiredDescription
directorystringNoPath to scan
include_userbooleanNoInclude user-level configs
introspectbooleanNoIntrospect MCP servers
timeoutnumberNoIntrospection timeout (ms)

Example prompt: "Generate an HTML report of my project's AI context"

What It Detects

19 AI Coding Tools

ToolContext FilesDescription
Claude CodeCLAUDE.md, .claude/, .mcp.jsonProject instructions + MCP config
Cursor.cursorrules, .cursor/rules/, .cursorignoreRules + ignore patterns
Windsurf.windsurfrules, .windsurf/rules/Codeium/Windsurf rules
GitHub Copilot.github/copilot-instructions.md, .github/agents/Instructions + custom agents
Gemini CLIGEMINI.md, .gemini/, .geminiignoreGoogle Gemini config
OpenAI CodexAGENTS.md, AGENT.md, .codex/Universal agent instructions
OpenCodeOPENCODE.md, .opencode/, opencode.jsonOpenCode CLI config
Aider.aider.conf.yml, .aiderignoreAider config + model settings
Cline.clinerules, .clineignoreCline rules (file or directory)
Roo Code.roo/rules/, .roorules, .rooignoreRoo Code rules
Continue.dev.continuerules, .continue/config.yamlContinue rules + config
Amazon Q.amazonq/rules/Amazon Q Developer rules
Augment.augment/rules/, .augment-guidelinesAugment Code rules
Replit.replit.mdReplit Agent instructions
Firebase Studio.idx/airules.mdFirebase Studio AI rules
VS Code.vscode/mcp.jsonVS Code MCP configuration
Tabnine.tabnine.yamlTabnine AI config
Sourcegraph.sourcegraph/Sourcegraph Cody config
UniversalCONVENTIONS.mdMulti-tool conventions

Plus user-level configs (~/.claude/, ~/.gemini/, ~/.codex/, ~/.continue/, ~/.aider.conf.yml, ~/.augment/, ~/.github/agents/, ~/.codeium/, ~/.opencode/, ~/.tabnine/).

MCP Servers

  • Discovers servers from .mcp.json, ~/.claude.json, .vscode/mcp.json, Claude Desktop config
  • Groups by source: project, user, VS Code, desktop
  • Live introspection: connects to each server, lists tools/resources/prompts with descriptions
  • Shows transport type (stdio/http/sse), command, args, environment variables

Custom Skills

  • Scans .claude/skills/ (project) and ~/.claude/skills/ (user)
  • Follows symlinks (installed via npx skills add)
  • Parses YAML frontmatter for name, description, triggers
  • Falls back to ## Purpose section parsing

Custom Agents

  • Scans .claude/agents/ (project) and ~/.claude/agents/ (user)
  • Parses YAML frontmatter for name, description, model
  • Detects if agent has persistent memory (via ~/.claude/agent-memory/)

Persistent Memories

  • Claude Memory: ~/.claude/projects/*/memory/MEMORY.md with preview
  • Agent Memory: ~/.claude/agent-memory/ files and directories
  • Engram: detected as MCP server or Claude Code plugin
  • OpenSpec: openspec/ directory with specs and changes count
  • ATL: .atl/ directory with file count

HTML Dashboard

The CLI generates a self-contained HTML file (no external dependencies) with:

  • Dark/light mode — auto-detects system preference
  • Summary badges — total MCPs, tools, files, skills, agents, memories at a glance
  • Collapsible sections — expand/collapse each category
  • Search — filter across all sections in real-time
  • File previews — inline preview of context file contents
  • MCP tool details — full tool listings with descriptions and input schemas
  • Tool badges — color-coded by AI tool (Claude, Cursor, Copilot, etc.)

Architecture

src/
├── index.ts              # Entry: CLI vs MCP mode routing
├── cli.ts                # CLI arg parsing + orchestration
├── server.ts             # createServer() MCP factory
├── scanner/
│   ├── types.ts          # All TypeScript interfaces
│   ├── catalog.ts        # AI_FILE_CATALOG (50+ entries, 19 tools)
│   ├── index.ts          # runAllScanners() orchestrator
│   ├── context-files.ts  # Scan context files (.md, rules, configs)
│   ├── mcp-configs.ts    # Parse .mcp.json, ~/.claude.json, etc.
│   ├── mcp-introspect.ts # Connect to MCP servers, list tools/resources
│   ├── skills.ts         # Scan skill directories + parse frontmatter
│   ├── agents.ts         # Scan agent directories + detect memory
│   └── memories.ts       # Detect engram, openspec, .atl, claude memory
├── report/
│   ├── generator.ts      # generateHtml(ScanResult) → string
│   ├── sections.ts       # HTML section renderers
│   ├── styles.ts         # CSS (dark/light mode)
│   └── scripts.ts        # JS (collapse, search, preview)
├── tools/
│   ├── scan.ts           # MCP tool: scan project
│   ├── introspect.ts     # MCP tool: introspect specific MCP
│   └── report.ts         # MCP tool: generate HTML report
└── __tests__/
    ├── fixtures/          # Test projects (full, empty, mcp-only)
    ├── helpers.ts         # fixture() path helper
    └── *.test.ts          # 7 test files, 33 tests

6 Parallel Scanners

ScannerDetectsSources
context-filesConfig files for 19 AI toolsProject + user dirs
mcp-configsMCP server definitions.mcp.json, ~/.claude.json, VS Code, Desktop
mcp-introspectLive tool/resource/prompt listingsstdio/http connections
skillsCustom Claude Code skills.claude/skills/ + symlinks
agentsCustom Claude Code agents.claude/agents/ + memory detection
memoriesPersistent memory systemsengram, openspec, .atl, claude memory

All scanners run in parallel via Promise.all() for maximum speed.

Stack

  • TypeScript 5.x — strict mode, ESM
  • @modelcontextprotocol/sdk — MCP client + server
  • Zod — schema validation for MCP tool inputs
  • tsup — build (ESM output with shebang)
  • Vitest — testing (33 tests)

Zero runtime dependencies beyond MCP SDK and Zod.

Contributing

git clone https://github.com/cocaxcode/ai-context-inspector.git
cd ai-context-inspector
npm install
npm test          # Run all tests
npm run build     # Build with tsup
npm run typecheck # TypeScript check
npm run lint      # ESLint

License

MIT © cocaxcode

Keywords

mcp

FAQs

Package last updated on 15 Mar 2026

Related posts