티스토리 수익 글 보기
Botailor ModelContext Integrator for AI
Опис
Botailor ModelContext Integrator for AI is a powerful WordPress plugin that exposes selected posts and pages as AI-readable endpoints via the Model Context Protocol (MCP). This plugin provides a clean, secure way to make your WordPress content available to AI systems, external applications, and other services that need structured access to your content.
The plugin features granular permission control, allowing you to set specific permissions (Read, Write, Update, Delete) for each piece of content, ensuring your data remains secure while providing flexible access for authorized applications.
Features
- Selective Content Exposure: Choose which posts and pages to expose via the API
- Granular Permission Control: Set individual permissions (Read, Write, Update, Delete) for each content item
- Full CRUD Operations: Create, Read, Update, and Delete posts and pages via API
- REST API Endpoints: Clean, standardized endpoints under
/wp-json/mcia/v1/ - Master Endpoint: List all available endpoints with
/wp-json/mcia/v1/endpoints - Manifest Endpoint: Auto-generated manifest at
/wp-json/mcia/v1/manifestand/.well-known/mcp-manifest.json - Admin Interface: Easy-to-use settings page with search, pagination, and bulk actions
- Security: Built-in authentication, nonces, and capability checks
- WooCommerce Filtering: Automatically excludes WooCommerce products and pages
- Real-time Updates: Changes take effect immediately
API Endpoints
Read Operations:
* GET /wp-json/mcia/v1/manifest – Get manifest (all exposed content)
* GET /wp-json/mcia/v1/endpoints – List all available endpoints
* GET /wp-json/mcia/v1/{slug} – Get individual content by slug
CRUD Operations (Require Authentication):
* POST /wp-json/mcia/v1/posts – Create new post
* PUT /wp-json/mcia/v1/posts/{id} – Update existing post
* DELETE /wp-json/mcia/v1/posts/{id} – Delete post
* POST /wp-json/mcia/v1/pages – Create new page
* PUT /wp-json/mcia/v1/pages/{id} – Update existing page
* DELETE /wp-json/mcia/v1/pages/{id} – Delete page
Well-known Endpoint:
* GET /.well-known/mcp-manifest.json – Public manifest (no authentication required)
Response Format
Each content endpoint returns:
`json
{
„title“: „Page/Post title“,
„content“: „Page/Post content“,
„content_html“: „HTML formatted content“,
„description“: „Short description“,
„slug“: „content-slug“,
„type“: „post|page“,
„status“: „publish“,
„date“: „2024-01-01 00:00:00“,
„modified“: „2024-01-01 00:00:00“,
„author“: „Author Name“,
„featured_image“: „image-url“,
„meta“: {},
„url“: „permalink“
}
`
Testing the Plugin
Quick Test Setup
-
Configure Authentication:
- Go to Settings > Botailor ModelContext Integrator for AI
- Set a username and password for API access
- Save the credentials
-
Enable Content:
- Select which posts/pages to expose
- Set permissions (Read, Write, Update, Delete) for each item
- Use bulk actions to enable multiple items at once
-
Test Read Operations:
`bashTest manifest (no auth required)
curl „http://yoursite.com/.well-known/mcp-manifest.json“
Test authenticated manifest
curl -u „username:password“ „http://yoursite.com/wp-json/mcia/v1/manifest“
Test individual content
curl -u „username:password“ „http://yoursite.com/wp-json/mcia/v1/your-post-slug“
` -
Test CRUD Operations:
`bashCreate a new post
curl -u „username:password“ -X POST „http://yoursite.com/wp-json/mcia/v1/posts“ \
-H „Content-Type: application/json“ \
-d ‘{„title“: „Test Post“, „content“: „Test content“, „status“: „publish“}’Update a post (replace {id} with actual post ID)
curl -u „username:password“ -X PUT „http://yoursite.com/wp-json/mcia/v1/posts/{id}“ \
-H „Content-Type: application/json“ \
-d ‘{„title“: „Updated Title“, „content“: „Updated content“}’Delete a post (replace {id} with actual post ID)
curl -u „username:password“ -X DELETE „http://yoursite.com/wp-json/mcia/v1/posts/{id}“
` -
Test Permission System:
- Try to update/delete content that only has „Read“ permission
- Verify that operations are blocked with proper error messages
- Test that content with appropriate permissions works correctly
Expected Results
- Manifest: Should list all exposed content with metadata
- Individual Content: Should return full post/page data with permissions
- CRUD Operations: Should respect permission settings and authentication
- Error Handling: Should return clear error messages for unauthorized operations
Development
This plugin follows WordPress coding standards and best practices:
- Proper sanitization and validation
- Nonce verification for security
- Capability checks for admin functions
- Modular code structure with 4-letter prefix naming convention
- Comprehensive error handling
- Responsive admin interface
- Granular permission system
- Full CRUD operations with authentication
Support
Author: Hamid Azad
GitHub: https://github.com/hamidhosenazad
Email: hamidxazad@gmail.com
For support, feature requests, or bug reports, please visit the plugin’s GitHub repository or contact the author directly.
Постављање
- Upload the plugin files to the
/wp-content/plugins/botailor-modelcontext-integrator-aidirectory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the ‘Plugins’ screen in WordPress
- Go to Settings > Botailor ModelContext Integrator for AI to configure authentication and exposed content
- Set up API credentials (username and password) for secure access
- Configure which posts and pages to expose and set their permissions
- Test the API endpoints using the provided examples
ЧПП
-
How do I enable content for the API?
-
Go to Settings > Botailor ModelContext Integrator for AI in your WordPress admin. You’ll see lists of all your published posts and pages. Check the boxes next to the content you want to expose via the API.
-
What’s the difference between the content and content_html fields?
-
The
contentfield contains plain text (HTML tags stripped), whilecontent_htmlcontains the full HTML formatted content. -
Is the API secure?
-
Yes! The plugin includes proper nonce verification, capability checks, and only exposes content that you explicitly enable. All data is sanitized and validated.
-
Can I customize the API response?
-
The plugin follows WordPress coding standards and can be extended with custom filters and actions for advanced customization.
Прегледи
Нема рецензија за овај додатак.
Сарадници и градитељи
Botailor ModelContext Integrator for AI је софтвер отвореног кода. Следећи људи су допринели овом додатку.
СараднициПреведите Botailor ModelContext Integrator for AI на свој језик.
Заинтересовани сте за градњу?
Прегледајте код, проверите SVN складиште или се пријавите на белешку градње преко RSS-а.
Белешка о изменама
1.0.0
- Initial release
- Basic content exposure functionality
- Admin interface for managing exposed content
- REST API endpoints
- Security features and validation
1.0.0
Initial release of Botailor ModelContext Integrator for AI plugin.
