Linux 软件免费装
Banner图

AI Agents & Chat for Amazon Bedrock – MCP Server, Claude, AWS

开发者 glay
glayguo
更新时间 2026年9月15日 00:28
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

chatbot claude mcp amazon bedrock mcp-server

下载

1.0.5 1.3.0 1.0.7 1.8.0 1.4.0 1.7.0 1.9.0 1.1.0 1.5.0 1.9.1 1.15.1 1.2.0 1.6.0 1.14.1 1.15.2 1.14.0 1.15.0 1.21.0 1.18.0 1.18.1 1.25.1 1.11.0 1.17.0 1.10.0 1.12.0 1.13.0 1.16.0 1.19.0 1.20.0 1.22.0 1.23.0 1.24.0 1.25.0 1.26.0 1.27.0 1.28.0 1.29.0 1.30.0 1.30.1 1.31.0

详情介绍:

Connect WordPress directly to Amazon Bedrock using your own AWS account. Add a configurable AI chat powered by Claude, Amazon Nova or Titan, Meta Llama, Mistral, or DeepSeek model formats, then let authenticated conversations use governed tools through the Model Context Protocol (MCP). The plugin is built for site owners, developers and teams already using AWS who want predictable requests and security-focused defaults. Model requests go from your WordPress server to the configured Amazon Bedrock endpoint; the plugin author does not operate an AI relay service. What you can build Highlights Streaming and credentials Streaming is on by default. Each visitor message sends one authenticated POST request to a plugin REST route, and Bedrock response events are relayed to the browser with Server-Sent Events. Conversation content never appears in a URL, and one visitor message still results in exactly one Bedrock invocation. Streaming needs the PHP cURL extension; when it is unavailable, disabled or interrupted, the chat falls back to a single buffered request so answers are still delivered. Credentials are resolved in this order: wp-config.php constants, encrypted WordPress settings, environment variables, an ECS or EKS task role, then an EC2 instance role using IMDSv2. The last three let a site on AWS run with no long-lived keys in WordPress at all. Role credentials are cached encrypted and refreshed before expiry, role lookups can be disabled with the ai_chat_bedrock_use_role_credentials filter, and the active source is shown in the settings without revealing secrets. Security and cost defaults The dashboard shows requests and tokens for the last seven days, broken down by the model that actually answered, so a fallback or a profile using a different model is visible. Counters are kept for 30 days and contain no prompts, responses or identities. Request limiting reduces accidental usage but is not a billing guarantee. Token counts are what Bedrock reported, not a price estimate: review Amazon Bedrock pricing and configure AWS Budgets before opening chat to public traffic. Tool use and visible agent steps An authenticated conversation can discover and call tools from an administrator-configured MCP server. Tool calls execute on the WordPress server and their results go back to Bedrock for the final answer, always framed as untrusted data. Tool use is governed by a policy layer: While the agent works, the chat names the tools it is running. The finished answer carries a collapsible list of every call, its round and whether it succeeded, showing metadata only. If the round limit is reached, the answer says so instead of quietly stopping. WP-CLI wp ai-chat-bedrock index builds the semantic index without keeping a browser tab open, with --batch, --max and --force. index-status reports coverage, diagnose runs the same checks as the admin screen with an optional --live Bedrock request, and usage prints requests and tokens per day or per model. Useful in a deploy step or a cron job. Managed prompts Point the chat at a prompt in Amazon Bedrock Prompt Management and its text replaces the local system prompt, so one prompt can be reviewed and versioned in AWS and reused by every site. Pin a version for stability or follow the draft to pick up edits. {{site_name}}, {{site_description}}, {{site_url}} and {{current_date}} are filled in; anything else is sent exactly as written. The prompt must live in the same region as the chat, the text is cached briefly, and if it cannot be read the local system prompt is used instead rather than sending an empty one. Semantic search Keyword search only finds passages that share words with the question, so "when will my parcel arrive" misses a page titled "Getting parcels to you". Choose an embedding model and the plugin indexes published content, then matches questions by meaning. Indexing runs in small batches from the settings screen, or unattended through WP-Cron, or with wp ai-chat-bedrock index on a large site. Editing a post marks it for re-indexing, and keyword search still runs when nothing relevant is found. Questions your site does not cover return no context rather than an unrelated passage. Fallback model Model access is the most common reason a Bedrock chat stops answering: a model is not enabled, a request is throttled, or the service is briefly unreachable. Choose a fallback model and those requests are retried once on it, and the reply states which model answered. An identifier Bedrock does not recognize is treated the same way. Requests rejected for any other reason, including an invalid payload, missing credentials or the daily limit, are never retried. A stream is retried only before anything reaches the browser, so text is never duplicated. Chat experience The chat is a self-contained, responsive interface with message bubbles, a typing indicator, a live streaming caret, tool activity status and per-answer token counts. Answers can be copied, failed requests can be retried, and every message carries a timestamp. It follows dark-mode and reduced-motion preferences and keeps focus styles and screen-reader labels intact. Add up to four suggested questions and they appear as buttons above the input, disappear once the conversation starts and return when the chat is cleared. When the conversation log is enabled, each answer also gets a discreet Was this helpful? control; only the rating is stored, never anything about the visitor. Floating chat Any chat can render as a floating button instead of an inline panel: [ai_chat_bedrock mode="popup" launcher="Ask us" profile="support"] A site-wide floating chat can be enabled in the settings with its own profile. Pages that already contain the chat block or shortcode are left unchanged, so the chat is never duplicated. The launcher is keyboard accessible, closes with Escape, stays open while a visitor browses other pages in the same tab, and adapts to small screens. Multiple chats with profiles One installation can serve several chats. Each profile has its own key and can override the model, system prompt, title, welcome message, suggested questions, token limit, temperature, request limit, guest access, grounding and passage count. Anything left empty inherits the main settings. [ai_chat_bedrock profile="support"] Profile keys arriving from a page, block or chat request are validated against the stored profiles, so an unknown or crafted key falls back to the main settings and can never unlock guest access. Requests are rate limited per profile, and up to ten profiles can be stored. Content tools All content tools are optional, require the capability to edit the item, and are rate limited. Use Bedrock through WordPress's own AI API On WordPress 7.0 and later, Bedrock is registered with core's AI Client, so wp_ai_client_prompt() reaches it from any plugin that knows nothing about AWS. Those calls use this plugin's request path, so the guardrail, model, region, token ceiling, daily limit and usage accounting configured here apply to them. On 7.1 it also joins the connector registry, declared as storing no credential: Bedrock signs with IAM, not a key this site must keep. The Settings > Connectors screen lists only connectors with a credential to manage, so Bedrock is absent there. Connect AI clients to this site The plugin exposes this WordPress site as an MCP server, so clients such as Claude Code, Cursor, VS Code or an agent framework can read it. Clients can also connect with OAuth 2.1 instead of copying tokens: paste the endpoint, sign in to WordPress and approve, and no WordPress password reaches the client. Discovery uses /.well-known/oauth-authorization-server and /.well-known/oauth-protected-resource, client registration is dynamic, PKCE with S256 is mandatory, redirect targets must be HTTPS or loopback, authorization codes are single use, access tokens last an hour, and refresh tokens rotate so reusing one revokes the connection. Tokens are stored only as hashes. Each connection inherits the approving account's permissions and can be revoked at any time. Anonymous access and OAuth are both disabled by default. If the endpoint returns 404, open Settings > Permalinks and save once so WordPress registers pretty REST routes. Connecting an MCP server or Amazon Bedrock AgentCore Gateway External servers are called with JSON-RPC over Streamable HTTP with a declared protocol version. Three authentication modes are available: Endpoints must be public HTTPS URLs. Private, loopback, link-local and credential-bearing URLs are rejected, redirects are disabled and response size is capped. Discovered tools remain subject to the tool policy above. Site content abilities An optional set of narrow abilities can be registered for agents and other plugins: search published posts and pages, read one published post or page, suggest an SEO title and meta description without saving, look up published WooCommerce products, and create a draft post. Reads never return draft, private or password-protected content. The only write operation creates a new draft: nothing is published, updated or deleted, and WooCommerce orders and customers are never exposed. Draft creation requires edit_posts, reads require the capability configured for MCP tools, and the feature is disabled by default. Stored data and privacy No custom database table is created. The conversation log is optional and off by default; when enabled it holds the 200 most recent exchanges in a WordPress option, with retention from 1 to 90 days, and can be searched, filtered, exported to CSV and deleted per user or in full. The Privacy Policy section below sets out what is sent where, what is stored and what administrators are responsible for disclosing.

