MCP server for Django REST Framework — auto-discovers DRF views and exposes them as MCP tools
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"django-rest-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# django-rest-mcp Turn the Django REST Framework API you already have into MCP tools, without rewriting a thing. ## Why You have a DRF API. You want an MCP client (Claude, an agent, your own tooling) to call it. The usual way is to hand-write an MCP tool for every endpoint, re-describe your serializers as tool inputs, and re-check your permissions in a second place that quietly drifts from the real API. This package skips that. Point it at your existing DRF router and every ViewSet action becomes an MCP tool, input types pulled straight from your serializers, every call running through your real permissions and querysets. One source of truth: your API. If `curl` can hit it, an MCP client can too. It owns no models, no business logic, no views of its own. It is glue. ## What you get Register a `BookViewSet` under `books` and an MCP client sees six tools: ``` books_list books_retrieve books_create books_update books_partial_update books_destroy ``` For each one: - **Typed inputs**, generated from the action's serializer, so the model knows exactly what fields to send. - **Runs as the authenticated user**, so your `permission_classes`, OAuth scopes, object-level permissions, and `get_queryset()` filtering all apply unchanged. - **Returns** whatever your API already returns. ## Install ```bash pip install django-rest-mcp ``` Python 3.12+, Django 5.1+, DRF 3.14+, `mcp>=1.26`, `pydantic>=2`. ## How You already have a router. Three lines: ```python # myapp/urls.py from django.urls import path from drf_mcp import DRFMCP from myapp.urls import router # your existing DefaultRouter mcp = DRFMCP("myapp") mcp.autodiscover(router) urlpatterns = [path("mcp/", mcp.as_view()), ...] ``` That exposes every standard action on every registered ViewSet. That's it. ### Pick what to expose ```python mcp.autodiscover(router, include=["books"]) # only these basenames mcp.autodiscover(router, exclude=["internal"]) # all but these # or…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.