1. Conduid
  2. AI
  3. Drf MCP
MCP server · AI

Drf MCP

Enterprise-grade Model Context Protocol (MCP) integration for Django REST Framework

Unclaimed MIT last commit 8 months ago ai
56Fair

Scored 13 days ago · breakdown

About Drf MCP

Drf MCP is an MCP server published by ziyacivan in the AI category: enterprise-grade Model Context Protocol (MCP) integration for Django REST Framework.

The repository has 1 stars and 0 forks, with the last commit 8 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/ziyacivan/drf-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Drf MCP

Powered by Claude · Grounded in docs

I know everything about Drf MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

3 checks have not been run yet.

Releases

v0.1.1v0.1.1 · 27 Jan 2026DRF MCP Release v0.1.1 See CHANGELOG.md for details. Installation pip install drf-mcp==0.1.1 PyPI Package https://pypi.org/project/drf-mcp/0.1.1/

README

DRF MCP

PyPI version

Enterprise-grade Model Context Protocol (MCP) integration for Django REST Framework with FastMCP 3.0

Automatically expose your Django REST Framework APIs as tools for AI agents via the Model Context Protocol. Zero configuration, maximum security, enterprise-ready.

Overview

DRF MCP transforms your Django REST Framework views into AI-native tools via the Model Context Protocol standard. Built on FastMCP 3.0, it automatically:

  • 🔍 Discovers all DRF views and ViewSets in your Django URLconf
  • 🔧 Exposes them as MCP tools with auto-generated JSON schemas
  • 🔐 Secures with DRF's permission system (no security bypass)
  • ⚡ Async-first execution for non-blocking LLM interactions
  • 📊 Traces with OpenTelemetry for observability
  • 🚀 Scales with stateless, transport-agnostic architecture

Quick Start

# In your Django project
from drf_mcp import DRFMCP
from myapp.views import CustomerViewSet

# Initialize MCP server
mcp = DRFMCP("MyEnterpriseAPI")

# Option 1: Register specific ViewSets
mcp.register_viewset(CustomerViewSet, namespace="crm")

# Option 2: Auto-discover all DRF views
mcp.autodiscover()

# Run server (stdio, HTTP, or SSE transport)
if __name__ == "__main__":
    mcp.run()

Your DRF serializers automatically become MCP tool parameters. No extra configuration needed.

Architecture

Discovery

Scans Django's URLconf to find all DRF APIView and ViewSet classes.

Schema Generation

Uses drf-spectacular to convert DRF serializers into JSON schemas for MCP tool arguments.

Execution

Wraps DRF view invocations with async support, permission checking, and error handling.

Security

Enforces DRF's authentication and permission classes on every tool call. Agents are authenticated users.

Transport

Supports stdio, HTTP, and SSE via FastMCP's built-in transports.

Features

  • ✅ Automatic DRF view discovery and MCP tool generation
  • ✅ drf-spectacular schema integration (nested serializers, complex validators)
  • ✅ DRF permission system integration (no security bypass)
  • ✅ Async-first executor (non-blocking LLM execution)
  • ✅ OAuth2/OIDC agent authentication
  • ✅ OpenTelemetry tracing for observability
  • ✅ Interactive manage.py mcp_inspector CLI
  • ✅ Type hints and Pydantic v2 schemas
  • ✅ Django 4.2 LTS and 5.0+ support
  • ✅ Python 3.10+ support

Installation

uv add drf-mcp

Or with pip:

pip install drf-mcp

Documentation

Full documentation is available at drf-mcp.readthedocs.io

Requirements

  • Python: 3.10+
  • Django: 4.2+ (LTS) or 5.0+
  • Django REST Framework: 3.14+
  • FastMCP: 3.0+

Development

# Clone and setup
git clone https://github.com/ziyacivan/drf-mcp.git
cd drf-mcp
uv venv
uv pip install -e ".[dev]"

# Run tests
pytest

# Format code
black src/drf_mcp tests
isort src/drf_mcp tests

# Type checking
mypy src/drf_mcp

License

MIT License - See LICENSE file for details.

Contributing

Contributions welcome! Please see CONTRIBUTING.md for guidelines.

Acknowledgments

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Drf MCP

How do I install Drf MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Drf MCP safe to use with an AI agent?

Its trust score is 56 out of 100 (fair). It passes 2 of the 3 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Drf MCP still maintained?

The last commit was 8 months ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.