安装:

Before starting, enable access to the model in the selected AWS Region and create an IAM identity that can invoke only the models the site needs. Do not grant broad AWS administrator permissions to a WordPress site.
  1. Install and activate the plugin.
  2. Open AI Chat Bedrock > Settings.
  3. Enter the AWS Region, credentials and Bedrock model ID.
  4. Save the settings and run Diagnostics while signed in.
  5. Add [ai_chat_bedrock] to a page or post, or insert the chat block.
  6. Review model pricing and request limits before enabling guest chat.
Minimal IAM policy Replace REGION and MODEL_ID with your own values. Inference profiles and some model types use different resource ARNs; follow the AWS documentation for the model you select. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "bedrock:InvokeModel", "Resource": "arn:aws:bedrock:REGION::foundation-model/MODEL_ID" } ] } Keeping credentials out of the database For stronger isolation, define credentials in wp-config.php instead of saving them in the WordPress database: define( 'AI_CHAT_BEDROCK_AWS_ACCESS_KEY', 'replace-with-access-key' ); define( 'AI_CHAT_BEDROCK_AWS_SECRET_KEY', 'replace-with-secret-key' ); define( 'AI_CHAT_BEDROCK_AWS_SESSION_TOKEN', 'replace-with-session-token' ); // Optional. Credentials saved through the settings screen are encrypted with authenticated encryption derived from the site's WordPress authentication salts, and saved secrets are never rendered back into the form.

