MCP server for Django REST Framework — auto-discovers DRF views and exposes them as MCP tools
django-rest-mcp exposes DRF ViewSets as MCP tools via auto-discovery. Tool names follow verb_noun convention (list_, retrieve_, create_, update_, partial_update_, destroy_) and are clear. However, descriptions are minimal (e.g., 'list via CheckViewSet'), parameter descriptions are sparse or missing, and input schemas are inferred from serializers rather than explicitly visible in the code. The server lacks error handling guidance, output schema documentation, and security annotations. No tool annotations (readOnlyHint, destructiveHint, idempotentHint) are present despite clear risk levels (READ_ONLY, WRITE, DESTRUCTIVE). Parameter validation and LLM-friendly error messages are not evident.
create via <ViewSetClass>
destroy via <ViewSetClass>
list via <ViewSetClass>
partial_update via <ViewSetClass>
retrieve via <ViewSetClass>
update via <ViewSetClass>
Tool descriptions are generic placeholders (e.g., 'list via CheckViewSet'). They do not explain WHAT the tool does, WHEN to use it, or what it returns. LLMs cannot determine tool selection intent from these descriptions.
Input schemas are derived from DRF serializers at runtime but not explicitly visible in source code. For create/update/partial_update, the 'data' parameter is documented as 'object|pydantic_model' with no field-level schema details. LLMs cannot infer which fields are required, optional, or constrained.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint) despite clear risk levels. destroy_<basename> is marked DESTRUCTIVE but the tool definition lacks a destructiveHint annotation. LLMs cannot reason about side effects or retry safety.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 48 | <=2025-11-25 | v2 |
No output schema documentation. Tools return DRF serializer output, but the response structure is not documented. LLMs cannot plan downstream tool calls or extract required fields (e.g., object IDs for chaining).
Error handling is not visible in source. No recovery guidance, error classification, or actionable error messages. If a create fails due to validation, the LLM receives raw DRF error responses without guidance on what to fix.