DRF MCP Docs
API documentation via MCP for AI coding agents
What is DRF MCP Docs?
DRF MCP Docs is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to api documentation via mcp for ai coding agents
API documentation via MCP for AI coding agents
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- API documentation via MCP for AI coding agents
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx drf-mcp-docsConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use DRF MCP Docs
drf-mcp-docs is a Django plugin that exposes your Django REST Framework API documentation through the Model Context Protocol, allowing AI coding agents to read, understand, and generate correct frontend integration code for your API. Unlike packages that expose DRF actions as MCP tools, drf-mcp-docs specifically serves documentation — covering endpoint details, schema definitions, request/response examples, and code snippets in JavaScript, TypeScript, Python, and cURL. It works with drf-spectacular, drf-yasg, or DRF's built-in schema generation and supports both stdio and streamable-HTTP transports.
Prerequisites
- Python 3.8+ with a working Django project using Django REST Framework
- drf-mcp-docs installed: `pip install drf-mcp-docs` (optionally with `[spectacular]` or `[yasg]` extras)
- A schema generator configured in your Django project (drf-spectacular recommended)
- An MCP client such as Claude Code, Cursor, or Claude Desktop
Install drf-mcp-docs
Install the package via pip. Use the `[spectacular]` extra if your project uses drf-spectacular (recommended), or `[yasg]` for drf-yasg. The base install works with DRF's built-in schema generation.
pip install drf-mcp-docs
# With drf-spectacular (recommended)
pip install drf-mcp-docs[spectacular]
# With drf-yasg
pip install drf-mcp-docs[yasg]Add to INSTALLED_APPS
Add drf_mcp_docs to your Django INSTALLED_APPS. No additional settings are required for basic use — the package auto-detects your configured schema generator.
INSTALLED_APPS = [
# ...
'rest_framework',
'drf_mcp_docs',
]Validate your configuration
Run the checkmcpconfig management command to validate that the schema generator is detected and documentation can be generated successfully before connecting any AI client.
python manage.py checkmcpconfigStart the MCP server
Run the MCP server using stdio transport for local AI tools (Claude Code, Cursor) or streamable-HTTP for remote network access.
# 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 8100Configure your MCP client
Add the server to your MCP client configuration. For Claude Code, add to ~/.claude.json. For Cursor, add to .cursor/mcp.json. Use the absolute path to your Django project.
{
"mcpServers": {
"my-api-docs": {
"command": "python",
"args": ["manage.py", "runmcpserver", "--transport", "stdio"],
"cwd": "/path/to/your/django/project"
}
}
}DRF MCP Docs Examples
Client configuration
MCP client config for Claude Code (add to ~/.claude.json) or Claude Desktop (add to claude_desktop_config.json). The cwd must point to your Django project root where manage.py lives.
{
"mcpServers": {
"my-api-docs": {
"command": "python",
"args": ["manage.py", "runmcpserver", "--transport", "stdio"],
"cwd": "/path/to/your/django/project"
}
}
}Prompts to try
Once connected, AI agents can browse your API structure, search endpoints, and generate integration code automatically.
- "Show me all the product endpoints in this API"
- "Generate a React hook to create a new user via POST /api/users/"
- "What authentication methods does this API support?"
- "Generate a Python requests snippet for PATCH /api/orders/{id}/"
- "Show me the full schema for the Order model"Troubleshooting DRF MCP Docs
checkmcpconfig reports no schema generator detected
Ensure your schema generator (drf-spectacular or drf-yasg) is listed in INSTALLED_APPS and properly configured. Install with the correct extra: `pip install drf-mcp-docs[spectacular]` for drf-spectacular.
AI agent connects but returns no endpoints
Confirm that DRF is generating a valid schema by running `python manage.py spectacular --file schema.yaml` (for drf-spectacular). If the schema is empty, your DRF viewsets may not have routers registered or may lack schema annotations.
stdio server exits immediately when started
The stdio server waits for MCP protocol input on stdin — it won't print anything to the terminal when run directly. It is designed to be launched by an MCP client. Use `checkmcpconfig` to verify the server is working before adding it to your client.
Frequently Asked Questions about DRF MCP Docs
What is DRF MCP Docs?
DRF MCP Docs is a Model Context Protocol (MCP) server that api documentation via mcp for ai coding agents It connects AI assistants to external tools and data sources through a standardized interface.
How do I install DRF MCP Docs?
Follow the installation instructions on the DRF MCP Docs GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with DRF MCP Docs?
DRF MCP Docs works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is DRF MCP Docs free to use?
Yes, DRF MCP Docs is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
DRF MCP Docs Alternatives — Similar Developer Tools Servers
Looking for alternatives to DRF MCP Docs? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up DRF MCP Docs in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use DRF MCP Docs?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.