屏幕截图:

  • Dashboard with today's usage, a seven-day trend, a per-model breakdown of requests and tokens, and the setup checklist.
  • Grounding settings: site content search, semantic search with an embedding model, batch indexing progress, knowledge base and controlled abilities.
  • Diagnostics running a live Amazon Bedrock connectivity test, with round-trip time and tokens used.
  • MCP screen split into Servers, AI clients, Tool policy and Activity, here showing the tool policy and audit log switch.
  • Content generator streaming a draft as it is written, before the post is created.
  • Conversation log with search, source and rating filters, CSV export and helpfulness counts.
  • Chat settings with the system prompt, an optional Amazon Bedrock managed prompt, suggested questions and streaming.
  • Per-role request limits, so editors and administrators can be given more requests per minute than anonymous visitors.
  • The least-privilege IAM policy generated for this site's own configuration, ready to paste into AWS.
  • Drafting a first set of pages from a description of the business. Every page is a draft, and nothing existing is touched.
  • Content gaps: the questions visitors asked that the site has no content for, each with a shortcut to draft an answer.
  • A setup checklist that reads the site's own state, followed by the improvements still worth making.

升级注意事项:

1.31.0 The Diagnostics screen no longer prints your full AWS account number or EC2 instance id, so the screen is safe to share. The generated IAM policy is unchanged. 1.30.1 Documentation correction: Bedrock joins the WordPress 7.1 connector registry but is not shown on the Connectors screen, which lists only connectors that store a credential. 1.30.0 On WordPress 7.0+, any plugin's wp_ai_client_prompt() call now reaches Bedrock under this site's guardrail, limits and usage accounting. Older WordPress is unaffected. 1.29.0 Speaks MCP revision 2026-07-28, so clients built on the current SDKs can connect. Older clients are unaffected. 1.28.0 Adds configuration export and import for moving a setup between sites. Credentials are never included in the file. 1.27.0 Diagnostics now verifies a configured guardrail and knowledge base, and a rejected guardrail says so instead of blaming permissions. 1.26.0 An unavailable MCP server now reports why instead of only that it is unavailable. 1.25.1 Saving settings now shows a confirmation instead of returning silently. 1.25.0 Accessibility and forward-compatibility fixes: the chat title no longer skips a heading level, and the editor sidebar stops relying on deprecated WordPress APIs. 1.24.0 Fixes the chat block, which could not be inserted in the block editor. If you have been using the shortcode because the block did not appear, the block works now. 1.23.0 A chat that cannot answer is no longer shown to visitors. Configured sites are unaffected. 1.22.0 Visitors can stop a long answer, and the Bedrock request stops with it. A visitor closing the tab now also stops the request instead of it running to completion unread. 1.21.0 Recommended if any of your visitors use a screen reader: streamed answers were announced repeatedly and are announced once now. Bedrock refusals also name the credential source in use. 1.20.0 The dashboard checklist now reflects the site instead of being permanently unfinished, and suggests what is worth configuring next. 1.19.0 Adds a content gap report showing what visitors asked that your site does not answer. Gaps appear for exchanges recorded from this version on. 1.18.1 Accessibility fixes for the Site Pages screen. Recommended if anyone uses a screen reader with it. 1.18.0 Adds Site Pages for drafting a starting set of pages, and replaces the generic Bedrock error message with the specific fix for each cause. Nothing is published automatically. 1.17.0 Diagnostics now generates a least-privilege IAM policy for your exact configuration and shows which AWS identity is in use. Nothing needs changing on existing sites. 1.16.0 Request limits can now be set per role, so staff are not held to the same per-minute cap as anonymous visitors. Existing sites keep their current limit until an override is added. 1.15.2 Restores the readme privacy disclosure that 1.15.1 dropped, and applies WordPress coding standards throughout. No configuration changes. 1.15.1 Coding standards and internationalization fixes from the official Plugin Check. No behaviour changes and nothing to reconfigure. 1.15.0 Adds WP-CLI commands and optional background indexing for semantic search. Both are additions; nothing changes unless you use them. 1.14.1 Accessibility fixes for the settings screens and refreshed screenshots. No configuration changes. 1.14.0 Adds optional Amazon Bedrock Prompt Management support and fixes request signing for paths ending in a slash. Nothing changes until you enter a prompt identifier. 1.13.0 Adds optional semantic search over your published content. It stays off until you pick an embedding model and index, and keyword search continues to work as before. 1.12.0 Adds a seven-day usage breakdown per model on the dashboard, and lets the fallback model cover an unrecognized model ID. Counters only; no chat content is stored. 1.11.0 The content generator now streams while it writes and only creates the draft once it finishes. Nothing to reconfigure. 1.10.0 Adds an optional fallback model for denied or throttled requests, and wires the conversation log into WordPress privacy requests. No fallback is configured until you choose one. 1.9.1 New name, same plugin: nothing to reconfigure. Adds visible agent steps so you can see which tools an answer used. 1.9.0 Adds suggested questions, answer feedback, a searchable and exportable conversation log, and bulk alt text. Feedback and the log stay off unless conversation logging is enabled. 1.8.0 Fixes the floating chat, which could not open in 1.7.0. Also reorganizes the settings and MCP screens and adds optional alt text and excerpt helpers that stay off until you enable them. 1.7.0 Adds an optional floating chat and a content generator that only creates drafts. Existing chats are unchanged, and the site-wide floating chat stays off until you enable it. 1.6.0 Adds optional chat profiles. Existing chats keep using the main settings, and no profile exists until you create one. 1.5.0 Adds an optional editor assistant and an optional conversation log. Both are disabled by default and no chat content is stored unless you enable logging and disclose it to your visitors. 1.4.0 Optional OAuth connections for AI clients are available and disabled by default. Enable them in the MCP settings if you want clients such as Claude Desktop to connect by signing in and approving. Existing Application Password access is unchanged. 1.3.0 The built-in WordPress MCP endpoint now speaks standard MCP JSON-RPC at /wp-json/ai-chat-bedrock/v1/mcp and works with MCP clients using a WordPress Application Password. Authentication is still required by default. If the endpoint returns 404, save your permalink settings once. 1.2.0 Streaming is now the default and IAM role credentials are supported, so a site on AWS needs no stored keys. Review the new guest access and spend limits before opening chat to the public. 1.1.0 Security and reliability release. Review the AWS credential settings after upgrading, and keep guest chat disabled unless you intend to pay for anonymous requests.

