Skip to content
Back to search

django-ai-boost

A MCP server for Django applications, inspired by Laravel Boost.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/vintasoftware--django-ai-boost/badge.svg)](/listings/vintasoftware--django-ai-boost)

HTML

<a href="/listings/vintasoftware--django-ai-boost"><img src="/api/listings/vintasoftware--django-ai-boost/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

For End Users

# Using uv (recommended)
uv pip install django-ai-boost

# Or with pip
pip install django-ai-boost

For Development

If you want to contribute or run the latest development version:

# Clone the repository
git clone https://github.com/vinta/django-ai-boost.git
cd django-ai-boost

# Install uv if you haven't already
# On macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh

# On Windows:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

# Install dependencies (creates virtual environment automatically)
uv sync --dev

# Verify installation
uv run django-ai-boost --help

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 781 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Django AI Boost
  2. <!-- mcp-name: io.github.vintasoftware/django-ai-boost -->
  3. A Model Context Protocol (MCP) server for developing Django applications, inspired by [Laravel Boost](https://github.com/laravel/boost). This server exposes Django project information through MCP tools, enabling AI assistants to better understand and interact with Django codebases.
  4. ## Table of Contents
  5. - [Features](#features)
  6. - [Screenshots](#screenshots)
  7. - [Installation](#installation)
  8. - [For End Users](#for-end-users)
  9. - [For Development](#for-development)
  10. - [Usage](#usage)
  11. - [Running the Server](#running-the-server)
  12. - [Authentication](#authentication)
  13. - [AI Tools Setup](#ai-tools-setup)
  14. - [Cursor](#cursor)
  15. - [Claude Desktop](#claude-desktop)
  16. - [Github Copilot (VS Code)](#github-copilot-vs-code-extension)
  17. - [Claude Code (VS Code)](#claude-code-vs-code-extension)
  18. - [OpenAI ChatGPT Desktop](#openai-chatgpt-desktop-with-mcp)
  19. - [Cline (VS Code)](#cline-vs-code-extension)
  20. - [Zed Editor](#zed-editor)
  21. - [Generic MCP Client](#generic-mcp-client)
  22. - [Available Tools](#available-tools-and-prompts)
  23. - [Example Usage](#example-usage-with-ai-assistants)
  24. - [Development & Testing](#development--testing)
  25. - [Troubleshooting](#troubleshooting)
  26. - [Requirements](#requirements)
  27. - [Contributing](#contributing)
  28. - [License](#license)
  29. ## Features
  30. - **Project Discovery**: List models, URLs, and management commands
  31. - **Database Introspection**: View schema, migrations, and relationships
  32. - **Configuration Access**: Query Django settings with dot notation
  33. - **Log Reading**: Access recent application logs with filtering
  34. - **Production-Ready Authentication**: Bearer token authentication for secure deployments
  35. - **Read-Only**: All tools are safe, read-only operations
  36. - **Fast**: Built on [FastMCP](https://gofastmcp.com/) for efficient async operations
  37. ## Screenshots
  38. <details>
  39. <summary>Click to view screenshots</summary>
  40. ### Django AI Boost in Action
  41. ![Django AI Boost Example](./assets/example_mcp01.png)
  42. *Django AI Boost MCP server providing Django project introspection through AI assistants (Example using [OpenCode](https://opencode.ai/))*
  43. </details>
  44. ## Installation
  45. ### For End Users
  46. ```bash
  47. # Using uv (recommended)
  48. uv pip install django-ai-boost
  49. # Or with pip
  50. pip install django-ai-boost
  51. ```
  52. ### For Development
  53. If you want to contribute or run the latest development version:
  54. ```bash
  55. # Clone the repository
  56. git clone https://github.com/vinta/django-ai-boost.git
  57. cd django-ai-boost
  58. # Install uv if you haven't already
  59. # On macOS/Linux:
  60. curl -LsSf https://astral.sh/uv/install.sh | sh
  61. # On Windows:
  62. powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
  63. # Install dependencies (creates virtual environment automatically)
  64. uv sync --dev
  65. # Verify installation
  66. uv run django-ai-boost --help
  67. ```
  68. ## Usage
  69. ### Running the Server
  70. The server requires access to your Django project's settings:
  71. ```bash
  72. # Set the Django settings module
  73. export DJANGO_SETTINGS_MODULE=myproject.settings
  74. django-ai-boost
  75. # Or specify settings directly
  76. django-ai-boost --settings myproject.settings
  77. # Run with SSE transport (default is stdio, which doesn't use network ports)
  78. django-ai-boost --settings myproject.settings --transport sse
  79. # Run with SSE transport on a custom port (default port is 8000)
  80. django-ai-boost --settings myproject.settings --transport sse --port 3000
  81. # Run with SSE transport on custom host and port
  82. django-ai-boost --settings myproject.settings --transport sse --host 0.0.0.0 --port 8080
  83. ```
  84. **Note:** The stdio transport (default) communicates via standard input/output and does not use network ports. The `--port` and `--host` options only apply when using `--transport sse`.
  85. ### Authentication
  86. Django AI Boost supports bearer token authentication for secure production deployments when using SSE transport.
  87. #### Quick Start
  88. **Set authentication token (recommended for production):**
  89. ```bash
  90. export DJANGO_MCP_AUTH_TOKEN="your-secret-token"
  91. django-ai-boost --settings myproject.settings --transport sse
  92. ```
  93. **Or use CLI argument:**
  94. ```bash
  95. django-ai-boost --settings myproject.settings --transport sse --auth-token "your-secret-token"
  96. ```
  97. #### How It Works
  98. - **Automatic Production Mode**: When Django's `DEBUG=False` and using SSE transport, authentication is **automatically required**
  99. - **Token Precedence**: Environment variable takes precedence over CLI argument for security
  100. - **Transport Support**:
  101. - ✅ **SSE Transport**: Full authentication support (HTTP-based)
  102. - ❌ **Stdio Transport**: No authentication (local-only, trusted environments)
  103. - **Error on Mismatch**: If you provide `--auth-token` with `--transport stdio`, the server will exit with an error to prevent false security assumptions
  104. #### Production Deployment
  105. When running in production (DEBUG=False) with SSE transport, you **must** provide an authentication token:
  106. ```bash
  107. # This will fail without a token
  108. django-ai-boost --settings myproject.production_settings --transport sse
  109. # Error: Production mode detected but no authentication token provided
  110. # This works
  111. export DJANGO_MCP_AUTH_TOKEN="strong-secret-token"
  112. django-ai-boost --settings myproject.production_settings --transport sse
  113. # Authentication enabled with bearer token for SSE transport
  114. ```
  115. #### Security Best Practices
  116. 1. **Generate strong tokens**:
  117. ```bash
  118. python -c "import secrets; print(secrets.token_urlsafe(32))"
  119. ```
  120. 2. **Never commit tokens** to version control
  121. 3. **Use environment variables** in production (not CLI arguments)
  122. 4. **Rotate tokens periodically**
  123. 5. **Use HTTPS** with a reverse proxy for external access
  124. #### Client Configuration with Authentication
  125. When using authentication, configure your MCP clients to include the token:
  126. **Cursor / Claude Desktop:**
  127. ```json
  128. {
  129. "mcpServers": {
  130. "django-ai-boost": {
  131. "command": "django-ai-boost",
  132. "args": ["--settings", "myproject.settings", "--transport", "sse"],
  133. "env": {
  134. "DJANGO_MCP_AUTH_TOKEN": "your-secret-token",
  135. "DJANGO_SETTINGS_MODULE": "myproject.settings",
  136. "PYTHONPATH": "/path/to/your/django/project"
  137. }
  138. }
  139. }
  140. }
  141. ```
  142. **Testing with curl:**
  143. ```bash
  144. # Without auth - fails
  145. curl http://127.0.0.1:8000/sse
  146. # With correct token - works
  147. curl -H "Authorization: Bearer your-secret-token" http://127.0.0.1:8000/sse
  148. ```
  149. #### Troubleshooting Authentication
  150. **"Production mode detected but no authentication token provided"**
  151. - Set `DJANGO_MCP_AUTH_TOKEN` environment variable or use `--auth-token`
  152. **"Authentication token provided but transport is 'stdio'"**
  153. - **This is now an error** that stops the server from starting
  154. - Authentication only works with `--transport sse`
  155. - Either use `--transport sse` with your token, or remove the `--auth-token` argument for stdio
  156. **"Running in production mode with stdio transport"**
  157. - This is OK for local/trusted environments, but stdio has no authentication capability
  158. - For remote access, use `--transport sse` with authentication
  159. ## AI Tools Setup
  160. ### Cursor
  161. [Cursor](https://cursor.com/) is a popular AI-powered code editor with built-in MCP support.
  162. 1. Open Cursor Settings (Cmd/Ctrl + Shift + J)
  163. 2. Navigate to the "Tools & MCP" section
  164. 3. Add the Django AI Boost server configuration:
  165. ```json
  166. {
  167. "mcpServers": {
  168. "django-ai-boost": {
  169. "command": "django-ai-boost",
  170. "args": ["--settings", "myproject.settings"],
  171. "env": {
  172. "DJANGO_SETTINGS_MODULE": "myproject.settings",
  173. "PYTHONPATH": "/path/to/your/django/project"
  174. }
  175. }
  176. }
  177. }
  178. ```
  179. **Note**: Replace `/path/to/your/django/project` with the actual path to your Django project root directory.
  180. For more information, see the [Cursor MCP documentation](https://cursor.com/docs/context/mcp).
  181. ### Claude Desktop
  182. Add to your Claude Desktop configuration:
  183. - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
  184. - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
  185. - **Linux**: `~/.config/claude/claude_desktop_config.json`
  186. ```json
  187. {
  188. "mcpServers": {
  189. "django": {
  190. "command": "django-ai-boost",
  191. "args": ["--settings", "myproject.settings"],
  192. "env": {
  193. "DJANGO_SETTINGS_MODULE": "myproject.settings",
  194. "PYTHONPATH": "/path/to/your/django/project"
  195. }
  196. }
  197. }
  198. }
  199. ```
  200. **Note**: Make sure to replace `/path/to/your/django/project` with the actual path to your Django project root directory.
  201. ### Github Copilot (VS Code Extension)
  202. 1. Install the Github Copilot Chat extension from VS Code marketplace
  203. 2. Create or edit `.vscode/mcp.json` in your Django project root:
  204. ```json
  205. {
  206. "inputs": [
  207. // The "inputs" section defines the inputs required for the MCP server configuration.
  208. {
  209. "type": "promptString"
  210. }
  211. ],
  212. "servers": {
  213. // The "servers" section defines the MCP servers you want to use.
  214. "django-ai-boost": {
  215. "command": "uv",
  216. "args": ["run", "django-ai-boost", "--settings", "myproject.settings"],
  217. "env": {
  218. "DJANGO_SETTINGS_MODULE": "myproject.settings"
  219. }
  220. }
  221. }
  222. }
  223. ```
  224. 3. Click "Start" in the JSON
  225. <img width="1182" height="642" alt="image" src="https://github.com/user-attachments/assets/9a0ea532-80bd-4bd7-bbd2-7d4afd726b32" />
  226. 5. Github Copilot Code will automatically connect to the MCP server when you start a conversation in "Agent" mode.
  227. ### Claude Code (VS Code Extension)
  228. 1. Install the Claude Code extension from VS Code marketplace
  229. 2. Create or edit `.mcp.json` in your Django project root:
  230. ```json
  231. {
  232. "mcpServers": {
  233. "django-ai-boost": {
  234. "command": "uv",
  235. "args": ["run", "django-ai-boost", "--settings", "myproject.settings"],
  236. "env": {
  237. "DJANGO_SETTINGS_MODULE": "myproject.settings"
  238. }
  239. }
  240. }
  241. }
  242. ```
  243. 3. Restart VS Code or reload the Claude Code extension
  244. 4. Claude Code will automatically connect to the MCP server when you start a conversation
  245. ### OpenAI ChatGPT Desktop with MCP
  246. OpenAI ChatGPT Desktop supports MCP servers. Add to your configuration file:
  247. - **macOS**: `~/Library/Application Support/OpenAI/ChatGPT/config.json`
  248. - **Windows**: `%APPDATA%\OpenAI\ChatGPT\config.json`
  249. ```json
  250. {
  251. "mcpServers": {
  252. "django": {
  253. "command": "django-ai-boost",
  254. "args": ["--settings", "myproject.settings"],
  255. "env": {
  256. "DJANGO_SETTINGS_MODULE": "myproject.settings"
  257. }
  258. }
  259. }
  260. }
  261. ```
  262. ### Cline (VS Code Extension)
  263. 1. Install the Cline extension from VS Code marketplace
  264. 2. Open Cline settings (Cmd/Ctrl + Shift + P → "Cline: Open Settings")
  265. 3. Add MCP server configuration in the MCP Servers section:
  266. ```json
  267. {
  268. "django": {
  269. "command": "django-ai-boost",
  270. "args": ["--settings", "myproject.settings"],
  271. "env": {
  272. "DJANGO_SETTINGS_MODULE": "myproject.settings"
  273. }
  274. }
  275. }
  276. ```
  277. ### Zed Editor
  278. Add to your Zed MCP configuration (`~/.config/zed/mcp.json`):
  279. ```json
  280. {
  281. "servers": {
  282. "django": {
  283. "command": "django-ai-boost",
  284. "args": ["--settings", "myproject.settings"],
  285. "env": {
  286. "DJANGO_SETTINGS_MODULE": "myproject.settings"
  287. }
  288. }
  289. }
  290. }
  291. ```
  292. ### Generic MCP Client
  293. For any MCP-compatible client, you can run the server manually:
  294. ```bash
  295. # Standard I/O transport (default, no network port)
  296. django-ai-boost --settings myproject.settings
  297. # Server-Sent Events transport (default: 127.0.0.1:8000)
  298. django-ai-boost --settings myproject.settings --transport sse
  299. # SSE transport with custom port
  300. django-ai-boost --settings myproject.settings --transport sse --port 3000
  301. # SSE transport with custom host and port
  302. django-ai-boost --settings myproject.settings --transport sse --host 0.0.0.0 --port 8080
  303. ```
  304. ## Available Tools and Prompts
  305. ### Tools
  306. ### 1. `application_info`
  307. Get Django and Python versions, installed apps, middleware, database engine, and debug mode status.
  308. ### 2. `get_setting`
  309. Retrieve any Django setting using dot notation (e.g., `DATABASES.default.ENGINE`).
  310. ### 3. `list_models`
  311. List all Django models with fields, types, max_length, null/blank status, and relationships.
  312. **Arguments:**
  313. - `app_labels`: Optional list of app labels to filter (e.g., `["blog", "auth"]`). If not provided, returns all models.
  314. **Note**: For large projects, some MCP clients (like PyCharm) may truncate output due to display limits. Use the `app_labels` parameter to filter by specific apps to avoid truncation. See [Troubleshooting](#troubleshooting) for more details.
  315. ### 4. `list_urls`
  316. Show all URL patterns with names, patterns, and view handlers (including nested includes).
  317. ### 5. `database_schema`
  318. Get complete database schema including tables, columns, types, indexes, and foreign keys.
  319. ### 6. `list_migrations`
  320. View all migrations per app with their applied/unapplied status.
  321. ### 7. `list_management_commands`
  322. List all available `manage.py` commands with their source apps.
  323. ### 8. `get_absolute_url`
  324. Get the absolute URL for a specific model instance. Requires the model to have a `get_absolute_url()` method defined.
  325. **Arguments:**
  326. - `app_label`: The Django app label (e.g., "blog")
  327. - `model_name`: The model name (e.g., "Post")
  328. - `pk`: The primary key of the instance
  329. ### 9. `reverse_url`
  330. Reverse a named URL pattern to get its actual URL path. Supports both positional args and keyword arguments.
  331. **Arguments:**
  332. - `url_name`: The URL pattern name (e.g., "post_detail", "admin:index")
  333. - `args`: Optional list of positional arguments
  334. - `kwargs`: Optional dict of keyword arguments
  335. ### 10. `query_model`
  336. Query a Django model with read-only operations using the Django ORM manager. This tool allows safe querying of any Django model with filtering, ordering, and pagination.
  337. **Arguments:**
  338. - `app_label`: The Django app label (e.g., "blog")
  339. - `model_name`: The model name (e.g., "Post")
  340. - `filters`: Optional dict of field lookups (e.g., `{"status": "published", "featured": true}`)
  341. - `order_by`: Optional list of fields to order by (e.g., `["-created_at", "title"]`)
  342. - `limit`: Maximum number of results to return (default: 100, max: 1000)
  343. **Returns:**
  344. - Total count of matching objects
  345. - Number of results returned
  346. - List of model instances as dictionaries with all field values
  347. - For foreign keys, includes both the ID and string representation
  348. **Example Queries:**
  349. - Get all published posts: `filters={"status": "published"}`
  350. - Get featured posts ordered by date: `filters={"featured": true}`, `order_by=["-created_at"]`
  351. - Get recent posts with limit: `order_by=["-created_at"]`, `limit=10`
  352. ### 11. `run_check`
  353. Run Django's system checks to identify potential issues in models, settings, and deployment configuration.
  354. **Arguments:**
  355. - `app_labels`: Optional list of app labels to check
  356. - `tags`: Optional list of check tags (e.g., `"models"`, `"compatibility"`)
  357. - `deploy`: Include deployment checks when `true`
  358. - `fail_level`: Minimum severity (`"CRITICAL"`, `"ERROR"`, `"WARNING"`, `"INFO"`, `"DEBUG"`)
  359. - `databases`: Optional list of database aliases to include
  360. ### 12. `read_recent_logs`
  361. Read recent lines from file-based log handlers configured in `LOGGING.handlers`.
  362. **Arguments:**
  363. - `lines`: Number of lines to return per file (default: `100`, configurable via `DJANGO_MCP_MAX_LOG_LINES` env var)
  364. - `handler_name`: Optional handler name to read from a single file handler
  365. > **Note:** This tool reads only file-based handlers (`*FileHandler` classes). If your project logs to the console only, configure a `FileHandler` in your Django `LOGGING` settings so the AI can access log output. Example:
  366. >
  367. > ```python
  368. > LOGGING = {
  369. > "version": 1,
  370. > "handlers": {
  371. > "file": {
  372. > "class": "logging.FileHandler",
  373. > "filename": "django.log",
  374. > },
  375. > },
  376. > "root": {"handlers": ["file"], "level": "INFO"},
  377. > }
  378. > ```
  379. ### Prompts
  380. MCP prompts provide reusable message templates to help guide interactions with AI assistants.
  381. ### 1. `search_django_docs`
  382. Generate a formatted prompt to help search for specific topics in Django documentation.
  383. **Arguments:**
  384. - `topic`: The Django topic or feature to search for (e.g., "models", "queryset", "migrations", "authentication")
  385. **Returns:**
  386. A formatted prompt that includes:
  387. - The current Django version being used
  388. - Direct links to the appropriate version of Django documentation
  389. - Guidance on what information to look for
  390. - Request for best practices and code examples
  391. **Example topics:**
  392. - "models" - Learn about Django models and ORM
  393. - "queryset filtering" - Query optimization and filtering
  394. - "migrations" - Database schema management
  395. - "authentication" - User authentication and permissions
  396. - "middleware" - Request/response processing
  397. - "forms" - Form handling and validation
  398. This prompt automatically adapts to your Django version (e.g., 5.2, 4.2) to ensure documentation compatibility.
  399. ## Example Usage with AI Assistants
  400. Once configured, you can ask your AI assistant questions like:
  401. **Using Tools:**
  402. - "What models are in this Django project?"
  403. - "Show me all URL patterns"
  404. - "What's the database schema for the users table?"
  405. - "Are there any unapplied migrations?"
  406. - "What's the value of the DEBUG setting?"
  407. - "What's the URL for blog post with ID 5?"
  408. - "Reverse the 'post_detail' URL pattern with pk=10"
  409. - "Show me all published blog posts"
  410. - "Get the 10 most recent posts ordered by creation date"
  411. - "Find all featured posts in the blog"
  412. - "Show me recent error logs"
  413. **Using Prompts:**
  414. - "Use the search_django_docs prompt for 'models'" - Get help finding Django model documentation
  415. - "Search Django docs for 'authentication'" - Learn about Django authentication
  416. - "Show me Django documentation about 'migrations'" - Migration best practices and guides
  417. ## Development & Testing
  418. The project includes a comprehensive test suite and a fixture Django project for development:
  419. ```bash
  420. # Run all tests with pytest
  421. uv run pytest
  422. # Run broad integration coverage
  423. uv run pytest test_server.py
  424. # Run focused MCP tool tests
  425. uv run pytest test_auth_logic.py test_prompt.py test_query_model.py test_read_recent_logs.py test_run_check.py
  426. # Run the MCP server with the test project
  427. export PYTHONPATH="${PYTHONPATH}:./fixtures/testproject"
  428. uv run django-ai-boost --settings testproject.settings
  429. # Run linter
  430. uv run ruff check .
  431. # Auto-fix linting issues
  432. uv run ruff check --fix .
  433. # Format code
  434. uv run ruff format .
  435. ```
  436. The [fixtures/testproject/](fixtures/testproject/) directory contains a complete Django application for testing all MCP tools. See [fixtures/README.md](fixtures/README.md) for details about the test project structure.
  437. ## Troubleshooting
  438. ### "Django is not configured" Error
  439. Make sure you've set the `DJANGO_SETTINGS_MODULE` environment variable or used the `--settings` flag:
  440. ```bash
  441. export DJANGO_SETTINGS_MODULE=myproject.settings
  442. django-ai-boost
  443. ```
  444. ### PYTHONPATH Issues
  445. If Django can't find your project modules, add your project directory to PYTHONPATH:
  446. ```bash
  447. export PYTHONPATH="${PYTHONPATH}:/path/to/your/project"
  448. django-ai-boost --settings myproject.settings
  449. ```
  450. Or in your MCP client configuration:
  451. ```json
  452. {
  453. "env": {
  454. "PYTHONPATH": "/path/to/your/project",
  455. "DJANGO_SETTINGS_MODULE": "myproject.settings"
  456. }
  457. }
  458. ```
  459. ### MCP Server Not Connecting
  460. 1. Check that the `django-ai-boost` command is accessible in your PATH
  461. 2. Verify your MCP client configuration file syntax is valid JSON
  462. 3. Check the logs in your AI tool (usually in settings or help menu)
  463. 4. Try running the server manually to see any error messages:
  464. ```bash
  465. django-ai-boost --settings myproject.settings
  466. ```
  467. ### Database Connection Issues
  468. Ensure your Django database is properly configured and accessible. The MCP server needs the same database access as your Django application.
  469. ### Port Already in Use (SSE Transport)
  470. If you see an error like "Address already in use" when using SSE transport, the default port 8000 is likely occupied by another service (such as your Django development server). Use a different port:
  471. ```bash
  472. # Use a different port for the MCP server
  473. django-ai-boost --settings myproject.settings --transport sse --port 8001
  474. ```
  475. **Note:** The stdio transport (default) does not use network ports and will not have this issue.
  476. ### Output Truncation in MCP Clients
  477. Some MCP clients have display limits that may truncate long tool outputs:
  478. **PyCharm**: Limits tool output to 2000 lines (~100 Django models with typical field counts)
  479. **Claude Code**: Truncates at ~700 characters in terminal display
  480. **Symptoms:**
  481. - Message stating "output truncated due to length"
  482. - Incomplete model listings when calling `list_models`
  483. **Solution:**
  484. Use the `app_labels` parameter to filter models by specific Django apps:
  485. ```python
  486. # Instead of listing all models (may truncate):
  487. list_models()
  488. # Filter by specific app(s):
  489. list_models(app_labels=["blog"])
  490. list_models(app_labels=["blog", "auth", "contenttypes"])
  491. ```
  492. **Verification:**
  493. The truncation is happening client-side, not in the server. To verify:
  494. 1. Count your Django models: `python manage.py shell -c "from django.apps import apps; print(len(apps.get_models()))"`
  495. 2. Estimate lines: models × 20 lines per model ≈ total output lines
  496. 3. If > 2000 lines (PyCharm) or very large (Claude Code), use app filtering
  497. ## Requirements
  498. - Python 3.12+
  499. - Django 4.2+
  500. - FastMCP 3.2.4+
  501. ## License
  502. MIT License - see LICENSE file for details.
  503. ## Inspiration
  504. This project is inspired by [Laravel Boost](https://github.com/laravel/boost), which provides similar MCP functionality for Laravel applications.
  505. ## Contributing
  506. We welcome contributions from the community! Whether it's bug fixes, new features, documentation improvements, or bug reports, your help is appreciated.
  507. ### Getting Started
  508. 1. **Fork the repository** on GitHub
  509. 2. **Clone your fork** locally:
  510. ```bash
  511. git clone https://github.com/YOUR_USERNAME/django-ai-boost.git
  512. cd django-ai-boost
  513. ```
  514. 3. **Install development dependencies**:
  515. ```bash
  516. uv sync --dev
  517. ```
  518. 4. **Create a new branch** for your changes:
  519. ```bash
  520. git checkout -b feature/your-feature-name
  521. # or
  522. git checkout -b fix/your-bug-fix
  523. ```
  524. ### Development Workflow
  525. 1. **Make your changes** in your feature branch
  526. 2. **Follow code style**:
  527. ```bash
  528. # Check code style
  529. uv run ruff check .
  530. # Auto-fix style issues
  531. uv run ruff check --fix .
  532. # Format code
  533. uv run ruff format .
  534. ```
  535. 3. **Test your changes**:
  536. ```bash
  537. # Run the test suite
  538. uv run pytest
  539. # Run broad integration coverage
  540. uv run pytest test_server.py
  541. # Test with the fixture project
  542. export PYTHONPATH="${PYTHONPATH}:./fixtures/testproject"
  543. uv run django-ai-boost --settings testproject.settings
  544. ```
  545. 4. **Commit your changes**:
  546. ```bash
  547. git add .
  548. git commit -m "feat: add new feature" # or "fix: resolve bug"
  549. ```
  550. We follow [Conventional Commits](https://www.conventionalcommits.org/):
  551. - `feat:` for new features
  552. - `fix:` for bug fixes
  553. - `docs:` for documentation changes
  554. - `chore:` for maintenance tasks
  555. - `test:` for test changes
  556. - `refactor:` for code refactoring
  557. 5. **Push to your fork**:
  558. ```bash
  559. git push origin feature/your-feature-name
  560. ```
  561. 6. **Create a Pull Request** on GitHub from your fork to the main repository
  562. ### Contribution Guidelines
  563. - **Code Quality**: Ensure your code passes linting (`ruff check`) and formatting (`ruff format`)
  564. - **Testing**: Add tests for new features and ensure existing tests pass
  565. - **Documentation**: Update the README and relevant documentation for new features
  566. - **Commits**: Use clear, descriptive commit messages following Conventional Commits
  567. - **Pull Requests**: Provide a clear description of what your PR does and why
  568. - **Issues**: Check existing issues before creating a new one
  569. ### What to Contribute
  570. We're especially interested in:
  571. - **New MCP Tools**: Add new tools to expose more Django functionality
  572. - **Bug Fixes**: Fix issues reported in GitHub Issues
  573. - **Documentation**: Improve setup guides, add examples, or clarify existing docs
  574. - **Tests**: Expand test coverage for existing features
  575. - **Performance**: Optimize slow operations or reduce memory usage
  576. - **Compatibility**: Ensure compatibility with different Django versions
  577. ### Need Help?
  578. - Look at existing code for examples
  579. - Open a GitHub Issue for questions or discussions
  580. - Review closed PRs to see how others have contributed
  581. ### Code of Conduct
  582. Please be respectful and constructive in all interactions. We aim to maintain a welcoming and inclusive community.
  583. ## Commercial Support
  584. [![alt text](https://avatars2.githubusercontent.com/u/5529080?s=80&v=4 "Vinta Logo")](https://www.vinta.com.br/)
  585. This project is maintained by [Vinta Software](https://www.vinta.com.br/). Our team of design and development experts is available to help your company launch successful Django-powered products. If you need any commercial support, feel free to get in touch: contact@vinta.com.br

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.