MCP Catalogs
Home

django-mcp-server

by gts360·332·Score 50

Django MCP Server enables AI agents to interact with Django applications through Model Context Protocol.

developer-toolsai-llmdatabase
51
Forks
15
Open issues
2 mo ago
Last commit
2d ago
Indexed

Overview

Django MCP Server is a Django extension that provides MCP (Model Context Protocol) capabilities to any Django application, whether using WSGI or ASGI. It allows exposing Django models as MCP tools with minimal code, enabling AI agents to query and interact with application data securely. The server supports both async and sync operations and integrates seamlessly with Django Rest Framework APIs.

Try asking AI

After installing, here are 3 things you can ask your AI assistant:

you:Enabling Claude AI or other LLM agents to query and manipulate Django application data
you:Converting existing Django Rest Framework APIs into MCP tools for AI agent consumption
you:Building AI-powered interfaces for Django applications with custom toolsets

When to choose this

Choose this if you're working with Django applications and want to enable AI agents to interact with your models and APIs through MCP.

When NOT to choose this

Avoid if you need complex write operations or if you're not using Django, as this server is specifically designed for Django applications.

Tools this server exposes

9 tools extracted from the README
  • BirdQueryTool

    Query Bird models with location information

  • LocationTool

    Query Location models

  • CityTool

    Query City models

  • add

    Add two numbers together

  • send_email

    Send an email with specified subject and body

  • get_species_count

    Get count of a bird species by name

  • increment_species

    Increment the count of a bird species

  • get_foo_bar

    Get first FooBar instance

  • MyModelView

    Create instances of MyModel

Comparable tools

django-ninja-mcpfastapi-mcpllamaindex-django

Installation

Installation

  1. Install the package:
pip install django-mcp-server
  1. Add to Django settings:
INSTALLED_APPS = [
    # your apps...
    'mcp_server',
]
  1. Add URL patterns:
from django.urls import path, include

urlpatterns = [
    # your urls...
    path("", include('mcp_server.urls')),
]
  1. Define MCP tools in mcp.py:
from mcp_server import ModelQueryToolset
from .models import *

class BirdQueryTool(ModelQueryToolset):
    model = Bird

Claude Desktop Configuration

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "django_mcp": {
      "command": "/path/to/interpreter/python",
      "args": [
        "/path/to/your/project/manage.py",
        "stdio_server"
      ]
    }
  }
}

Compare django-mcp-server with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.