drf-mcp-docs
by Abdulkhalek-1·★ 17·Score 43
An MCP server that exposes Django REST Framework API documentation to AI coding agents for frontend development assistance.
Overview
drf-mcp-docs transforms your DRF API documentation into MCP resources and tools that AI agents can use to understand your API and generate frontend integration code. It supports multiple schema generators (drf-spectacular, drf-yasg, DRF built-in) and provides both stdio and HTTP transport options. The server exposes API documentation as browseable resources and offers tools for searching endpoints, retrieving examples, and generating client code for JavaScript/TypeScript, Python, and cURL.
Try asking AI
After installing, here are 4 things you can ask your AI assistant:
When to choose this
Choose this if you're using Django REST Framework and want AI coding agents to help with frontend integration by accessing your API documentation.
When NOT to choose this
Don't choose this if you need the AI to directly call your API endpoints (this server only exposes documentation, not actions).
Tools this server exposes
7 tools extracted from the READMEsearch_endpointssearch_endpoints(query, method?, tag?)Search endpoints by keyword
get_endpoint_detailget_endpoint_detail(path, method)Get full endpoint documentation
get_request_exampleget_request_example(path, method)Get example request body and parameters
get_response_exampleget_response_example(path, method, status_code?)Get example response for an endpoint
generate_code_snippetgenerate_code_snippet(path, method, language?, client?)Generate integration code with types and docs
list_schemaslist_schemas()Get all data model names and descriptions
get_schema_detailget_schema_detail(name)Get full schema with all fields and types
Comparable tools
Installation
Installation
pip install drf-mcp-docs
# With specific schema generator:
pip install drf-mcp-docs[spectacular] # recommended
pip install drf-mcp-docs[yasg]Configuration
Add to your Django settings:
INSTALLED_APPS = [
# ...
'rest_framework',
'drf_mcp_docs',
]Running
**stdio transport** (for local AI tools):
python manage.py runmcpserver --transport stdio**Streamable HTTP transport** (for network access):
python manage.py runmcpserver --transport streamable-http --host 0.0.0.0 --port 8100Claude Desktop Configuration
Add to ~/.claude.json:
{
"mcpServers": {
"my-api-docs": {
"command": "python",
"args": ["manage.py", "runmcpserver", "--transport", "stdio"],
"cwd": "/path/to/your/django/project"
}
}
}Compare drf-mcp-docs with
Last updated · Auto-generated from public README + GitHub signals.