ai-context-inspector
Scans projects to discover all AI configuration files, MCP servers, agents, and memories across 19 tools, enabling export and import of the entire AI ecosystem.
README
<p align="center"> <h1 align="center">@cocaxcode/ai-context-inspector</h1> <p align="center"> <strong>One command. Every AI config in your project. Instantly.</strong><br/> CLI + MCP server · 19 tools detected · Export/Import across 7 targets </p> </p>
<p align="center"> <a href="https://www.npmjs.com/package/@cocaxcode/ai-context-inspector"><img src="https://img.shields.io/npm/v/@cocaxcode/ai-context-inspector.svg?style=flat-square&color=cb3837" alt="npm version" /></a> <a href="https://www.npmjs.com/package/@cocaxcode/ai-context-inspector"><img src="https://img.shields.io/npm/dm/@cocaxcode/ai-context-inspector.svg?style=flat-square" alt="npm downloads" /></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="License" /></a> <img src="https://img.shields.io/badge/node-%3E%3D20-339933?style=flat-square&logo=node.js&logoColor=white" alt="Node" /> <img src="https://img.shields.io/badge/AI%20tools-19%20supported-blueviolet?style=flat-square" alt="19 AI tools" /> </p>
<p align="center"> <a href="#quick-start">Quick Start</a> · <a href="#mcp-server-setup">MCP Server</a> · <a href="#what-it-detects">What It Detects</a> · <a href="#features">Features</a> · <a href="#mcp-tool-reference">Tool Reference</a> · <a href="#architecture">Architecture</a> </p>
The most comprehensive AI ecosystem scanner available. AI Context Inspector discovers every AI configuration file, MCP server, custom skill, agent, and persistent memory in your project — across 19 tools — and gives you the full picture in seconds. Export your entire AI setup and import it into any of 7 supported tools (Claude, Cursor, Windsurf, Copilot, Gemini, Codex, OpenCode) with automatic secret redaction. Zero config. Zero runtime dependencies beyond MCP SDK and Zod. Everything runs locally — your configs and credentials never leave your machine.
Quick Start
npx -y @cocaxcode/ai-context-inspector@latest
That's it. An HTML dashboard opens with everything your AI tools know about your project.
# Scan a specific directory
npx -y @cocaxcode/ai-context-inspector@latest --dir /path/to/project
# Include user-level configs (~/.claude, ~/.gemini, etc.)
npx -y @cocaxcode/ai-context-inspector@latest --user
# Live-connect to each MCP server and list its tools
npx -y @cocaxcode/ai-context-inspector@latest --introspect
# Output raw JSON instead of HTML
npx -y @cocaxcode/ai-context-inspector@latest --json
<details> <summary>All CLI flags</summary>
| Flag | Description | Default |
|---|---|---|
--dir <path> |
Directory to scan | . (current) |
--user |
Include user-level configs (~/) |
false |
--introspect |
Connect to MCP servers and list tools | false |
--timeout <ms> |
Introspection timeout per server | 10000 |
--json |
Output JSON instead of HTML | false |
--mcp |
Run as MCP server (stdio transport) | false |
</details>
MCP Server Setup
Run as an MCP server so your AI tools can inspect their own ecosystem.
Claude Code
claude mcp add --scope user ai-context-inspector -- npx -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"]
}
}
}
<details> <summary>Cursor / Windsurf / VS Code / Codex CLI</summary>
Cursor / Windsurf — add to .cursor/mcp.json or equivalent:
{
"mcpServers": {
"ai-context-inspector": {
"command": "npx",
"args": ["-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"]
}
}
}
Codex CLI:
codex mcp add ai-context-inspector -- npx -y @cocaxcode/ai-context-inspector@latest --mcp
</details>
Or add directly to any .mcp.json:
{
"mcpServers": {
"ai-context-inspector": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cocaxcode/ai-context-inspector@latest", "--mcp"]
}
}
}
What It Detects
| Tool | Context Files | What's Found |
|---|---|---|
| Claude Code | CLAUDE.md, .claude/, .mcp.json |
Instructions, MCP config, skills, agents, memory |
| Cursor | .cursorrules, .cursor/rules/, .cursorignore |
Rules, ignore patterns |
| Windsurf | .windsurfrules, .windsurf/rules/ |
Codeium/Windsurf rules |
| GitHub Copilot | .github/copilot-instructions.md, .github/agents/ |
Instructions, custom agents |
| Gemini CLI | GEMINI.md, .gemini/, .geminiignore |
Config, rules |
| OpenAI Codex | AGENTS.md, AGENT.md, .codex/ |
Agent instructions |
| OpenCode | OPENCODE.md, .opencode/, opencode.json |
CLI config |
| Aider | .aider.conf.yml, .aiderignore |
Config, model settings |
| Cline | .clinerules, .clineignore |
Rules (file or directory) |
| Roo Code | .roo/rules/, .roorules, .rooignore |
Rules |
| Continue.dev | .continuerules, .continue/config.yaml |
Rules, config |
| Amazon Q | .amazonq/rules/ |
Developer rules |
| Augment | .augment/rules/, .augment-guidelines |
Code rules |
| Replit | .replit.md |
Agent instructions |
| Firebase Studio | .idx/airules.md |
AI rules |
| VS Code | .vscode/mcp.json |
MCP configuration |
| Tabnine | .tabnine.yaml |
AI config |
| Sourcegraph | .sourcegraph/ |
Cody config |
| Universal | CONVENTIONS.md |
Multi-tool conventions |
Tip: Pass
--userto also scan user-level configs:~/.claude/,~/.gemini/,~/.codex/,~/.continue/,~/.aider.conf.yml,~/.augment/,~/.github/agents/,~/.codeium/,~/.opencode/,~/.tabnine/.
Beyond context files, the scanner also detects:
- MCP servers from
.mcp.json,~/.claude.json,.vscode/mcp.json, Claude Desktop config — with optional live introspection - Custom skills in
.claude/skills/(including symlinks fromnpx skills add) - Custom agents in
.claude/agents/with memory detection - Persistent memories — Claude Memory, agent memory, engram, OpenSpec, ATL
Features
Scan
npx -y @cocaxcode/ai-context-inspector@latest
npx -y @cocaxcode/ai-context-inspector@latest --user --introspect
Generates a self-contained HTML dashboard with dark/light mode, search, collapsible sections, file previews, and color-coded tool badges. Pass --json for raw output.
Export
# Export your AI ecosystem to .aci/bundle.json
npx -y @cocaxcode/ai-context-inspector@latest export
# Export only MCP and context configs, redact secrets
npx -y @cocaxcode/ai-context-inspector@latest export --only mcp,context --secrets none
<details> <summary>Export flags</summary>
| Flag | Description | Default |
|---|---|---|
--dir <path> |
Directory to export | . |
--output <path> |
Output directory | .aci/ |
--include-user |
Include user-level configs | false |
--only <categories> |
Filter: mcp,skills,agents,memories,context |
all |
--secrets <mode> |
none (redact) or all (include) |
interactive |
</details>
Import
# Import into a Cursor project
npx -y @cocaxcode/ai-context-inspector@latest import --target cursor
# Auto-detect tool, skip confirmation, overwrite existing
npx -y @cocaxcode/ai-context-inspector@latest import --yes --force
<details> <summary>Import flags</summary>
| Flag | Description | Default |
|---|---|---|
[file] |
Path to bundle JSON | auto-detect .aci/bundle.json |
--dir <path> |
Target directory | . |
--target <tool> |
Target tool (see table) | auto-detect |
--scope <scope> |
project or user |
per-resource |
--force |
Overwrite existing resources | false |
--yes |
Skip confirmation prompt | false |
--only <categories> |
Filter: mcp,skills,agents,memories,context |
all |
--secrets <mode> |
none or all |
interactive |
</details>
Supported Import Targets
| Target | MCP Config | Context File | Rules Dir | Skills | Agents |
|---|---|---|---|---|---|
claude |
.mcp.json |
CLAUDE.md |
-- | .claude/skills/ |
.claude/agents/ |
cursor |
.cursor/mcp.json |
.cursorrules |
.cursor/rules/ |
-- | -- |
windsurf |
.mcp.json |
.windsurfrules |
.windsurf/rules/ |
-- | -- |
copilot |
.vscode/mcp.json |
.github/copilot-instructions.md |
.github/instructions/ |
-- | .github/agents/ |
gemini |
.gemini/settings.json |
GEMINI.md |
.gemini/rules/ |
-- | -- |
codex |
.mcp.json |
AGENTS.md |
.codex/rules/ |
-- | -- |
opencode |
opencode.json |
OPENCODE.md |
.opencode/rules/ |
-- | -- |
Note: Secrets handling has three modes: none (redact all — safe for sharing), all (include as-is), or interactive (prompt per variable, CLI default). Environment variables in MCP configs are detected automatically.
MCP Tool Reference
When running as an MCP server (--mcp), five tools are exposed:
scan
Discover the complete AI ecosystem in a project directory.
| Parameter | Type | Required | Description |
|---|---|---|---|
directory |
string | No | Path to scan (default: cwd) |
include_user |
boolean | No | Include user-level configs |
introspect |
boolean | No | Live-connect to MCP servers |
timeout |
number | No | Introspection timeout (ms) |
introspect_mcp
Connect to a specific MCP server and list its tools, resources, and prompts.
| Parameter | Type | Required | Description |
|---|---|---|---|
command |
string | Yes* | Command to launch the server |
args |
string[] | No | Arguments for the command |
env |
object | No | Environment variables |
url |
string | Yes* | URL for HTTP/SSE servers |
transport |
string | No | stdio (default) or http |
timeout |
number | No | Connection timeout (ms) |
*Either command (stdio) or url (http) is required.
generate_report
Generate a standalone HTML dashboard from scan results.
| Parameter | Type | Required | Description |
|---|---|---|---|
directory |
string | No | Path to scan |
include_user |
boolean | No | Include user-level configs |
introspect |
boolean | No | Introspect MCP servers |
timeout |
number | No | Introspection timeout (ms) |
export_ecosystem
Export the complete AI ecosystem to a portable .aci/bundle.json.
| Parameter | Type | Required | Description |
|---|---|---|---|
dir |
string | No | Directory to scan (default: cwd) |
include_user |
boolean | No | Include user-level configs |
only |
string[] | No | Categories: mcp, skills, agents, memories, context |
secrets |
string | No | "none" (default), "all", or ["VAR1", "VAR2"] |
import_ecosystem
Import a bundle into a project, adapting configuration to the target tool.
| Parameter | Type | Required | Description |
|---|---|---|---|
file |
string | No | Path to bundle (auto-detects .aci/bundle.json) |
dir |
string | No | Target directory (default: cwd) |
target |
string | No | Target tool (auto-detects): claude, cursor, windsurf, copilot, gemini, codex, opencode |
scope |
string | No | project or user |
force |
boolean | No | Overwrite existing resources |
confirm |
boolean | No | Execute import (default: false = dry-run) |
only |
string[] | No | Categories to import |
secrets |
string | No | "none", "all", ["VAR1"], or {"VAR1": "value"} |
Warning:
import_ecosystemdefaults to dry-run mode (confirm: false). Setconfirm: trueto actually write files.
Architecture
src/
├── index.ts # Entry: CLI vs MCP mode routing
├── cli.ts # CLI arg parsing + orchestration
├── server.ts # createServer() MCP factory
├── scanner/ # 6 parallel scanners (Promise.all)
│ ├── catalog.ts # AI_FILE_CATALOG — 50+ entries, 19 tools
│ ├── context-files.ts # Scan .md, rules, configs
│ ├── mcp-configs.ts # Parse .mcp.json, ~/.claude.json, etc.
│ ├── mcp-introspect.ts # Connect to servers, list tools/resources
│ ├── skills.ts # Skills + symlinks + frontmatter
│ ├── agents.ts # Agents + memory detection
│ └── memories.ts # engram, openspec, .atl, claude memory
├── ecosystem/ # Export/import engine
│ ├── export.ts # Scan → bundle → .aci/bundle.json
│ ├── import.ts # Load → plan → execute
│ ├── target-map.ts # Path configs for 7 AI tools
│ ├── detect-target.ts # Auto-detect tool in project
│ └── secrets.ts # Env var detection + redaction
├── report/ # HTML dashboard generator
│ ├── generator.ts # generateHtml(ScanResult) → string
│ ├── sections.ts # Section renderers
│ ├── styles.ts # CSS (dark/light)
│ └── scripts.ts # JS (collapse, search, preview)
└── tools/ # 5 MCP tool handlers
├── scan.ts
├── introspect.ts
├── report.ts
├── export.ts
└── import.ts
Stack: TypeScript 5 (strict, ESM) / MCP SDK / Zod / tsup / Vitest
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。