Includes documentation on Celery task management best practices within Django applications, as referenced in the generated documentation structure.
Supports integration with Windsurf (Codeium's editor) for accessing Django styleguide documentation through MCP protocol.
Provides comprehensive Django best practices and style guidelines divided into sections like Models, Services, APIs, Serializers, URLs, Settings, and Error handling, helping developers follow consistent patterns in Django projects.
Includes testing best practices for Django applications, with pytest mentioned as part of the development workflow.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Django Styleguide MCP Servershow me best practices for Django models"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Django Styleguide for MCP Servers
Ready-to-use Django Styleguide documentation for Model Context Protocol (MCP) servers in Cursor, Windsurf, Claude Desktop, and other AI editors.
What is this?
This repository takes the original Django Styleguide documentation as a git submodule, automatically splits it into smaller, AI-friendly files and provides access to them through the llms.txt format.
Result: Your AI assistant can easily find and use all Django best practices from the original styleguide.
Related MCP server: DevDocs MCP
How it works
Git submodule: We include the original Django Styleguide as a submodule
Automatic splitting: CLI tool splits the large README.md into separate files by sections
llms.txt generation: Creates an index file with absolute URLs for each section
Ready for consumption: MCP servers can easily access the documentation
What you get
π 18 separate files with Django best practices (Models, Services, APIs, etc.)
π llms.txt index with direct links to GitHub raw content
π Automatic updates when the original styleguide changes
π€ AI-friendly format for MCP servers
Example generated documentation
After processing you get this structure:
docs/
βββ models.md # Django models
βββ services.md # Service layer
βββ apis-serializers.md # APIs and serializers
βββ urls.md # URL structure
βββ settings.md # Django settings
βββ errors-exception-handling.md # Error handling
βββ testing.md # Testing
βββ celery.md # Celery tasks
βββ ...other sections
llms.txt # Index for MCP serversllms.txt contains direct links:
# Table of Contents
- [Models](https://raw.githubusercontent.com/dmmeteo/django-styleguide-mcp/main/docs/models.md)
- [Services](https://raw.githubusercontent.com/dmmeteo/django-styleguide-mcp/main/docs/services.md)
- [APIs & Serializers](https://raw.githubusercontent.com/dmmeteo/django-styleguide-mcp/main/docs/apis-serializers.md)
...Integration with AI editors
Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"django-styleguide": {
"command": "uvx",
"args": [
"--from",
"mcpdoc",
"mcpdoc",
"--urls",
"DjangoStyleguide:https://raw.githubusercontent.com/dmmeteo/django-styleguide-mcp/main/llms.txt",
"--transport",
"stdio"
]
}
}
}Add to your Cursor Rules:
For ANY questions about Django best practices, use the django-styleguide MCP server:
+ call list_doc_sources to get available sources
+ call fetch_docs to read llms.txt
+ analyze URLs in llms.txt based on the question
+ fetch relevant documentation sections
+ provide comprehensive answers based on Django StyleguideWindsurf
Similar configuration in ~/.codeium/windsurf/mcp_config.json.
Claude Desktop
Add to ~/Library/Application\ Support/Claude/claude_desktop_config.json.
Keeping documentation up-to-date
Documentation automatically updates when the original Django Styleguide changes:
# 1. Git submodule automatically updates
git submodule update --remote django-styleguide
# 2. Regenerate documentation
uv run python -m mcpdoc_split.cli django-styleguide/README.md \
--url-prefix "https://raw.githubusercontent.com/dmmeteo/django-styleguide-mcp/main" \
--base-path "/docs" \
--max-level 2
# 3. Commit changes
git add docs/ llms.txt
git commit -m "Update documentation from Django Styleguide"Development
If you want to make changes or run locally:
# Clone repository
git clone https://github.com/dmmeteo/django-styleguide-mcp.git
cd django-styleguide-mcp
# Initialize submodule
git submodule update --init --recursive
# Install dependencies
uv sync
# Run CLI
uv run python -m mcpdoc_split.cli django-styleguide/README.md
# Run tests
uv run pytestProject structure
mcpdoc_split/ # CLI tool for splitting documentation
βββ cli.py # Command line interface
βββ main.py # File splitting logic
βββ ...
django-styleguide/ # Git submodule of original styleguide
docs/ # Generated documentation files
llms.txt # Index for MCP servers
tests/ # TestsAcknowledgments
Django Styleguide by HackSoft for excellent Django practices
mcpdoc by LangChain for MCP server inspiration
Model Context Protocol for the MCP specification
Related projects
Django Styleguide - The original Django best practices guide
mcpdoc - MCP server for documentation access
llms.txt - Standard for AI-friendly documentation