常见问题:

Do I need an OpenAI API key?

No. Model requests use Amazon Bedrock and your AWS credentials. Availability, model access, pricing, and data handling are governed by your AWS account and Region.

Which Bedrock models are supported?

Version 1.1.0 includes request and response formats for Anthropic Claude, Amazon Nova and Titan, Meta Llama, Mistral, and DeepSeek model families. A specific model may still require model access, a supported Region, the correct model or inference-profile ID, and suitable IAM permissions.

Why do I receive AccessDeniedException or a model access error?

Confirm that the model is available and enabled in the configured AWS Region, the model ID is correct, and the IAM identity can call bedrock:InvokeModel for the required resource. Some models use inference profiles with different IDs and IAM resources.

Why can guests not use the chat after upgrading?

Version 1.1.0 defaults to signed-in users to reduce the risk of anonymous scripts generating unbounded AWS charges. An administrator can explicitly enable guest access and configure a request limit.

Are AWS credentials stored in plaintext?

Newly saved credentials are encrypted with authenticated encryption derived from WordPress salts. Existing plaintext credentials are migrated when an administrator opens the dashboard. wp-config.php constants remain the preferred production option.

Can I use temporary AWS credentials?

Yes. Configure the access key, secret key, and session token together, or define all three constants in wp-config.php.

