DRF MCP Docs

v1.0.0Developer Toolsstable

API documentation via MCP for AI coding agents

ai-agentsapi-documentationclaudecode-generationcursor
Share:
17
Stars
0
Downloads
0
Weekly
0/5

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

Django REST framework documentation
API documentation for AI agents
Abdulkhalek-1

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMar 24, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx drf-mcp-docs

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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]
2

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',
]
3

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 checkmcpconfig
4

Start 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 8100
5

Configure 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.

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.

Quick Config Preview

{ "mcpServers": { "drf-mcp-docs": { "command": "npx", "args": ["-y", "drf-mcp-docs"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides