A Django CMS plugin that provides Model Context Protocol (MCP) server functionality, enabling AI assistants like Claude to directly interact with, manage, and create content in your Django CMS installation through natural language.
Create content in your Django CMS installation through natural language!
Yıldızlar
4
Araçlar
—
Çalışma süresi
—
🚀 Features
Complete CMS Integration: Full access to Django CMS pages, plugins, and templates
LLM-Powered Content Management: Create, edit, and publish content through natural language
Multi-language Support: Work with content in multiple languages seamlessly
Plugin System Integration: Add and configure any Django CMS plugin via MCP
Hierarchical Page Management: Navigate and manage complex page structures
Template Management: Create pages with any available template
Search & Discovery: Find content across your entire CMS
Publishing Workflow: Draft, review, and publish content with proper workflow (djangocms-versioning required)
Security First: Built-in authentication and permission checking
🎯 Use Cases
Content Creation: "Create a new blog post about Django best practices"
Site Management: "Update the homepage banner and publish the changes"
Content Organization: "Move the pricing page under the products section"
Multi-language Sites: "Translate this page to Spanish and French"
Plugin Management: "Add a contact form to the about page"
SEO Optimization: "Update meta descriptions for all product pages"
# urls.py
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path("", include('mcp_server.urls')), # Be sure to include django-mcp-server urls!
path('', include('cms.urls')),
]
4. Run Migrations
python manage.py migrate djangocms-mcp
🤖 Connecting to Claude Desktop
Configure Claude Desktop MCP Settings
To connect Claude Desktop to your Django CMS MCP server, you need to configure the MCP settings in Claude Desktop's configuration file.
Use VS Code's integrated terminal for quick MCP operations:
# Start the MCP server
python manage.py start_mcp_server
# Test MCP functions directly
python manage.py shell
>>> from django_cms_mcp.mcp_server import DjangoCMSMCPServer
>>> server = DjangoCMSMCPServer()
>>> # Test functions here
VS Code Snippets for Django CMS MCP
Create .vscode/snippets/djangocms-mcp.json:
{
"MCP Create Page": {
"prefix": "mcp-create-page",
"body": [
"# Ask Claude to create a page",
"# Example: \"Create a ${1:page-type} page titled '${2:Page Title}' using the ${3:template-name} template\""
],
"description": "Template for asking Claude to create a CMS page"
},
"MCP Add Plugin": {
"prefix": "mcp-add-plugin",
"body": [
"# Ask Claude to add content",
"# Example: \"Add a ${1:plugin-type} plugin to the ${2:placeholder-name} placeholder on page ${3:page-id}\""
],
"description": "Template for asking Claude to add a plugin"
},
"MCP Search Content": {
"prefix": "mcp-search",
"body": [
"# Ask Claude to find content",
"# Example: \"Find all pages containing '${1:search-term}' in ${2:language}\""
],
"description": "Template for content search via Claude"
}
}
VS Code Extensions Compatibility
The Django CMS MCP server works well with these VS Code extensions:
Python Extension Pack - Enhanced Python development
from django_cms_mcp.mcp_server import DjangoCMSMCPServer
# Initialize the server
server = DjangoCMSMCPServer()
# Use the server programmatically
response = server.get_server().handle_request({
"method": "get_page_tree",
"params": {"language": "en"}
})
page_id, placeholder_slot, plugin_type, data, language, position
update_plugin
Update existing plugin content
plugin_id, data
🎨 Template & Structure
Function
Description
Parameters
list_templates
Get available CMS templates
None
get_languages
Get configured languages
None
💡 Example Usage with Claude
Creating Content
You: "Create a new blog post about Python web development with Django"
Claude: I'll create a new blog post for you about Python web development with Django.
# Claude uses these MCP calls:
create_page(
title="Python Web Development with Django",
template="blog_post.html",
language="en",
slug="python-web-development-django",
meta_description="Complete guide to building web applications with Django framework"
)
create_plugin(
page_id=123,
placeholder_slot="content",
plugin_type="TextPlugin",
data={
"body": "Django is a high-level Python web framework..."
}
)
Managing Site Structure
You: "Move the pricing page under the products section and update its title"
Claude: I'll reorganize your site structure and update the page title.
# Claude finds the pages and restructures
search_pages(query="pricing")
search_pages(query="products")
# Then moves and updates the page
Multi-language Content
You: "Translate the homepage to Spanish"
Claude: I'll create a Spanish translation of your homepage.
get_page(page_id=1, language="en") # Get English content
create_translation(page_id=1, target_language="es") # Create Spanish version
🛡️ Security
The plugin implements multiple security layers:
Authentication Required: All MCP endpoints require Django user authentication
# Clone the repository
git clone https://github.com/rsp2k/djangocms-mcp.git
cd djangocms-mcp
# Install in development mode
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install
# Run tests
pytest
# Run tests with coverage
pytest --cov=django_cms_mcp --cov-report=html
Code Quality Tools
# Format code
black .
isort .
# Lint code
ruff check .
flake8
# Type checking
mypy django_cms_mcp
# Security check
bandit -r django_cms_mcp
Running Tests
# Run all tests
pytest
# Run specific test categories
pytest -m unit # Unit tests only
pytest -m integration # Integration tests only
pytest -m "not slow" # Skip slow tests
# Run with different Django/Python versions
tox
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Quick Start for Contributors
Fork the repository
Create a feature branch: git checkout -b feature/amazing-feature
Plugin system integration with create/update/list operations
Multi-language support for all operations
Hierarchical page tree navigation
Template management and listing
Basic search functionality across pages
Publishing workflow (draft/live)
Authentication and permission checking
Django CMS plugin for easy integration
Management command for standalone server
HTTP endpoint for web-based MCP clients
Media/Filer integration support
Page extension field access
Content serialization and data handling
This project provides a complete, production-ready MCP server implementation for Django CMS. All core functionality needed for LLM-powered content management is included in the current version.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
Django CMS Team - For the amazing CMS framework
Anthropic - For the Model Context Protocol specification
Django Community - For the robust web framework
Contributors - Thank you to all contributors who help improve this project
Henüz araç listesi yok. Uzak sunucular ilk sağlık kontrolünden sonra bir liste alır.
SSS
Sorular
Djangocms nasıl kurulur?
Bu sayfadan Cursor, Claude Desktop, Claude Code veya VS Code için stdio yapılandırmasını kopyalayın. PlugMCP proxy'sini değil, yayıncının kurulumunu kullanır.
Djangocms için API anahtarı gerekiyor mu?
Bu kayıtta gerekli bir ortam değişkeni listelenmiyor.
Djangocms hangi aktarımı kullanıyor?
Djangocms yerel olarak stdio üzerinden çalışır.
Djangocms en son ne zaman kontrol edildi?
Son kontrol: 2026-10-28. Create content in your Django CMS installation through natural language!