Linux 软件免费装
Banner图

ClearComet Cloak for MCP

开发者 clearcomet
更新时间 2026年10月31日 01:45
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

firewall mcp mcp server ai security hide rest api

下载

4.0.6 4.0.7

详情介绍:

We love MCP. Strangers see nothing. We just want your site locked when you're not around. ClearComet Cloak for MCP is a simple on/off lock for your site's AI connections, built for MCP security on WordPress. WordPress sites now have "doors" that AI tools use: the MCP Adapter's mcp routes, the Abilities API, and MCP servers added by other plugins. Anyone on the internet can find them in your site's public route list and start knocking. Cloak hides those doors, so you can hide REST API endpoints for MCP without breaking anything for yourself. Strangers get WordPress's own ordinary "not found" answer (rest_no_route, 404) and the doors disappear from the public /wp-json index. It works the moment you activate it. There are no keys to set up and nothing to configure. The people and tools you choose still get in: WordPress still checks the app password after the door, so Cloak adds a lock; it never removes one. Why this matters People are already scanning the internet for MCP servers: To be honest about it: most of these knocks are reconnaissance, not attacks. GreyNoise saw no MCP-specific exploitation attempts in its honeypots. But being listed is how a site ends up on someone's target list, and Cloak keeps your MCP doors off that list. Protected from the first click Activate the plugin and protection is on. There's no wizard and no setup notice. Strangers can't find your site's AI connections, and you still get in when you're logged in. Everyday use Settings > Cloak for MCP shows one door-slot switch and one line telling you whether you're protected. Click the slot to pause or resume. Everything else is optional and lives on the Advanced pages: doors, the guest list, a secret key for your own apps, Cloudflare, access rules, an activity log and tools (export/import). Secret key (optional) You don't need a key. It's only for your own apps or scripts that connect from changing addresses. Generate a key, or paste your own (20+ characters: letters, digits, _ and -). Apps send it in the X-Cloak-Key header. Rotate keeps the old key working for 24 hours so you can update your apps; Turn off stops it. The key page has ready-made snippets for a desktop AI assistant, curl and n8n. Cloak stores only a fingerprint of the key (a salted HMAC-SHA256), never the key itself, so a new key is shown once, right after it is made. Lost it? Make a new one. Keys are never exported and are compared in constant time. Cloudflare Cloak trusts the CF-Connecting-IP header only when the request really comes from one of Cloudflare's published ranges. X-Forwarded-For is never used. The plugin ships with Cloudflare's list (checked 2026-10-06); Refresh from Cloudflare on the Guest list page downloads the current official list from Cloudflare's public API over a checked HTTPS connection, and keeps the old list if anything looks wrong. Advanced: wp-config.php overrides These optional constants pin a setting in code. The matching field shows as locked on the settings screen. They apply once protection is on, except CLOAK_DISABLED, which always switches protection off. define( 'CLOAK_KEY', 'your-long-random-key' ); (20+ characters; works alongside a key made on the screen) define( 'CLOAK_GUESTS', array( '203.0.113.7', '198.51.100.0/24' ) ); define( 'CLOAK_MODES', array( '/acme/v1' => 'lights_out' ) ); (modes: open, unlisted, lights_out) define( 'CLOAK_DISABLED', true ); (emergency off switch) Advanced: filters for developers Privacy Cloak never phones home: no tracking, no analytics, no account, no ads. It makes no outside requests except two optional ones that only run when an administrator clicks a button: the quick check, which asks your own site for one hidden door, and Refresh from Cloudflare (see "External services" below). The activity log keeps the last 200 visits to hidden doors (time, IP address, door, result) on your site only and never records headers or keys. Deleting the plugin deletes all of its data. Disclaimer Cloak is one layer of protection, not a guarantee. Keep WordPress, your plugins and your passwords up to date. Cloak is provided as-is, without warranty of any kind, under the GPL (see license.txt).

安装:

  1. In wp-admin go to Plugins > Add New and search for "ClearComet Cloak for MCP", or go to Plugins > Add New > Upload Plugin, choose the plugin zip and click Install Now, then Activate.
  2. That's it. Protection is on. Settings > Cloak for MCP shows the switch and your status.

屏幕截图:

  • One click on the door slot pauses protection, and the status line says so.
  • Advanced (optional): the doors found on your site.
  • Advanced (optional): the guest list, where you can let in AI assistants and bots by address.
  • Advanced (optional): a secret key for your own apps.

升级注意事项:

4.0.7 New CLOAK_ / cloak_ developer names and X-Cloak-Key header. Old names keep working; nothing to change. 4.0.6 New name: ClearComet Cloak for MCP. Protection works the same. 4.0.5 New tagline and simpler wording. Your guests, keys and doors are kept. 4.0.4 Wording and readme update. No settings change. 4.0.3 New installs start with no guests. Your existing guests are kept. 4.0.2 Protection now works with no setup. Your keys and guests are kept. If your site was waiting for setup, it is now protected. 4.0.1 Small update: the optional Cloudflare list refresh now uses Cloudflare's official API. No settings change. 4.0.0 New name and key header. Your settings come with you. 3.0.0 No more hard-wired access. After upgrading, open Settings > Cloak for MCP and finish the wizard to turn protection back on.

常见问题:

What is MCP?

MCP (Model Context Protocol) is the open standard AI assistants and bots use to talk to other software. On WordPress, the MCP Adapter and the Abilities API add web addresses ("doors") that let an AI assistant read and change your site, if it has a valid login. Those doors are listed publicly by default, so anyone can see they exist and start trying them.

What do strangers see?

Exactly what they'd see if the door didn't exist: WordPress's standard rest_no_route "not found" (404) answer. The doors are also removed from the public /wp-json list and from per-namespace listings. Your pages, posts, wp-admin and the rest of the REST API are untouched.

How do I let an AI assistant or bot in?

Add the address range your AI assistant or bot publishes on Advanced > Guest list, or give it your secret key (Advanced > Secret key has ready-made snippets). An app running on your own computer can also use the key, or you can add your computer's address. It still needs its normal login (for example an application password) after the door.

What if I lock myself out?

"You, when logged in" is on by default, so your dashboard and the block editor keep working. If something still goes wrong, any one of these makes every door visible again:

  • Click the door slot on Settings > Cloak for MCP (it pauses protection).
  • Add define( 'CLOAK_DISABLED', true ); to wp-config.php. This kill switch works even if you can't reach wp-admin.
  • Deactivate the plugin, or rename its folder over FTP.

Does it phone home or collect data?

No. There is no tracking, telemetry, account or license check. The only outside request is the optional, manual Cloudflare list refresh described under "External services". The activity log stays in your own database, never records headers or keys, and is deleted with the plugin.

I use Cloudflare

That works out of the box. Cloak reads the visitor's real address from CF-Connecting-IP only when the request arrives from Cloudflare's own ranges, so nobody can fake it. If you use a different proxy or load balancer, use the secret key for your apps rather than address-based helpers.

Why can't I see my key again?

Cloak stores only a salted fingerprint of a key made on the settings screen, so even someone who can read your database can't use it. That's why a key is shown once, right after it is made. If you lose it, make a new one (or Rotate under Advanced, which keeps the old key working for 24 hours).

How private is my key?

  • A key made on the settings screen is stored only as a salted HMAC-SHA256 fingerprint and shown once, when it is made.
  • Rotate makes a new key and keeps the old one working for 24 hours, so you can update your apps. If a key leaks, rotate it (or turn it off).
  • The activity log never records the key or any request headers.
  • A key set with CLOAK_KEY in wp-config.php is plain text in that file. Protect that file as you would your database password.
  • Cloak doesn't force HTTPS. A key sent over plain HTTP can be read on the way, so use HTTPS on your site.
Think of Cloak as a curtain in front of MCP, not the lock. It doesn't replace WordPress login: the MCP endpoint still needs WordPress credentials (for example an application password) after Cloak lets a request through. And an application password alone doesn't get past Cloak; the request also needs the key, a guest address, or a logged-in browser session.

Does this work with the WordPress MCP Adapter?

Yes. Cloak hides the MCP Adapter's mcp routes and the Abilities API routes, plus MCP servers added by other plugins. The adapter itself keeps working for you and for the AI assistants and bots you allow.

Will my AI assistant still connect?

Yes, if you let it in. You stay in when logged in. Other AI assistants and bots get in with your secret key in the X-Cloak-Key header, or by IP address or range on Advanced > Guest list. They still need their normal WordPress login after that.

How do I hide /wp-json routes from strangers?

Activate Cloak. Strangers asking for a hidden route get WordPress's normal rest_no_route 404, and the hidden routes are removed from the public /wp-json index. The rest of the REST API is untouched.

Does it replace app passwords?

No. App passwords (or any other authentication) are still checked after the door. Cloak adds a lock; it never removes one.

更新日志:

4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 3.0.0 2.0.0