# Django Admin MCP

> Django Admin MCP is an open-source MCP server for developer tools. Django package that exposes your admin models to MCP clients within Django permissions. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** self-hosted, API
- **Website:** https://7tg.github.io/django-admin-mcp/
- **Repository:** https://github.com/7tg/django-admin-mcp
- **MCP Registry name:** io.github.7tg/django-admin-mcp
- **Categories:** developer tools, databases
- **Listing updated:** 2026-11-15

## About

Instead of handing an agent a database connection, this package puts it behind the admin you already maintain. You add a mixin to a ModelAdmin and set mcp_expose = True, and tools are generated from that class: list, get, create, update and delete for the model, plus admin actions, history, autocomplete and related-object traversal. Models with the mixin but no flag can only be found through find_models.

Control stays in Django. Every call goes through the has_*_permission() checks, a token starts with no access and can never do more than its linked user, and writes run full_clean() and your save hooks so the agent cannot save what the admin form would reject. Each change is recorded in Django's LogEntry under the token's user, and mcp_fields and mcp_exclude_fields keep secrets and password hashes out of view.

It installs with pip, is mounted through a URL include and a migration, and needs Python 3.10 or newer, Django 3.2 to 6.0 and Pydantic 2. The only dependencies are Django and Pydantic, with no MCP SDK. Tokens are created in the admin. MIT licensed.

## Features

- **Mixin-based exposure:** Add one mixin and a flag to a ModelAdmin to generate its tools.
- **Permission-capped tokens:** A token can only do what its linked user is allowed to do.
- **Validated writes:** Writes run full_clean() and your save hooks.
- **Admin actions as tools:** Registered actions, including two-step confirmations, become callable.
- **Audit trail:** Changes land in Django's LogEntry under the token's user.
- **Field filtering:** Include or exclude fields so secrets stay hidden.

## Good for

- Let an agent list and update records through the admin safely
- Run a registered admin action like publish or refund from chat
- Review a record's change history with an assistant
- Expose only selected fields of a model to an agent

## Install

### Claude Code (Terminal)

```sh
claude mcp add django-admin-mcp --env host='<host>' -- uvx django-admin-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "django-admin-mcp": {
      "command": "uvx",
      "args": [
        "django-admin-mcp"
      ],
      "env": {
        "host": "<host>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "django-admin-mcp": {
      "command": "uvx",
      "args": [
        "django-admin-mcp"
      ],
      "env": {
        "host": "<host>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "django-admin-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "django-admin-mcp"
      ],
      "env": {
        "host": "<host>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "django-admin-mcp": {
      "command": "uvx",
      "args": [
        "django-admin-mcp"
      ],
      "env": {
        "host": "<host>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "django-admin-mcp": {
      "command": "uvx",
      "args": [
        "django-admin-mcp"
      ],
      "env": {
        "host": "<host>"
      }
    }
  }
}
```

## Tools

- `find_models`: Finds models that have the mixin but no direct tools.
- `list_article`: Lists records of an exposed model, with a limit.
- `get_article`: Reads one record.
- `create_article`: Creates a record.
- `update_article`: Updates a record with given data.

## FAQ

### How do I install it?

pip install django-admin-mcp, add django_admin_mcp to INSTALLED_APPS, include its URLs and run migrate.

### Which Django versions work?

Django 3.2 through 6.0, with Python 3.10 or newer.

### How is access controlled?

Bearer tokens created in the Django admin, capped by the linked user's permissions.

### Which licence?

MIT.

### Is Django Admin MCP free?

Yes. Django Admin MCP is open source, so you can use and self-host it for free.

### How do I add Django Admin MCP to Claude Code?

Run this command in your terminal: claude mcp add django-admin-mcp --env host='<host>' -- uvx django-admin-mcp

### What are the best alternatives to Django Admin MCP?

The closest alternatives to Django Admin MCP are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/django-admin-mcp
