AI MCP
AI MCP. Make any WordPress site readable by AI agents. Exposes structured content via REST API with semantic chunking, FAQ extraction, media indexing, author profiles, llms.txt, and MCP manifest.
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/malikad778/ai-mcp/archive/refs/heads/main.zipAI MCP for WordPress
The AI Machine Context Protocol (MCP) plugin for WordPress automatically transforms any WordPress site into a structured, machine-readable format. It exposes endpoints specifically designed for Large Language Models (LLMs) and tools like Cursor, GitHub Copilot, completely bridging the gap between your dynamic WordPress content (posts, pages, authors, FAQs, ACF) and AI agents.
Features
- Semantic Chunking & RAG-ready Content: Breaks down massive WordPress pages/posts into manageable, NLP-friendly chunks (
/wp-json/ai-mcp/v1/chunks). - LLMs.txt Support: Automatically generates
/llms.txtand/llms-full.txt(following the llms.txt standard) for rapid AI onboarding. - Dynamic FAQ Extraction: Scrapes content to detect potential Q&A pairs.
- Headless JSON Endpoints: Provides fast, structured access to
pages.json,posts.json,media.json, andauthors.json. - Caching & Optimization: Utilizes background, batched JSON generation placed securely in your
wp-content/uploads/ai-mcpfolder to avoid performance hits during endpoint requests. - Secure & Extendable: Proper usage of nonces, sanitization, scalable pagination algorithms, and WordPress hooks (
apply_filters( 'ai_mcp_max_posts', 500 )).
Installation
- Download the ZIP file of this repository.
- Go to Plugins > Add New in your WordPress admin dashboard.
- Click Upload Plugin and select the ZIP file.
- Activate the AI MCP plugin.
- Go to AI MCP in the WordPress admin sidebar to trigger the initial JSON generation.
How It Works / Usage
Once activated, your site immediately exposes:
https://yoursite.com/llms.txthttps://yoursite.com/llms-full.txthttps://yoursite.com/.well-known/mcp.json
Check the AI MCP setting panel to configure analytics and monitor the rate limiter.
Customization (Filters)
You can extend the default behavior via your child theme's functions.php:
// Adjust pagination for giant sites (Default: 500 posts per background generation)
add_filter( 'ai_mcp_max_posts', function( $max ) {
return 1000;
});
// Target a different page for 'about' bio generation
add_filter( 'ai_mcp_profile_page_slug', function( $slug ) {
return 'our-team';
} );
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
GPLv2 or later