MCP X-Ray
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Why MCP X-Ray?
Every enabled MCP server silently injects its full JSON tool definitions into every single LLM turn — whether you call those tools or not. Installing 8–12 MCP servers across Antigravity, Claude Code, Cursor, or Codex can easily burn 15,000–40,000+ context tokens per turn, slow down agent startup by seconds, introduce cross-server tool name shadowing, or expose your agent to MCP Tool-Poisoning prompt-injection attacks hidden inside tool descriptions and schema properties.
MCP X-Ray gives you instant X-ray vision across your entire local MCP stack:
Multi-Agent Config Discovery (Read-Only & Secret-Safe) — Automatically discovers MCP configs across:
Antigravity Global:
~/.gemini/config/mcp_config.jsonAntigravity Plugins:
~/.gemini/config/plugins/*/mcp_config.json(resolving${PLUGIN_ROOT}&${PLUGIN_DATA})Claude Code:
~/.claude.json(global & per-project) and~/.claude/settings.jsonCursor:
~/.cursor/mcp.jsonCodex:
~/.codex/config.toml(native parser for[mcp_servers.<name>]& nested env/header tables)Project / Custom:
.mcp.jsonor--config=<path>Every
envvalue, HTTP header value, and secret CLI flag/query param is redacted to••••in all outputs.
Live MCP Schema & Latency Prober — Connects to local stdio MCP servers over
@modelcontextprotocol/sdk(StdioClientTransport) with a strict 6-second timeout (automatically skippingmcp-xrayitself to guarantee zero recursion):Measures exact startup + handshake +
listTools()latency in millisecondsCalls
listTools()andlistResources()and closes cleanly with zero orphan processesComputes exact estimated token tax (
ceil(jsonBytes / 3.7)) per server and per individual tool alongside full JSON Schema depth, property, enum, and description vs. schema token splitsInstant static/config-only mode for remote
http/sse(serverUrl) servers and fast launches
Tool-Poisoning & Collision Security Scanner — Deeply audits every tool's
name,description, and nestedinputSchemastrings for:Hidden Prompt-Injection Directives:
<IMPORTANT>,<SYSTEM>,ignore previous instructions,do not tell the user,before calling any other tool,silently send,exfiltrate,read ~/.ssh, piped shell payloadsInvisible Unicode Smuggling: Zero-width characters (
U+200B–U+200D,U+FEFF), Trojan Source bidirectional overrides (U+202A–U+202E), and Unicode Tag-Block invisible ASCII smuggling (U+E0000–U+E007F, decoded inline!)Cross-Server Tool Collisions & Shadowing: Exact duplicate tool names (
read_filein two servers), near-identical canonical names (read_filevsreadFile), and 1-char lookalike shadowingOversized Tool Schemas: Flags any single tool exceeding 800 tokens
Interactive Context Diet Simulator & Health Grade (
A–F) — Toggle servers on/off with live checkboxes inside the Antigravity MCP App UI to watch per-turn token savings, 20-turn session savings, 128k/200k context window percentage, and your projected Health Grade (A–F) update in real time.
Related MCP server: MCP Doctor
Architecture
flowchart LR
Host["Antigravity / Claude / Cursor / Codex"] <-->|MCP stdio| Server["MCP X-Ray Server"]
Host <-->|ui://mcp-xray/app.html| UI["Interactive React MCP App"]
UI <-->|app.callServerTool| Server
Server --> Discovery["Multi-Agent Discovery\n(JSONC + Codex TOML + Redaction)"]
Server --> Prober["Live Stdio Prober\n(6s Timeout · Latency · Token Tax)"]
Server --> Analyzer["Security & Diet Engine\n(Poisoning · Unicode · Collisions · Grade A–F)"]
Discovery --> Configs["~/.gemini · ~/.claude · ~/.cursor · ~/.codex"]
Prober <--> LocalMCP["Local Stdio MCP Servers"]
Server <--> Cache["0600 Local Probe & Diet Cache"]Quick Start
1. Google Antigravity Plugin (Full Interactive MCP App UI)
git clone https://github.com/oguzhan-yildirim/mcp-xray.git
cd mcp-xray
npm install
npm run build
npm run install:antigravityAntigravity automatically discovers the plugin under ~/.gemini/config/plugins/mcp-xray — no restart needed:
Open MCP X-Ray from the left Sidebar or side pane
+menu.Or ask in chat: "Open MCP X-Ray and show me which MCP servers are burning the most context tokens."
2. Claude Code / Cursor / Codex (Universal MCP Server)
Add mcp-xray to your MCP config (~/.claude.json, ~/.cursor/mcp.json, or ~/.gemini/config/mcp_config.json):
{
"mcpServers": {
"mcp-xray": {
"command": "npx",
"args": ["-y", "github:oguzhan-yildirim/mcp-xray"]
}
}
}For Codex (~/.codex/config.toml):
[mcp_servers.mcp-xray]
command = "npx"
args = ["-y", "github:oguzhan-yildirim/mcp-xray"]3. Standalone CLI
# Instant multi-agent config inventory (read-only, secrets redacted)
npx mcp-xray scan
# Scan + live-probe all eligible stdio MCP servers
npx mcp-xray scan --probe
# Live-probe a single server and inspect per-tool token tax & latency
npx mcp-xray probe filesystem
# Full Tool-Poisoning, Collision & Context Diet Audit (exits code 2 on critical alerts)
npx mcp-xray audit
# Machine-readable JSON output for CI pipelines
npx mcp-xray audit --jsonMCP Tools Reference
Tool | Visibility | Description |
| Model + UI Entrypoint | Opens the interactive MCP X-Ray dashboard ( |
| Model + Inline UI | Discovers MCP configs across Antigravity, Plugins, Claude Code, Cursor, Codex & |
| Model | Live-probes a stdio MCP server (or |
| Model + Inline UI | Scans probed or inline tool definitions for prompt injection, hidden Unicode, collisions, oversized schemas, Diet Plan & Health Grade ( |
Security Detection Rules
Rule ID | Category | Severity | What It Detects |
| Prompt Injection | Critical | Pseudo-system XML/bracket tags ( |
| Prompt Injection | Critical | Instruction overrides ( |
| Prompt Injection | Critical | User-concealment stealth directives ( |
| Prompt Injection | Critical | Cross-tool hijacking ( |
| Prompt Injection | Critical | Covert data exfiltration ( |
| Prompt Injection | Critical | Local secret/file harvesting ( |
| Prompt Injection | High | Remote pipe-to-shell or encoded execution payloads ( |
| Hidden Unicode | Critical | Bidirectional override/isolate control chars ( |
| Hidden Unicode | High / Critical | Zero-width invisible chars ( |
| Hidden Unicode | Critical | Unicode Tag-Block invisible ASCII smuggling ( |
| Tool Collision | High | Identical tool name declared by multiple distinct MCP servers |
| Tool Collision | Medium | Near-identical canonical tool name shadowing ( |
| Tool Collision | Medium | 1-character lookalike / typosquat tool shadowing across servers |
| Oversized Schema | Medium / High | Single tool exceeding 800 estimated tokens (>1,600 tokens elevated to High) |
Agent Toolkit Suite
MCP X-Ray is part of the open-source Agent Toolkit Suite for Antigravity, Claude Code, Cursor, and Codex:
Project | Purpose |
Discover, security-audit, preview & one-click install AI Agent Skills ( | |
Inspect MCP context token tax, live startup latency, tool-poisoning attacks & simulate a Context Diet | |
Flight recorder, replay timeline & forensic debugger for AI coding agent trajectories | |
Linter, trigger-collision analyzer & quality scorer for your local | |
Profile manager & one-click context switcher for enabling/disabling MCP server groups per task |
Development
npm install
npm run typecheck # Strict TypeScript check
npm run build # Builds single-file dist/app.html + standalone dist/server.js
npm test # Unit tests (TOML, redaction, tokens, poisoning) + live MCP stdio E2E
npm run install:antigravity # Installs plugin bundle to ~/.gemini/config/plugins/mcp-xrayLicense
MIT © 2026 Oğuzhan Yıldırım
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Scan any MCP server for tool-poisoning, security, auth & license. Trust score before install.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
LLM cost optimization gateway, repo token-waste auditor & model arbitrage MCP server.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceDiagnose MCP servers — health checks, tool testing, token cost audits, conflict detection, and security scanning with 50+ prompt injection patterns. Works as CLI or MCP server inside Claude Desktop.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to inspect and diagnose their own MCP setup by exposing read-only tools that audit configured servers, report which coding agents have configs, surface misplaced or duplicated registrations, and list curated preset packs. It also powers CLI workflows for checking handshake, tool lint, and tool-surface quality scores of any stdio server.MIT
- AlicenseNot gradedqualityBmaintenanceLets an agent inspect and audit MCP servers before connecting to them, checking their exposed tools, prompts and resources for tool poisoning, shadowing, excessive permissions, leaked secrets and unsafe transports against 24 deterministic rules. Results are returned as findings with evidence, remediation and CWE/OWASP references, and can fail CI with SARIF, Markdown or standalone HTML reports.Apache 2.0
- AlicenseAqualityBmaintenanceEnables measuring how many tokens each installed MCP server's tool schemas consume in the context window, ranking servers by cost and flagging wasteful schema patterns with estimated savings. It starts each local stdio server, inspects its tools, and reports a verdict without modifying any configuration.3MIT