| 开发者 |
blincks
engrmzh |
|---|---|
| 更新时间 | 2026年10月24日 03:53 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
<documents> layout recommended for long-context models) or plain textsv_list_items — list plugins, themes and mu-pluginssv_get_item_summary — metadata, file counts and token estimatesv_get_file_tree — the complete file treesv_read_file — read any source file (or a line range), secrets redactedsv_search_code — grep across one or all plugins/themessv_build_context_pack — a ready-made context pack sized to the agent's budgetsv_get_hooks_map and sv_check_integritywp structure-viewer mcp --user=admin.
Standards-based: MCP Streamable HTTP transport (protocol 2024-11-05 → 2025-11-25), JSON-RPC 2.0, Origin validation, per-user revocable tokens (or WordPress Application Passwords). Every tool is read-only, requires an administrator and can be switched off in one click. On WordPress 6.9+ the same tools are also registered with the core Abilities API.
🔍 Code Search (new in 2.3)
.env-style assignments and passwords in connection strings. Always on for AI output by default; optional for the file viewer and downloads.
💻 WP-CLI
wp structure-viewer pack plugin woocommerce --ext=php --max-tokens=150000 --output=wc.md
wp structure-viewer search plugin all "base64_decode\s*\(" --regex
wp structure-viewer export plugin <folder-name> --format=json
wp structure-viewer list plugins
wp structure-viewer mcp --user=admin (local stdio MCP server)
Pro: wp structure-viewer hooks plugin <slug> and wp structure-viewer integrity
—
🚀 Structure Viewer Pro
🪝 Hooks Map (new) — static analysis of every PHP file (nothing is executed): actions and filters hooked (with callback and priority), every do_action / apply_filters fired, AJAX handlers, REST routes, shortcodes, post types, taxonomies, blocks, cron events, admin pages, settings, WP-CLI commands, enqueued assets, classes and functions — each linked to its file and line. Export as Markdown or JSON, add it to Context Packs, or let AI agents call it.
🛡️ Integrity Check (new) — verify WordPress core and every WordPress.org plugin against the official checksums. Find modified, missing and suspicious (unexpected executable) files, and see a line-by-line diff against the original release. Ideal after a hack, before a site handover, or when someone "just edited the plugin".
💾 Context Pack presets & compression (new) — save file selections, task prompts and options as reusable presets, strip comments and blank lines to save 20–40% tokens, and include the Hooks Map in any pack.
🔀 Comparator — colour-coded line-by-line diff between two plugin/theme ZIPs, an installed item and a ZIP, or two files. Handles large and minified files.
📦 FlatPack — extract only the PHP, CSS, JS, images or custom extensions from any ZIP into one flat, collision-safe download.
Upgrade from Structure Viewer → Pro Tools → Upgrade to Pro.
—
🔒 Security & Privacy
manage_options capability (administrators) required for every screen, AJAX call and AI abilityrealpath() checksA single document that contains everything an AI needs to understand a plugin or theme: its name, version and requirements, a file tree, and the full source of the relevant files — with secrets redacted. Paste it into ChatGPT, Claude, Gemini or any other assistant, or attach the downloaded file, then ask your question.
All of them. Context Packs are plain Markdown, XML or text, so they work with any chat assistant or IDE. AI agents that speak MCP (Claude Desktop, Claude Code, Cursor, VS Code with Copilot, Windsurf and many others) connect directly to Structure Viewer's built-in MCP server.
Open Tools → Structure Viewer → AI Agents, click Create token, choose your client and copy the generated configuration. Click Run self-test to confirm everything works. No other plugin is needed.
Every Structure Viewer ability is read-only and requires an authenticated administrator (via Application Password). Secrets are redacted before content is returned, and you can turn agent access off at any time under Settings → AI & Agents.
No. Structure Viewer ships its own MCP server, so it works on its own on WordPress 5.8 and newer. If your site runs WordPress 6.9+, the same tools are additionally registered with the core Abilities API for any other Abilities-aware tooling.
Each administrator can create a personal connection token (shown once, stored only as a hash, revocable any time). The token only works on the Structure Viewer MCP endpoint, every tool is read-only, secrets are redacted, and browser requests from other origins are rejected. Use HTTPS on live sites. WordPress Application Passwords are accepted as well.
The Explorer sidebar shows an estimate for every plugin and theme, and the Context Pack builder shows a live estimate for your selection against the context window you choose.
API keys and tokens from AWS, Stripe, GitHub, Google, Slack, OpenAI, Anthropic, SendGrid and Mailchimp, JWTs, PEM private keys, wp-config credentials, credential-looking constants, .env-style assignments, passwords in connection strings and generic password = "…" style assignments.
Yes — Code Search looks inside every file, with regex, case and whole-word options, extension filters and clickable line results. You can search one plugin or theme, or all of them at once.
No. Structure Viewer is a read-only code explorer for developers and AI workflows. It cannot edit, upload or delete files, which makes it safe to use on live sites.
Yes. It is read-only, admin-only and loads nothing on your frontend.
No. Everything works from the WordPress admin.
Yes. Everything that works for plugins works for themes, and the mu-plugins folder appears automatically when your site has one.
Yes: pack, search, mcp, export and list are free; hooks and integrity come with Pro. Run wp help structure-viewer for all options.
Hooks Map, Integrity Check, Context Pack presets and compression, Comparator and FlatPack. The free version includes the Explorer, file viewer, AI Context Packs, Code Search, AI agent tools, exports, WP-CLI and secret redaction.
It downloads the official checksums for the exact version of each WordPress.org plugin (and for WordPress core) and compares them with the files on your server. Premium and custom plugins can't be verified because WordPress.org has no checksums for them; they are listed as "not on WordPress.org".
Settings are stored in the structureviewer_settings option. A few per-user preferences (dismissed notices, Pro presets) are stored as user meta. No personal data is collected or sent anywhere.
It is designed for single sites and works on individual subsites, but network-level administration is not officially supported.
A review on WordPress.org helps a lot, and you can buy us a coffee at buymeacoffee.com/blincks.
wp structure-viewer mcp stdio), no other plugin required. Six read-only tools (eight with Pro), MCP prompts, per-user connection tokens, generated configs for Claude Code, Claude Desktop, Cursor, VS Code, Windsurf and cURL, plus a live self-test. On WordPress 6.9+ the tools are also registered with the core Abilities API.pack and search (and Pro hooks and integrity)..env-style assignments and passwords in connection strings.public exposure flag introduced in 7.1.