OpenCode AI Provider
OpenCode Console AI Provider for the PHP AI Client with ChatGPT-style AI Assistant, Zero-Downtime Fallbacks, and MCP Agent Server.
Install in
Connect your WordPress site to the OpenCode Console (OpenCode 2.0 API). This plugin integrates directly with the official WordPress PHP AI Client SDK, introduces a modern ChatGPT-style AI Assistant directly in your WordPress admin bar, provides Zero-Downtime Fallback Architecture via OpenRouter and Kilo AI, and deploys a full Model Context Protocol (MCP) server for external autonomous coding agents.
✨ Key Features
- ChatGPT-Style AI Assistant: Dedicated admin interface located directly after Dashboard. Write, draft, ideate, and format blog posts or landing pages through chat.
- Voice Dictation (Speech-to-Text): Speak your prompts directly to the assistant using browser-native speech recognition.
- One-Click Draft Publishing: Convert AI responses directly into WordPress Post or Page drafts with a single click.
- Context-Aware Content Editing: Select any existing post or page to feed its title and content into the AI conversation for instant rewrites, SEO optimization, and polishing.
- Dynamic Model Fetching (Zero Dummy Data): Models are fetched in real-time from the live OpenCode Console API (
/models). As you enter or paste your API key, models populate dynamically. - Zero-Downtime Fallback Architecture: OpenCode Console free models provide access to frontier intelligence, but shared rate limits (HTTP 429 “Free usage limit reached”) can occur. When enabled, your queries automatically failover to OpenRouter or Kilo AI Gateway without interrupting your workflow.
- Direct Fallback Model Selection: Choose between OpenCode Free models, OpenRouter free frontier models (Gemini 2.0 Flash, DeepSeek R1, Llama 3.3 70B), and Kilo AI Gateway directly from the AI Assistant selector.
- Model Context Protocol (MCP) Server: Standard JSON-RPC 2.0 MCP server endpoint (
/wp-json/opencode/v1/mcp) enabling OpenCode CLI, Claude Code, Cursor, and Windsurf to securely read and edit WordPress content with dynamic token authentication. - Official PHP AI Client Provider: Fully implements the WordPress PHP AI Client SDK (
wp_ai_client_prompt()orAiClient::prompt()->usingProvider('opencode')). - About Developer Profile: Integrated profile tab showcasing 10+ years of WordPress, WooCommerce, and AI engineering expertise, services, and direct collaboration channels.
🚀 Getting Started
- Visit opencode.ai/console/account to create a Personal API key.
- In your WordPress admin, navigate to AI Assistance › Settings.
- Paste your API key (
oc_sk_...) into the OpenCode API Key field. The available models will fetch automatically. - Click Save Connection Settings.
- Start creating content under AI Assistance!
🛡️ Zero-Downtime Fallbacks (OpenRouter & Kilo AI)
To ensure uninterrupted AI capabilities when OpenCode shared daily free limits are reached:
- Navigate to AI Assistance › Settings › Fallback Providers.
- Check Enable Automatic Fallback.
- Optionally add an OpenRouter API Key or Kilo AI Gateway Key.
- Live models are fetched dynamically for each provider with zero dummy entries.
🤖 Model Context Protocol (MCP) Access
The plugin exposes a secure, token-authenticated MCP server at:
https://your-site.com/wp-json/opencode/v1/mcp
Connect using the OpenCode CLI:
opencode mcp add wordpress –url https://your-site.com/wp-json/opencode/v1/mcp –header “Authorization: Bearer YOUR_MCP_TOKEN”
Available MCP tools:
* get_site_info: Returns site name, URL, active theme, and WordPress version.
* list_posts: Queries posts with status, search, and pagination filters.
* get_post: Retrieves complete post object with title and content.
* create_post: Creates a draft or published post or page.
* update_post: Updates title, content, or status of an existing post.
* delete_post: Moves a post to trash.
* list_categories: Lists post categories.
* list_tags: Lists post tags.
Privacy Policy
This plugin transmits user prompts and post content to configured AI endpoints (OpenCode Console at opencode.ai, OpenRouter at openrouter.ai, or Kilo AI at kilo.ai) solely to generate assistant responses.
* OpenCode Privacy Policy: https://opencode.ai/legal/privacy-policy
* OpenCode Terms of Service: https://opencode.ai/legal/terms-of-service
Written by Joobi from the project's own listing. See the source page
1.1.0
- Feature: Modern ChatGPT-style AI Assistant under top-level admin menu “AI Assistance”.
- Feature: Voice dictation (speech-to-text) and assistant speech playback (listen).
- Feature: Zero-Downtime Fallback Architecture supporting OpenRouter and Kilo AI Gateway.
- Feature: Direct Fallback Provider model selection inside AI Assistance dropdown.
- Feature: Real-time dynamic model fetching upon API key input, paste, and blur.
- Feature: Model Context Protocol (MCP) JSON-RPC 2.0 server with dynamic token generation.
- Feature: One-click draft creation for Posts and Pages and in-context post updating.
- Update: Upgraded to OpenCode 2.0 Console endpoints (
https://opencode.ai/inference/openai/v1). - Fix: Adherence to WordPress coding standards and 100% Plugin Check compliance.
1.0.1
- Fix: Validate API key via
/modelsendpoint to support all OpenCode key versions. - Enhancement: Clean model names and automatic sorting.
1.0.0
- Initial release.
Follow this listing's changes (Atom feed)