Does version 1.2.0 stream responses?

Yes. Streaming is the default and uses an authenticated POST request with Server-Sent Events. The removed 1.0.x implementation was unsafe because it used a GET EventSource that placed conversation data in URLs and issued duplicate Bedrock requests. If the PHP cURL extension is missing or a proxy buffers the stream, the chat falls back to one buffered request automatically.

Can I run without storing AWS keys?

Yes. Leave the key fields empty and keep IAM role credentials enabled. The plugin then uses server environment variables, an ECS or EKS task role, or the EC2 instance role through IMDSv2.

Why must external MCP servers use HTTPS?

HTTPS and WordPress safe HTTP validation reduce server-side request forgery risk and protect tool inputs in transit. Private, loopback, link-local, credential-bearing, and unsafe redirect targets are rejected.

How is the built-in WordPress MCP server protected?

It is read-only and returns published content only. WordPress authentication is required by default. Administrators may explicitly expose it publicly; public requests are then rate limited.

Does MCP support multi-round tool chains?

Yes. The model can call tools, read the results, and continue reasoning for up to the configured number of rounds, defaulting to 3. The last round is answered without tools so the conversation always terminates. Tool output is always framed as untrusted data.

Can the AI change my site or a remote system?

Not by default. The built-in WordPress MCP endpoint is read-only. For external MCP servers, any tool that looks like it changes data is blocked until an administrator allows it, and those tools stay restricted to administrators.

Does the plugin collect telemetry?

No. This plugin does not send plugin-usage telemetry to the plugin author. Requests are sent only to services the administrator configures, as described in the Data flow and privacy section.

Is this plugin affiliated with Amazon Web Services?

No. Amazon Bedrock and AWS are trademarks of Amazon.com, Inc. or its affiliates. This is an independent open-source WordPress plugin.

更新日志:

1.31.0 1.30.1 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.1 1.25.0 1.24.0 1.23.0 1.22.0 1.21.0 1.20.0 1.19.0 1.18.1 1.18.0 1.17.0 1.16.0 1.15.2 1.15.1 1.15.0 1.14.1 1.14.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.1 1.9.0 1.8.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.7 1.0.6 1.0.5 1.0.0